NotebookForums.com › Forums › General Notebook Discussions › Linux & Other OS's › Ram Drive with Linux
New Posts  All Forums:Forum Nav:

Ram Drive with Linux

post #1 of 10
Thread Starter 
Has anyone ever set up a Ram Drive under Linux? If so, how involved is it? Is using a Ram Drive under Linux something which is easy to switch back and forth from i.e. is it something that can be chosen to configure at boot time? I'm interested in using a Ram Drive to improve the performance of some long C++ compiles by using it for the TMPDIR and as the location for other compiler generated files.

Dave
post #2 of 10
I would be interested in this as well. My compiles under Gentoo never use up my entire gig of RAM (let alone swap, ... why, oh, why does XP need 200MB of swap at boot? ) and it would probably be cool to do what Dave mentioned.

Mikhail
post #3 of 10
I found this link in a quick search of google. http://groups.google.com/groups?hl=e....uk%26rnum%3D6 second post down. It's kind of old but it might point you in the right direction.
post #4 of 10
Cool stuff, BSmith. Let us know if it works, Dave.
post #5 of 10
Thread Starter 
Quote:
Originally Posted by mmarkin
Cool stuff, BSmith. Let us know if it works, Dave.
Gotta get my laptop first.

Dave
post #6 of 10
post #7 of 10
Do you mean running the entire system off of ram, or just certain directories? Sometimes I mount certain directories into tmpfs if I want the speed. (for example, I mount /tmp and /var/tmp if I'm doing an emerge that doesn't require a lot of space)

You could use all sorts of scripts to do things like move the current contents of the directory into the ramdrive. But without that, the easiest way to do a ramdrive (for Gentoo users) is something like:

mount tmpfs /var/tmp/portage -t tmpfs -o size=256m

for a 256 meg tmpfs drive. And just umount it like any other mount when you're done.

The reason I say Gentoo users is because gentoo already requires a tmpfs drive to boot (/dev/shm), so you don't have to bother making one.

The one problem with tmpfs is that it's swappable, which you might not want. In that case, you'd probably have to use ramfs instead. But unless I'm mistaken, tmpfs shares its space with the rest of the ram, preventing a program from existing twice in memory, while ramfs doesn't. But I'm not really sure about that since I don't use ramfs.
post #8 of 10
Sweetness! Thanks Xiphux!
post #9 of 10
I wonder if he means one of those expensive Pu-Ram hard drives like this laptop:

http://www.go-l.com/laptops/studio_s...ures/index.htm
(and scroll down)

"It is also the first laptop ever made featuring PuRamâ„¢ Technology, configurable WITHOUT a System hard drive. These are lightening-fast, ultra low power consumption, zero noise Solid State Flash RamDisks where all operating system and program files sit permanently, operating at the same speed of the maximum available memory bandwidth, up to 6.4GB/s and capable of over 150,000 I/O requests per second. "
post #10 of 10
Probably not as that is simply insane - unless, ofcourse, you are loaded. RAM drives are just sections of RAM allocated for use by the OS like a normal hard drive.

Mikhail
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Linux & Other OS's
NotebookForums.com › Forums › General Notebook Discussions › Linux & Other OS's › Ram Drive with Linux