I hope many of you will agree that sometimes it’s really good idea to have some small amount of RAM mounted as a filesystem. It may be necessary when running some bash or perl script that handles, say, thousands of small files so it’s much more effective not to waste computer resources on reading/writing data on hard disk but keep those files directly in memory. This idea is known as Virtual RAM Drive or ramdisk and can be setup in Ubuntu or almost any other Linux distribution using the following commands under root (to become root in Ubuntu use "sudo -s“):

# mkdir /tmp/ramdisk; chmod 777 /tmp/ramdisk
# mount -t tmpfs -o size=256M tmpfs /tmp/ramdisk/

where 256M is amount of RAM you wish to allocate for ramdisk. It’s clear that this value should be less than amount of free memory (use “free -m“). BTW, if you specify too many MBs for ramdisk Linux will try to allocate it from RAM and then from swap so resulting performance would be very poor.

Beginners to the different linux kernels will find this article outlining the different versions of linux at Businesswebhostingplans.com very useful.

 

30 Comments

 

  1. March 22, 2013  9:16 pm by book flights ticket Reply

    Oh my goodness! Awesome article dude! Thank you so much, However I am going through issues with your RSS. I don't understand why I am unable to subscribe to it. Is there anybody getting similar RSS issues? Anybody who knows the answer can you kindly respond? Thanx!!| book flights ticket http://www.funtraveldeals.com/book-flights/

Leave a reply

 

Your email address will not be published.