Zalkiaent
Posts: 19
Joined: Wed Dec 30, 2015 7:02 pm

Is it possible to upgrade RAM for the raspi?

Thu Feb 18, 2016 10:52 pm

The RasPi 2-b is rather powerful, but would it be really cool to upgrade it's RAM.
Maybe some type of GPIO hat or something that would allow a type of a RAM card. :|
This is just something charming that I thought of. :lol:
I don't expect it to work. :roll:

User avatar
GTR2Fan
Posts: 1601
Joined: Sun Feb 23, 2014 9:20 pm
Location: South East UK

Re: Is it possible to upgrade RAM for the raspi?

Thu Feb 18, 2016 10:53 pm

No.
Pi2B Mini-PC/Media Centre: ARM=1GHz (+3), Core=500MHz, v3d=500MHz, h264=333MHz, RAM=DDR2-1200 (+6/+4/+4+schmoo). Sandisk Ultra HC-I 32GB microSD card on '50=100' OCed slot (42MB/s read) running Raspbian/KODI16, Seagate 3.5" 1.5TB HDD mass storage.

W. H. Heydt
Posts: 13618
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Is it possible to upgrade RAM for the raspi?

Thu Feb 18, 2016 11:20 pm

Not only can you not increase the RAM on the Pi2B, but even if you could add RAM, the BCM2836 SoC can't address any more than it already has.

User avatar
mikronauts
Posts: 2817
Joined: Sat Jan 05, 2013 7:28 pm
Contact: Website

Re: Is it possible to upgrade RAM for the raspi?

Thu Feb 18, 2016 11:33 pm

Only way to get more memory: Buy a different single board computer that has more memory
Zalkiaent wrote:The RasPi 2-b is rather powerful, but would it be really cool to upgrade it's RAM.
Maybe some type of GPIO hat or something that would allow a type of a RAM card. :|
This is just something charming that I thought of. :lol:
I don't expect it to work. :roll:
http://Mikronauts.com - home of EZasPi, RoboPi, Pi Rtc Dio and Pi Jumper @Mikronauts on Twitter
Advanced Robotics, I/O expansion and prototyping boards for the Raspberry Pi

stderr
Posts: 2178
Joined: Sat Dec 01, 2012 11:29 pm

Re: Is it possible to upgrade RAM for the raspi?

Fri Feb 19, 2016 12:16 am

W. H. Heydt wrote:Not only can you not increase the RAM on the Pi2B, but even if you could add RAM, the BCM2836 SoC can't address any more than it already has.
But what if you just don't care about it being impossible, how would you do it anyway?

User avatar
mikronauts
Posts: 2817
Joined: Sat Jan 05, 2013 7:28 pm
Contact: Website

Re: Is it possible to upgrade RAM for the raspi?

Fri Feb 19, 2016 12:34 am

Step 1: Build an inter-dimensional alternate time line travel device
Step 2: Locate alternate timeline where it is possible to extend the ram
Step 3: Travel to alternate time line

*1,2,3 are left as an exercise for the reader
stderr wrote:
W. H. Heydt wrote:Not only can you not increase the RAM on the Pi2B, but even if you could add RAM, the BCM2836 SoC can't address any more than it already has.
But what if you just don't care about it being impossible, how would you do it anyway?
http://Mikronauts.com - home of EZasPi, RoboPi, Pi Rtc Dio and Pi Jumper @Mikronauts on Twitter
Advanced Robotics, I/O expansion and prototyping boards for the Raspberry Pi

stderr
Posts: 2178
Joined: Sat Dec 01, 2012 11:29 pm

Re: Is it possible to upgrade RAM for the raspi?

Fri Feb 19, 2016 12:50 am

mikronauts wrote:Step 1: Build an inter-dimensional alternate time line travel device
Step 2: Locate alternate timeline where it is possible to extend the ram
Step 3: Travel to alternate time line
Step 4: Bring back a huge sack of SoC chips
Step 5: Stick them on Raspberry Pi boards
Step 6: Start up Kickstarter campaign: "We have Raspberry Pi with 2 gig!"

And I figured someone would suggest some kind of page mode implemented in hardware on the board.

User avatar
Kratos
Posts: 395
Joined: Sun Apr 12, 2015 12:41 pm

Re: Is it possible to upgrade RAM for the raspi?

Fri Feb 19, 2016 1:06 am

mikronauts wrote:Step 1: Build an inter-dimensional alternate time line travel device
Step 2: Locate alternate timeline where it is possible to extend the ram
Step 3: Travel to alternate time line

*1,2,3 are left as an exercise for the reader
That is just awesome.
I have posted mostly with a Pi 2 running either Ubuntu MATE, or Raspbian.

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

Re: Is it possible to upgrade RAM for the raspi?

Fri Feb 19, 2016 3:16 am

stderr,
But what if you just don't care about it being impossible, how would you do it anyway?
Easy. First write an emulator for a 64 bit ARM processor, or perhaps a RISC V. Arrange that all the multiple gigabyes of the emulated processors RAM are actually stored on a USB stick or on some other machine connected via ethernet. Boot a 64 bit Linux on your emulator.

Perhaps performance might be a bit sluggish but with the right medication that should not be so bothersome.

Can it be done? Sure. That's how Linux was booted on an 8 bit AVR micro. http://dmitry.gr/index.php?r=05.Project ... 0on%208bit
Memory in C++ is a leaky abstraction .

ejolson
Posts: 6017
Joined: Tue Mar 18, 2014 11:47 am

Re: Is it possible to upgrade RAM for the raspi?

Fri Feb 19, 2016 5:23 am

stderr wrote:But what if you just don't care about it being impossible, how would you do it anyway?
Just add swap. Virtual memory addresses are 32 bits, which means 4GB. For example, in order to build a new version of GCC swap needs to be enabled because otherwise there is not enough memory. A sensible size for swap is about 2GB. Though you can use the sdcard for swap, I would recommend using a fast USB drive, preferably one with a 2GB cache built in.

Pithagoros
Posts: 578
Joined: Wed Nov 12, 2014 8:16 pm

Re: Is it possible to upgrade RAM for the raspi?

Fri Feb 19, 2016 7:44 am

I would write a quantum driver that would take advantage of yet undiscovered quantum states as the atomic nuclei in the silicon interact with gravitational waves. This approach would give me petabyte RAM of infinite speed.

User avatar
startrek.steve
Posts: 386
Joined: Thu Aug 30, 2012 7:19 pm

Re: Is it possible to upgrade RAM for the raspi?

Fri Feb 19, 2016 8:13 am

I remember when my mates and I used to mess about with windows 3.1 and we built a setup with more ram than Windows could handle, cant remember, but the max accessable memory was 512 mb I think, we built a pc with 1gb ram, we installed a driver that allowed the extra ram to be used as a ramdisk, so we had the original 512 mb swapping out to a hardware 512 mb swapfile on a ramdisk! It worked a treat! maybe this might be doable in the future on a Pi. Another party piece was installing a Vesa Local Bus IDE controller with 4 IDE channels and ram slots for cache. I installed 8mb onto it then booted Win 3.1, I quit windows back to dos then when I typed win, it loaded Windows completely from the IDE cache! less than a second.
Pi 2 running LibreElec Krypton, Pi 2 running Wheezy Desktop, Pi 1 headless Wheezy, downloading Radio, Pi 1 running Picore headless Media Server, Pi Zero to be an Old Time Radio Project. Pi 3 testing. Pi Zero W downloading Radio shows headless.

User avatar
karrika
Posts: 1266
Joined: Mon Oct 19, 2015 6:21 am
Location: Finland

Re: Is it possible to upgrade RAM for the raspi?

Fri Feb 19, 2016 8:23 am

ejolson wrote:
stderr wrote:But what if you just don't care about it being impossible, how would you do it anyway?
Just add swap. Virtual memory addresses are 32 bits, which means 4GB. For example, in order to build a new version of GCC swap needs to be enabled because otherwise there is not enough memory. A sensible size for swap is about 2GB. Though you can use the sdcard for swap, I would recommend using a fast USB drive, preferably one with a 2GB cache built in.
+1

This would actually work. Not a bad idea at all...

User avatar
GTR2Fan
Posts: 1601
Joined: Sun Feb 23, 2014 9:20 pm
Location: South East UK

Re: Is it possible to upgrade RAM for the raspi?

Fri Feb 19, 2016 10:29 am

karrika wrote:
ejolson wrote:Just add swap. Virtual memory addresses are 32 bits, which means 4GB. For example, in order to build a new version of GCC swap needs to be enabled because otherwise there is not enough memory. A sensible size for swap is about 2GB. Though you can use the sdcard for swap, I would recommend using a fast USB drive, preferably one with a 2GB cache built in.
+1

This would actually work. Not a bad idea at all...
It would work but, no matter how fast the 2GB cache was, you'd still be limited to around 25MB/s by the USB port. That's a tiny fraction of the transfer speed of the internal RAM. An overclocked SD card slot (dtoverlay=sdhost,overclock_50=100) can achieve nearly double that, and microSD cards like the Sandisk Extreme range have wear-levelling, so there's no need to worry about wearing one out in a hurry.

Can this all be sped up with the aid of a unicorn in some way?
Pi2B Mini-PC/Media Centre: ARM=1GHz (+3), Core=500MHz, v3d=500MHz, h264=333MHz, RAM=DDR2-1200 (+6/+4/+4+schmoo). Sandisk Ultra HC-I 32GB microSD card on '50=100' OCed slot (42MB/s read) running Raspbian/KODI16, Seagate 3.5" 1.5TB HDD mass storage.

User avatar
Jednorozec
Posts: 809
Joined: Sun Nov 24, 2013 2:17 pm
Location: Deposit, NY

Re: Is it possible to upgrade RAM for the raspi?

Fri Feb 19, 2016 10:51 am

GTR2Fan wrote:Can this all be sped up with the aid of a unicorn in some way?
Probably, as long as it's not that pink fluffy one dancing on rainbows.
The most important leg of a three legged stool is the one that's missing.
It's called thinking. Why don't you try it sometime?

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

Re: Is it possible to upgrade RAM for the raspi?

Fri Feb 19, 2016 11:48 am

Jednorozec wrote:
GTR2Fan wrote:Can this all be sped up with the aid of a unicorn in some way?
Probably, as long as it's not that pink fluffy one dancing on rainbows.
That one is quite slow compared with white sleek unicorns (like the ones from Legend, they are quite fast))
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

hippy
Posts: 8555
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Is it possible to upgrade RAM for the raspi?

Fri Feb 19, 2016 12:11 pm

W. H. Heydt wrote:Not only can you not increase the RAM on the Pi2B, but even if you could add RAM, the BCM2836 SoC can't address any more than it already has.
Would it not be possible to stack more RAM chips on top of the existing ones, unsolder the Chip Select lines and use some sort of address decoder combined with GPIO lines to create banked RAM ?

I don't know if that is possible and I doubt it would be worth doing given there's more to doing it than just having banked RAM but it's how things used to be done in the days of 8-bit micros.

Added: I had missed this in the comments ...
stderr wrote:And I figured someone would suggest some kind of page mode implemented in hardware on the board.
Yup :D

There is also that 'secondary bus' which is used for streaming VGA out of GPIO. I don't know if that could have RAM added to it.

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

Re: Is it possible to upgrade RAM for the raspi?

Fri Feb 19, 2016 2:28 pm

The AXI bus is controlled by the GPU, the ARM uses it.

Therefore to have some sort of chip select/banked arrangement, I think you would need to work on the GPU software to ensure that the ARM didn't bank switch whilst the GPU was using the memory.

It will be very VERY slow.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

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

Re: Is it possible to upgrade RAM for the raspi?

Fri Feb 19, 2016 3:05 pm

Using swap may be slow but sometimes you need the space and it's the difference between getting a job done at all or not.

When I wanted compile the Qt5 libs on the Pi it would not build without more memory space. I set up an NFS share to my PC and pointed the swap at that. The file space on the PC was memory mapped so the Pi ended up using the RAM of my PC for it's virtual RAM!

Somewhat faster than swap on an SD card, but not recommended for regular use.
Memory in C++ is a leaky abstraction .

W. H. Heydt
Posts: 13618
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Is it possible to upgrade RAM for the raspi?

Fri Feb 19, 2016 3:08 pm

startrek.steve wrote:I remember when my mates and I used to mess about with windows 3.1 and we built a setup with more ram than Windows could handle, cant remember, but the max accessable memory was 512 mb I think, we built a pc with 1gb ram, we installed a driver that allowed the extra ram to be used as a ramdisk, so we had the original 512 mb swapping out to a hardware 512 mb swapfile on a ramdisk! It worked a treat! maybe this might be doable in the future on a Pi. Another party piece was installing a Vesa Local Bus IDE controller with 4 IDE channels and ram slots for cache. I installed 8mb onto it then booted Win 3.1, I quit windows back to dos then when I typed win, it loaded Windows completely from the IDE cache! less than a second.
That still depends on the physical hardware being able to address the memory. On the BCM2835 and BCM2836, that is not the case, so your technique would not work. And, of course, Linux doesn't have that sort of memory limitation. Over a decade ago I built a Linux system around a pair of AMD Opteron 240 CPUs. It has 2GB of ECC RAM and I could have put more in the box had I wanted to spend the money (at the time, with a lot of hunting around for low prices, that was $500 worth of RAM).

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

Re: Is it possible to upgrade RAM for the raspi?

Fri Feb 19, 2016 3:17 pm

I thought 32bit linux was limited to 2GB for user space programs.

Or is that no longer the case? Or am I just wrong anyway?
Memory in C++ is a leaky abstraction .

ejolson
Posts: 6017
Joined: Tue Mar 18, 2014 11:47 am

Re: Is it possible to upgrade RAM for the raspi?

Fri Feb 19, 2016 5:56 pm

Heater wrote:I thought 32bit linux was limited to 2GB for user space programs.

Or is that no longer the case? Or am I just wrong anyway?
There is 4GB of virtual memory addresses. In both ARM and Intel 32bit architectures this amount is split between kernel and user space in order to avoid TLB cache flushes when switching modes. Originally 2GB was reserved for the kernel leaving 2GB for user space. I think the default these days is 1GB for kernel and 3GB for user space.

User avatar
morphy_richards
Posts: 1603
Joined: Mon Mar 05, 2012 3:26 pm
Location: Epping Forest
Contact: Website

Re: Is it possible to upgrade RAM for the raspi?

Fri Feb 19, 2016 8:07 pm

Heater wrote:stderr,
But what if you just don't care about it being impossible, how would you do it anyway?
Easy. First write an emulator for a 64 bit ARM processor, or perhaps a RISC V. Arrange that all the multiple gigabyes of the emulated processors RAM are actually stored on a USB stick or on some other machine connected via ethernet. Boot a 64 bit Linux on your emulator.

Perhaps performance might be a bit sluggish but with the right medication that should not be so bothersome.

Can it be done? Sure. That's how Linux was booted on an 8 bit AVR micro. http://dmitry.gr/index.php?r=05.Project ... 0on%208bit
Wow.wouldnt it be an interesting challenge to get Linux running on a BBC Micro.

User avatar
rpdom
Posts: 17723
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Is it possible to upgrade RAM for the raspi?

Fri Feb 19, 2016 8:49 pm

morphy_richards wrote:Wow.wouldnt it be an interesting challenge to get Linux running on a BBC Micro.
I'm pretty certain a vesion of Unix was available for the BBC Micro with at least one of the various experimental co-processors. I'm sure I saw one being tried out. There was also RiscIx (sp?) for an early ARM at some point too.

asandford
Posts: 1998
Joined: Mon Dec 31, 2012 12:54 pm
Location: Waterlooville

Re: Is it possible to upgrade RAM for the raspi?

Fri Feb 19, 2016 9:01 pm

rpdom wrote:
morphy_richards wrote:Wow.wouldnt it be an interesting challenge to get Linux running on a BBC Micro.
I'm pretty certain a vesion of Unix was available for the BBC Micro with at least one of the various experimental co-processors. I'm sure I saw one being tried out. There was also RiscIx (sp?) for an early ARM at some point too.
I thought the 32016 used some sort of unix, but apparently it didn't.

Also AVRs are (arguably) more powerful than a 6502, and it took 2 hours to boot on a 16MHz AVR, so how long on a 1MHz 6502?

Return to “General discussion”