onecurlyalex
Posts: 3
Joined: Thu Aug 16, 2012 5:52 am

Adding RAM to Pi

Thu Aug 16, 2012 5:55 am

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?

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 32227
Joined: Sat Jul 30, 2011 7:41 pm

Re: Adding RAM to Pi

Thu Aug 16, 2012 7:13 am

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.

onecurlyalex
Posts: 3
Joined: Thu Aug 16, 2012 5:52 am

Re: Adding RAM to Pi

Thu Aug 16, 2012 7:26 am

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?

User avatar
rurwin
Forum Moderator
Forum Moderator
Posts: 4257
Joined: Mon Jan 09, 2012 3:16 pm

Re: Adding RAM to Pi

Thu Aug 16, 2012 7:45 am

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.

onecurlyalex
Posts: 3
Joined: Thu Aug 16, 2012 5:52 am

Re: Adding RAM to Pi

Thu Aug 16, 2012 7:47 am

Ok, thank you

james968
Posts: 29
Joined: Tue Jul 17, 2012 8:52 am

Re: Adding RAM to Pi

Thu Aug 16, 2012 8:32 am

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.).

User avatar
RaTTuS
Posts: 10828
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: Adding RAM to Pi

Thu Aug 16, 2012 8:39 am

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
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

brainsys
Posts: 206
Joined: Fri Jun 29, 2012 7:16 pm

Re: Adding RAM to Pi

Thu Aug 16, 2012 12:44 pm

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.

blavery
Posts: 95
Joined: Sun Jul 01, 2012 2:57 am
Location: QLD. Australia

Re: Adding RAM to Pi

Thu Aug 16, 2012 1:25 pm

>>> 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 ...>

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: Adding RAM to Pi

Thu Aug 16, 2012 2:04 pm

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.
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)

User avatar
RaTTuS
Posts: 10828
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: Adding RAM to Pi

Thu Aug 16, 2012 2:27 pm

yes there is ... and he's a post to help :-
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

stevech
Posts: 144
Joined: Sun Jul 15, 2012 11:53 pm

Re: Adding RAM to Pi

Fri Aug 17, 2012 4:19 am

object oriented programming leads to code size bloat.

User avatar
jackokring
Posts: 818
Joined: Tue Jul 31, 2012 8:27 am
Location: London, UK

Re: Adding RAM to Pi

Fri Aug 17, 2012 4:28 am

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

Brian_Entei
Posts: 1
Joined: Fri Dec 28, 2012 10:18 am

Re: Adding RAM to Pi

Fri Dec 28, 2012 10:24 am

What about a usb flash drive, like with Windows XP or 7? I think it should be much simpler. Any ideas?

yvonnezoe
Posts: 127
Joined: Thu Feb 14, 2013 2:10 am

Re: Adding RAM to Pi

Mon Jun 10, 2013 9:13 am

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.
Just started my Raspberry Pi journey >> http://yvonnezoe.wordpress.com

Heater
Posts: 19434
Joined: Tue Jul 17, 2012 3:02 pm

Re: Adding RAM to Pi

Mon Jun 10, 2013 9:30 am

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.
Slava Ukrayini.

Jezmo
Posts: 34
Joined: Tue Jun 04, 2013 1:08 pm

Re: Adding RAM to Pi

Mon Jun 10, 2013 9:48 am

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

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 32227
Joined: Sat Jul 30, 2011 7:41 pm

Re: Adding RAM to Pi

Mon Jun 10, 2013 10:49 am

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.
Principal Software Engineer at Raspberry Pi Ltd.
Working in the Applications Team.

AnthonyClemens
Posts: 7
Joined: Tue Aug 06, 2013 12:36 pm

Re: Adding RAM to Pi

Tue Aug 06, 2013 12:45 pm

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

User avatar
RaTTuS
Posts: 10828
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: Adding RAM to Pi

Tue Aug 06, 2013 12:54 pm

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
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

jehamann
Posts: 35
Joined: Sun Jun 16, 2013 11:36 pm

Re: Adding RAM to Pi

Wed Aug 20, 2014 8:42 pm

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

riklaunim
Posts: 269
Joined: Tue Apr 22, 2014 7:34 pm

Re: Adding RAM to Pi

Wed Aug 20, 2014 8:45 pm

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).

User avatar
pluggy
Posts: 3635
Joined: Thu May 31, 2012 3:52 pm
Location: Barnoldswick, Lancashire,UK

Re: Adding RAM to Pi

Wed Aug 20, 2014 9:01 pm

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......

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: Adding RAM to Pi

Wed Aug 20, 2014 9:05 pm

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)
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)

fruitoftheloom
Posts: 27225
Joined: Tue Mar 25, 2014 12:40 pm

Re: Adding RAM to Pi

Wed Aug 20, 2014 9:11 pm

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 !!

Return to “General discussion”