Page 1 of 1

Re: Virtual Memory?

Posted: Mon Mar 05, 2012 9:14 pm
by givemepi
Will the Pi allow Virtual memory to be ran off of an external WD 500GB HD? I couldnt find any information on this topic.

Re: Virtual Memory?

Posted: Mon Mar 05, 2012 9:37 pm
by abishur
Well a swap partition (poe-tay-toe, poe-ta-toe) will be possible, but there's some debate on the usefulness of such a partition on a usb device.   Still, it's all academic until someone gives it a shot

Re: Virtual Memory?

Posted: Mon Mar 05, 2012 10:42 pm
by gritz
[caveat mode]Not knowing a massive amount about Linux or Arm (which is why I'm here) it may well be down to whether your Linux distribution of choice allows swap allocation on a removable drive. Sounds possible though

Re: Virtual Memory?

Posted: Mon Mar 05, 2012 10:47 pm
by givemepi
Yeah see that"s why I was thinking it would be possible. I"m a Ubuntu man myself but wasn"t sure if the Pi would support it. I guess we will see once everyone starts to get there"s.

Re: Virtual Memory?

Posted: Tue Mar 06, 2012 1:32 am
by plugwash
Pretty sure it will be possible and it will almost certainly perform better than on a SD card. In general though I would try to avoid swap if possible and if my problem couldn't fit into the Pis memory I would be seriously doubting whether the Pi was the right choice of device.

Re: Virtual Memory?

Posted: Tue Mar 06, 2012 1:39 am
by givemepi
Im pretty sure it has to boot from SD card for it to work. I believe I read that somewhere, but I could be wrong.

Re: Virtual Memory?

Posted: Tue Mar 06, 2012 1:44 am
by shiftyphil
It'll handle it fine; other than the in memory page-mapping and trapping of unmapped access, virtual memory is pretty much all software controlled.

Re: Virtual Memory?

Posted: Tue Mar 06, 2012 1:51 am
by ReCreate
edit: NOPE. I completely misread a post i was replying to. Ignore this. x3

Re: Virtual Memory?

Posted: Tue Mar 06, 2012 2:09 am
by plugwash
givemepi said:


Im pretty sure it has to boot from SD card for it to work. I believe I read that somewhere, but I could be wrong.



The GPU firmware, kernel and initrd have to be loaded off a SD card but I don't think anything else has to be.

Re: Virtual Memory?

Posted: Tue Mar 06, 2012 2:16 am
by givemepi
givemepi said:


Im pretty sure it has to boot from SD card for it to work. I believe I read that somewhere, but I could be wrong.


The GPU firmware, kernel and initrd have to be loaded off a SD card but I don"t think anything else has to be.

That would make sense. But if the OS isn"t on the SD card then how will you be able to delegate which boots first with no BIOS?

Re: Virtual Memory?

Posted: Tue Mar 06, 2012 3:07 am
by mpthompson
Abishur said:


Well a swap partition (poe-tay-toe, poe-ta-toe) will be possible, but there's some debate on the usefulness of such a partition on a usb device.   Still, it's all academic until someone gives it a shot


Well, my Slug (NSLU2) has a swap partition on a USB drive and it really helps as that is an ARM system running Debian with only 32Mb of RAM.  It don't see any reason it won't work fine with the Pi.  It's not ideal, but certainly better than nothing.

Re: Virtual Memory?

Posted: Tue Mar 06, 2012 3:08 am
by Jessie
givemepi said:


givemepi said:


Im pretty sure it has to boot from SD card for it to work. I believe I read that somewhere, but I could be wrong.


The GPU firmware, kernel and initrd have to be loaded off a SD card but I don"t think anything else has to be.

That would make sense. But if the OS isn"t on the SD card then how will you be able to delegate which boots first with no BIOS?


With a boot loader of some kind on the SD card.  After the blob is loaded from the SD just tell it to load the remaining files off a different drive.  It is true that there is no getting around having an SD card but only a couple files actually have to be on it, this has been discussed to death if you run a search.  Many of the lucky with Alpha and Beta boards have reported far better performance running off of USB sticks or USB HDDs than the SD card.   I'm sure there wil be tutorials shortly explaining or showing how this is done.  But it has already been done, so I know it is possible.

Re: Virtual Memory?

Posted: Tue Mar 06, 2012 3:12 am
by mpthompson
givemepi said:

That would make sense. But if the OS isn"t on the SD card then how will you be able to delegate which boots first with no BIOS?
Well, the OS is the kernel and the initrd is the initial boot RAM file system to get things started so those would in fact still be on the SD card.  It's just that the initrd would be configured to have the kernel mount the hard disk as the root file system and swap and then the SD card wouldn't be touched for anything else.