• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Running an OS from Memory

Quaggoth

Senior member
If I had a 512 MB Dimm and created, say, a 400 MB ramdrive, would there be a way to then write an image to that ramdrive and then boot from the ramdrive? The problem I can't seem to find a way around is the fact that I will have a command interpreter loaded already just to be able to create the ramdrive and put an image on it. How do I then load windows? Is this even possible? Will it realy improve speed? Would it be better to create the drive after windows loads from a regular drive and image a game to it? I would like to do this realy just to say I have and to maybe see if there is really a good use for it.

Also, for you Linux guru's...

Can I do this with Linux?
 
Heh, from the linux perspective...SURE YOU CAN! I don't know the exact procedure but I know it is possible...you probably need to look up ramdisk in the Linux Documentation Project or find somebody that has done it or knows exactly how to post a proceedure.
 
For Linux.. Of course. 🙂

But, why? The way linux does memory caching, would make a ramdisk nearly useless. The amount of time saved loading files at boot-up, would easily be negated by the amount of time loading *ALL* files into the RAM drive before the boot. After the boot, the most commonly used files will stay in cache, and those you no longer hit, will be dropped. This allows for more effective memory management because your memory isn't being tied up by a bunch of files you'll never use. Of course, it would greatly improve speed for the FIRST time a file is accessed, but after that it would actually be slower. 🙂

Linux is extremely effective at memory caching. I've discussed this topic at great length for webserving, since I always though it would be a good idea to put the most popular sites on a large RAMdisk. It wouldn't be, because if those sites/files are accessed so often, they will remain in the memory cache. This way you don't have those backup files customers never see, using up precious and expensive memory.

In short, it used to offer great benefits. But now, at least under Linux, it offers minimal at best, and in most cases performance drops.

peace,

-Phil
 
Thanks for da tips boys. Anyway, I had suspected as much. Is there a way then, to tell the OS (Either win or lin) that "Hey, I have a whole bunch of ram, could you maybe remember the things I usually run after my PC boots and maybe just load that stuff in the background after you boot so that it WILL be there the first time I run it??"
 
It should (pretty much) allready do this.

a simple way to see how much is being cached, is to type free on the command line.

I'll disect the output a little bit below.. Beware my understanding of this is not 100%. 🙂

fire:~# free
total used free shared buffers cached
Mem: 776904 612856 164048 56080 185684 362600
-/+ buffers/cache: 64572 712332
Swap: 130748 508 130240

Now..

Total = Well, total available system memory.
Used = what is currently being utilized by anything, programs, cache, buffers, whatever.
Free = what is NOT being used by ANYTHING. Absolutely nothing resides in this space.
Shared = Someone with a bit more knowledge should explain this.. basically this is what is in-use by applications/kernel/whatnot. That is MY understanding however
Buffers = Again, not quite sure what this is, the name says it all, but I can't define it more than that.
Cached = How much memory is being used for caching. As you can see, it's a very high percentage of the total memory pool. 363MB is being used here..
the -/+ buffers/cache line stands for how much would be in use if you counted the buffers/cache as free memory.. as you can see they make up for the majority of RAM "usage".

Swap is disk swap. Only reason theres something in there, is I had something rather intensive going (this machine hosts memepool.com, and can get literally thousands of queued mail messages within minutes, even when it bursts to sending 100 messages/second) and it hit swap. That will remain in swap until whatever is using it exits. who knows.

hope this explains a bit more. 😛 hopefully someone with a bit more knowledge in this subject will intercede if I made any blatantly wrong points.

-Phil
 
Back
Top