-
- Posts: 3
- Joined: Thu Aug 16, 2012 5:52 am
Adding RAM to Pi
Has anyone tried to add RAM to their Pi? What I mean by that is, is there are way to somehow add RAM by building a makeshift RAM holder(adaptor?) and somehow connecting it using the GPIOs?
Re: Adding RAM to Pi
No, because it won't work (or will work so slowly as to be useless).
Principal Software Engineer at Raspberry Pi Ltd.
Working in the Applications Team.
Working in the Applications Team.
-
- Posts: 3
- Joined: Thu Aug 16, 2012 5:52 am
Re: Adding RAM to Pi
How come? I know that the 256MB RAM that it comes with is build into the chip, but is there a way to move the file that accesses the RAM at start up to where the added hardware is at, and let it use say even 1BG of newly added RAM?
Re: Adding RAM to Pi
No.
The memory interface is built into the top surface of the CPU, and a RAM chip is soldered directly onto them, on top of the CPU. Once that is done then there are no signals accessible for adding more RAM. The only signals available are the GPIO lines. Those are too slow and any memory you added that way would be invisible to Linux and the memory management hardware. The effect would be like the SD card, only faster. (But still orders of magnitude slower than real RAM.) You would have to write drivers to access it of course.
I doubt anyone, no matter how well equipped they were, would be capable of unsoldering the RAM chip. But if it were possible then a larger RAM could be used to replace it, or I suppose an extension board of some sort could be devised but it would be an intricate design task since the signals are not expected to travel along PCB tracks.
The memory interface is built into the top surface of the CPU, and a RAM chip is soldered directly onto them, on top of the CPU. Once that is done then there are no signals accessible for adding more RAM. The only signals available are the GPIO lines. Those are too slow and any memory you added that way would be invisible to Linux and the memory management hardware. The effect would be like the SD card, only faster. (But still orders of magnitude slower than real RAM.) You would have to write drivers to access it of course.
I doubt anyone, no matter how well equipped they were, would be capable of unsoldering the RAM chip. But if it were possible then a larger RAM could be used to replace it, or I suppose an extension board of some sort could be devised but it would be an intricate design task since the signals are not expected to travel along PCB tracks.
-
- Posts: 3
- Joined: Thu Aug 16, 2012 5:52 am
Re: Adding RAM to Pi
Ok, thank you
Re: Adding RAM to Pi
I think the issue is that the GPIO doesn't provide the speed and bandwidth for managing memory.
I've wondered about maybe a custom USB Device with Dynamic Memory (i.e. NOT Flash). You could then tell the OS to use the USB memory as swap partition and maybe that would give you acceptably fast performance. Essentially a RAM Disk. (Remember the old saying in UNIX everything is a file
)
(You can currently do this with a SSD drive, BUT the Flash memory in a SSD has a limited number of writes, doing this with VM would eventually "wear out" the drive. Also I think the Flash Memory is slower than RAM.).
I've wondered about maybe a custom USB Device with Dynamic Memory (i.e. NOT Flash). You could then tell the OS to use the USB memory as swap partition and maybe that would give you acceptably fast performance. Essentially a RAM Disk. (Remember the old saying in UNIX everything is a file

(You can currently do this with a SSD drive, BUT the Flash memory in a SSD has a limited number of writes, doing this with VM would eventually "wear out" the drive. Also I think the Flash Memory is slower than RAM.).
Re: Adding RAM to Pi
even if you wanted to do it via ssd you are limited to the speed of the USB so just using a swap partition on an external HD will give you the same speed....
now the SOC can get away with max of 512MB of RAM without a re-design - but don't hold your horses
now the SOC can get away with max of 512MB of RAM without a re-design - but don't hold your horses
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV
1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe
WARNING - some parts of this post may be erroneous YMMV
1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe
Re: Adding RAM to Pi
Some of us see the restriction as a blessing. The original micro universe was 64kb. Enough for some brilliant innovation - remember Visicalc (Excel's predecessor sans GUI)? We had to work within it. The result was slick fast code.
The expansion of max memory size of 16, 32 & 64 bit processing together with low cost means modern software fills the space available with bloat. Unnecessary bloat. The more code, the more there is to go wrong and to process. Excel is no faster than VisiCalc for basic calculations despite being run on processors several magnitudes supposedly faster.
Hence the Pi's primary mission - to get kids coding - provides a space sufficient for most and the constraints to the others is a good education on focussing on creating efficient code.
The expansion of max memory size of 16, 32 & 64 bit processing together with low cost means modern software fills the space available with bloat. Unnecessary bloat. The more code, the more there is to go wrong and to process. Excel is no faster than VisiCalc for basic calculations despite being run on processors several magnitudes supposedly faster.
Hence the Pi's primary mission - to get kids coding - provides a space sufficient for most and the constraints to the others is a good education on focussing on creating efficient code.
Re: Adding RAM to Pi
>>> The original micro universe was 64kb. Enough for some brilliant innovation.
I seem to recall my original machine came with 4 kB. The upgrade to 16kB was wonderful, even extravagant. A full fit-out to 64 seemed over the top and too much expense. <music here ...>
I seem to recall my original machine came with 4 kB. The upgrade to 16kB was wonderful, even extravagant. A full fit-out to 64 seemed over the top and too much expense. <music here ...>
-
- Posts: 4277
- Joined: Sun Jan 15, 2012 1:11 pm
Re: Adding RAM to Pi
There have been a lot of these "Can I add RAM?" threads lately. I wonder why...
It makes me wonder what specific problem people are running into. Why they think more RAM is needed...
Note well: I am not saying that they are wrong. I'm not even questioning the idea that more RAM would be better (it is a truism of computing that more RAM is always better). It is just that their posts would make more sense if they contained specific instances of problems that have arisen (and are observed) as a result of having only 256M of RAM.
It makes me wonder what specific problem people are running into. Why they think more RAM is needed...
Note well: I am not saying that they are wrong. I'm not even questioning the idea that more RAM would be better (it is a truism of computing that more RAM is always better). It is just that their posts would make more sense if they contained specific instances of problems that have arisen (and are observed) as a result of having only 256M of RAM.
And some folks need to stop being fanboys and see the forest behind the trees.
(One of the best lines I've seen on this board lately)
(One of the best lines I've seen on this board lately)
Re: Adding RAM to Pi
yes there is ... and he's a post to help :-
http://www.raspberrypi.org/phpBB3/viewt ... 62&t=14705
http://www.raspberrypi.org/phpBB3/viewt ... 62&t=14705
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV
1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe
WARNING - some parts of this post may be erroneous YMMV
1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe
Re: Adding RAM to Pi
object oriented programming leads to code size bloat.
- jackokring
- Posts: 818
- Joined: Tue Jul 31, 2012 8:27 am
- Location: London, UK
Re: Adding RAM to Pi
Use an extra Pi as remote RAM, it teaches you more about networking, and distributed cluster programming. Just run a big swapfs cache on the second Pi with no X. The first Pi just needs code writing to the use the second Pi as the swapfs.
Pi[NFA]=B256R0USB CL4SD8GB Raspbian Stock.
Pi[Work]=A+256 CL4SD8GB Raspbian Stock.
My favourite constant 1.65056745028
Pi[Work]=A+256 CL4SD8GB Raspbian Stock.
My favourite constant 1.65056745028
-
- Posts: 1
- Joined: Fri Dec 28, 2012 10:18 am
Re: Adding RAM to Pi
What about a usb flash drive, like with Windows XP or 7? I think it should be much simpler. Any ideas?
Re: Adding RAM to Pi
it's in the FAQ
http://www.raspberrypi.org/faqs
http://www.raspberrypi.org/faqs
Can I add extra memory?
No. The RAM is a POP package on top of the SoC, so it’s not removable or swappable.
Just started my Raspberry Pi journey >> http://yvonnezoe.wordpress.com
Re: Adding RAM to Pi
stevech,
If you need multiple instances of something, for example a buffer, you can write that in C using pointers to your select which of your various buffers you are working on. You can also write it in C++, have a buffer class and let the language take care of object instance references. You will find that the code comes out about the same size in either regular C or object oriented C++. In fact when I did some experiments with this a while back I was surprised, even shocked, that the generated code was byte for byte the same!
Don't forget that the Arduino is programmed in C++ has and has far less memory than the Pi.
No it does not. Or at least it need not. This is a common myth.object oriented programming leads to code size bloat.
If you need multiple instances of something, for example a buffer, you can write that in C using pointers to your select which of your various buffers you are working on. You can also write it in C++, have a buffer class and let the language take care of object instance references. You will find that the code comes out about the same size in either regular C or object oriented C++. In fact when I did some experiments with this a while back I was surprised, even shocked, that the generated code was byte for byte the same!
Don't forget that the Arduino is programmed in C++ has and has far less memory than the Pi.
Slava Ukrayini.
Re: Adding RAM to Pi
Its all good training for writing code for embedded systems which don't have unlimited resources.Its the kind of stuff that your average CS course won't teach you
Re: Adding RAM to Pi
What is?Jezmo wrote:Its all good training for writing code for embedded systems which don't have unlimited resources.Its the kind of stuff that your average CS course won't teach you
Although excellent thread resurrection - this one was 6 months old.
Principal Software Engineer at Raspberry Pi Ltd.
Working in the Applications Team.
Working in the Applications Team.
-
- Posts: 7
- Joined: Tue Aug 06, 2013 12:36 pm
Re: Adding RAM to Pi
Doesn't Raspian have a program like in windows readyboost? because i have a lot of usb drives that are not at use if they dont have it in Raspian they should add it.
"Sometimes life hits you in the head with a brick. Don't lose faith. Keep looking until you find it. Don't settle." -Steve Jobs
Re: Adding RAM to Pi
redyboost does not add ram ...
if you want more RAM then add a swap file
if you think you need more RAM explain why please
also see my previous post about having an RPI on 48GB RAM
if you want more RAM then add a swap file
if you think you need more RAM explain why please
also see my previous post about having an RPI on 48GB RAM
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV
1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe
WARNING - some parts of this post may be erroneous YMMV
1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe
Re: Adding RAM to Pi
So its not possible to use a heat gun/hair dryer/ hot air to successfully remove the ram chip, replace it with one that has more ram, solder the new one back to the bored using the same method to desolder (assuming all pins would match up) and make it work? while programming is alright, I think it would be alot more fun to build a single bored/mini computer like the raspberry pi from scratch with the specs of modern phones/ something more powerful then the raspberry pi
Re: Adding RAM to Pi
You can't change the SoC design like that, but you can use one of many single board computers with stronger CPU/RAM/GPU/whateverjehamann wrote:So its not possible to use a heat gun/hair dryer/ hot air to successfully remove the ram chip, replace it with one that has more ram, solder the new one back to the bored using the same method to desolder (assuming all pins would match up) and make it work? while programming is alright, I think it would be alot more fun to build a single bored/mini computer like the raspberry pi from scratch with the specs of modern phones/ something more powerful then the raspberry pi

Re: Adding RAM to Pi
The SOC is limited to 512MB of RAM. So no, its not going to happen. I think 512MB is appropriate considering the Pi's other limitations (Like the puny CPU).
Don't judge Linux by the Pi.......
I must not tread on too many sacred cows......
I must not tread on too many sacred cows......
-
- Posts: 4277
- Joined: Sun Jan 15, 2012 1:11 pm
Re: Adding RAM to Pi
Note that this question is basically equivalent to:
(And yes, I am ignoring so-called "expanded" memory)
(Yes, I know that the real maximum is 640K, but it can address up to 1M)Can I add more than 1M of memory to my 8086 PC?
(And yes, I am ignoring so-called "expanded" memory)
And some folks need to stop being fanboys and see the forest behind the trees.
(One of the best lines I've seen on this board lately)
(One of the best lines I've seen on this board lately)
-
- Posts: 27225
- Joined: Tue Mar 25, 2014 12:40 pm
Re: Adding RAM to Pi
1GB PoP Memory is certainly feasible, but no one manufactures them and considering that the likely market for them is small the price would be prohibitive !
Take what I advise as advice not the utopian holy grail, and it is gratis !!