givemepi
Posts: 4
Joined: Mon Mar 05, 2012 8:55 pm

Re: Virtual Memory?

Mon Mar 05, 2012 9:14 pm

Will the Pi allow Virtual memory to be ran off of an external WD 500GB HD? I couldnt find any information on this topic.

User avatar
abishur
Posts: 4477
Joined: Thu Jul 28, 2011 4:10 am
Location: USA
Contact: Website

Re: Virtual Memory?

Mon Mar 05, 2012 9:37 pm

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
Dear forum: Play nice ;-)

gritz
Posts: 449
Joined: Sat Jan 28, 2012 2:33 am

Re: Virtual Memory?

Mon Mar 05, 2012 10:42 pm

[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

givemepi
Posts: 4
Joined: Mon Mar 05, 2012 8:55 pm

Re: Virtual Memory?

Mon Mar 05, 2012 10:47 pm

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.

plugwash
Forum Moderator
Forum Moderator
Posts: 3476
Joined: Wed Dec 28, 2011 11:45 pm

Re: Virtual Memory?

Tue Mar 06, 2012 1:32 am

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.

givemepi
Posts: 4
Joined: Mon Mar 05, 2012 8:55 pm

Re: Virtual Memory?

Tue Mar 06, 2012 1:39 am

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.

shiftyphil
Posts: 21
Joined: Thu Nov 17, 2011 12:32 am

Re: Virtual Memory?

Tue Mar 06, 2012 1:44 am

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.

ReCreate
Posts: 48
Joined: Wed Feb 01, 2012 4:51 pm

Re: Virtual Memory?

Tue Mar 06, 2012 1:51 am

edit: NOPE. I completely misread a post i was replying to. Ignore this. x3

plugwash
Forum Moderator
Forum Moderator
Posts: 3476
Joined: Wed Dec 28, 2011 11:45 pm

Re: Virtual Memory?

Tue Mar 06, 2012 2:09 am

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.

givemepi
Posts: 4
Joined: Mon Mar 05, 2012 8:55 pm

Re: Virtual Memory?

Tue Mar 06, 2012 2:16 am

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?

User avatar
mpthompson
Posts: 620
Joined: Fri Feb 03, 2012 7:18 pm
Location: San Carlos, CA
Contact: Website

Re: Virtual Memory?

Tue Mar 06, 2012 3:07 am

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.

User avatar
Jessie
Posts: 1754
Joined: Fri Nov 04, 2011 7:40 pm
Location: C/S CO USA

Re: Virtual Memory?

Tue Mar 06, 2012 3:08 am

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.

User avatar
mpthompson
Posts: 620
Joined: Fri Feb 03, 2012 7:18 pm
Location: San Carlos, CA
Contact: Website

Re: Virtual Memory?

Tue Mar 06, 2012 3:12 am

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.

Return to “General discussion”