Page 1 of 3

Adding RAM to Pi

Posted: Thu Aug 16, 2012 5:55 am
by onecurlyalex
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

Posted: Thu Aug 16, 2012 7:13 am
by jamesh
No, because it won't work (or will work so slowly as to be useless).

Re: Adding RAM to Pi

Posted: Thu Aug 16, 2012 7:26 am
by onecurlyalex
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

Posted: Thu Aug 16, 2012 7:45 am
by rurwin
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.

Re: Adding RAM to Pi

Posted: Thu Aug 16, 2012 7:47 am
by onecurlyalex
Ok, thank you

Re: Adding RAM to Pi

Posted: Thu Aug 16, 2012 8:32 am
by james968
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.).

Re: Adding RAM to Pi

Posted: Thu Aug 16, 2012 8:39 am
by RaTTuS
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

Re: Adding RAM to Pi

Posted: Thu Aug 16, 2012 12:44 pm
by brainsys
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.

Re: Adding RAM to Pi

Posted: Thu Aug 16, 2012 1:25 pm
by blavery
>>> 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 ...>

Re: Adding RAM to Pi

Posted: Thu Aug 16, 2012 2:04 pm
by Joe Schmoe
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.

Re: Adding RAM to Pi

Posted: Thu Aug 16, 2012 2:27 pm
by RaTTuS
yes there is ... and he's a post to help :-
http://www.raspberrypi.org/phpBB3/viewt ... 62&t=14705

Re: Adding RAM to Pi

Posted: Fri Aug 17, 2012 4:19 am
by stevech
object oriented programming leads to code size bloat.

Re: Adding RAM to Pi

Posted: Fri Aug 17, 2012 4:28 am
by jackokring
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.

Re: Adding RAM to Pi

Posted: Fri Dec 28, 2012 10:24 am
by Brian_Entei
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

Posted: Mon Jun 10, 2013 9:13 am
by yvonnezoe
it's in the FAQ
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.

Re: Adding RAM to Pi

Posted: Mon Jun 10, 2013 9:30 am
by Heater
stevech,
object oriented programming leads to code size bloat.
No it does not. Or at least it need not. This is a common myth.

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.

Re: Adding RAM to Pi

Posted: Mon Jun 10, 2013 9:48 am
by Jezmo
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

Posted: Mon Jun 10, 2013 10:49 am
by jamesh
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
What is?

Although excellent thread resurrection - this one was 6 months old.

Re: Adding RAM to Pi

Posted: Tue Aug 06, 2013 12:45 pm
by AnthonyClemens
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.

Re: Adding RAM to Pi

Posted: Tue Aug 06, 2013 12:54 pm
by RaTTuS
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

Re: Adding RAM to Pi

Posted: Wed Aug 20, 2014 8:42 pm
by jehamann
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

Posted: Wed Aug 20, 2014 8:45 pm
by riklaunim
jehamann 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
You can't change the SoC design like that, but you can use one of many single board computers with stronger CPU/RAM/GPU/whatever ;) You can even use Android or iOS devices to some extent to make "internet of things" with compatible microcontroller boards (there are books for that even).

Re: Adding RAM to Pi

Posted: Wed Aug 20, 2014 9:01 pm
by pluggy
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).

Re: Adding RAM to Pi

Posted: Wed Aug 20, 2014 9:05 pm
by Joe Schmoe
Note that this question is basically equivalent to:
Can I add more than 1M of memory to my 8086 PC?
(Yes, I know that the real maximum is 640K, but it can address up to 1M)

(And yes, I am ignoring so-called "expanded" memory)

Re: Adding RAM to Pi

Posted: Wed Aug 20, 2014 9:11 pm
by fruitoftheloom
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 !