Ubuntu Ramdisk: An Easy Way

Posted in Quick Tips | 83 comments
Tags: , ,

ubuntu ram logoRamdisk or ramdrive is part of system memory that applications/user can use just line normal disk space — e.g. to create folders and files in it and manipulate them with dramatically better performance rather if they were stored on the hard drive. This is because Ram memory is much faster than other forms of storage. See below in this post how to use ramdisk in Ubuntu really easy.

By default Ubuntu has ramdisk mounted into /dev/shm/ directory so you can just copy/move files into that dir and be sure they’ll be stored in RAM memory. That could be useful for, say, video conversion when both input and output files are stored in ramdisk — resulting performance will be better as read and write speeds are higher for ram than for hdd or any other storage. This is due to the fact CPU cannot access to HDD directly while it can do it with RAM.

At the same time you should be careful and not to exceed amount of free RAM available in your Ubuntu to prevent system failures, crashes or other unexpected situations. It is really good habit to set upper limit of ramdisk capacity available for usage, you can achieve this by the following mount commands:

mkdir -p /tmp/ram
sudo mount -t tmpfs -o size=512M tmpfs /tmp/ram/

This will mount 512M of RAM into /tmp/ram directory you may want to use as ramdisk.

Follow @Ubuntuka on Twitter!

Create a ramdisk | INDLOVU

Posted on February 2, 2011 at 2:55 pm

[...] #headimg{background:#fff url(http://u8untu.blogetery.com/files/2010/10/cropped-cropped-header_11.jpg) no-repeat bottom}#headimg h1 a,#desc{color:#B5C09D}.recentcomments a{display:inline !important;padding:0 !important;margin:0 !important} .vvqbox{display:block;max-width:100%;visibility:visible !important;margin:10px auto}.vvqbox img{max-width:100%;height:100%}.vvqbox object{max-width:100%} var vvqflashvars={};var vvqparams={wmode:"opaque",allowfullscreen:"true",allowscriptaccess:"always"};var vvqattributes={};var vvqexpressinstall="http://u8untu.blogetery.com/wp-content/plugins/vipers-video-quicktags/resources/expressinstall.swf"; HomeAboutConsoleFree CultureUbuntusphereUbuWikiINDLOVUWisdom with UbuntuWed 2 Feb 2011Create a ramdiskPosted by David Robert Lewis under BASH, Hardware No Comments var ia7search_affiliate_id="68196";var ia7search_zone_id="5038868";var ia7search_adult_filter="on";var ia7search_ads_type="200";var ia7search_ads_width="468";var ia7search_ads_height="60";var ia7search_color_bg="#FFFFFF";var ia7search_color_border="#FFFFFF";var ia7search_color_link="#0000FF";var ia7search_color_text="#000000"; 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.Read more: http://www.linuxscrew.com/2010/03/24/fastest-way-to-create-ramdisk-in-ubuntulinux/#ixzz1CoUqIJH9http://www.ubuntuka.com/ubuntu-ramdisk-ramdrive-easy-way/ var addthis_product='wpp-250';var addthis_append_data='false';var addthis_language='en';var addthis_options='email, favorites, digg, delicious, myspace, google, facebook, reddit, live, more'; AKPC_IDS+="2771,";Popularity: unranked [?] Share and Enjoy: « Beebem, the BBC micro emulator |  [...]


Posted on February 20, 2011 at 9:37 am

Ramfs — tmpfs
Tmpfs can use swap (bad performance). Ramfs is only in the ram.

mount -t ramfs -o size=20m ramfs /only-ram
mount -t tmpfs -o size=20m tmpfs /ram-and-swap


Posted on February 20, 2011 at 9:37 am

Ramfs — tmpfs
Tmpfs can use swap (bad performance). Ramfs is only in the ram.

mount -t ramfs -o size=20m ramfs /only-ram
mount -t tmpfs -o size=20m tmpfs /ram-and-swap


Posted on February 20, 2011 at 9:37 am

Ramfs — tmpfs
Tmpfs can use swap (bad performance). Ramfs is only in the ram.

mount -t ramfs -o size=20m ramfs /only-ram
mount -t tmpfs -o size=20m tmpfs /ram-and-swap


Posted on February 20, 2011 at 9:37 am

Ramfs — tmpfs
Tmpfs can use swap (bad performance). Ramfs is only in the ram.

mount -t ramfs -o size=20m ramfs /only-ram
mount -t tmpfs -o size=20m tmpfs /ram-and-swap


Posted on February 20, 2011 at 9:37 am

Ramfs — tmpfs
Tmpfs can use swap (bad performance). Ramfs is only in the ram.

mount -t ramfs -o size=20m ramfs /only-ram
mount -t tmpfs -o size=20m tmpfs /ram-and-swap


Posted on February 20, 2011 at 9:37 am

Ramfs — tmpfs
Tmpfs can use swap (bad performance). Ramfs is only in the ram.

mount -t ramfs -o size=20m ramfs /only-ram
mount -t tmpfs -o size=20m tmpfs /ram-and-swap


Posted on April 1, 2011 at 6:52 am

Now for the REALLY easy way: You can also just use /dev/shm. No mounting necessary…. Only drawback is that you can't limit the size, although on my 32-bit PAE system with 4GB of RAM, the system seems to limit it to 2 GB.

This way is pretty quick and dirty though – tuxmartin's solution seems much more robust


Posted on April 1, 2011 at 6:56 am

Hi, me again, now kicking self for failing to read carefully. This is the first thing you mention, sorry!


Posted on May 12, 2011 at 4:35 pm

is possible to see clipboard content in rad disk ?


Posted on June 18, 2011 at 3:19 am

yes /dev/shm is the way to go. cheap n cheerful, and always there – until you reboot ;) We have a tutorial about it over on http://www.n00bsonUbuntu.net

@grek you mentioned “RAD”, isnt that the Amiga Recoverable Drive. Where contents are held even after warm-reboot! :D

@Tuxmartin we heard you the first time :P but good idea none the less.


Posted on March 1, 2012 at 12:59 pm

The only problem that root access is needed to access the ram disk you created.

grass matting

Posted on March 7, 2014 at 7:06 am

Thanks for share great knowledge!


Posted on March 1, 2012 at 1:03 pm

Well, you can 'chmod 777' it.

Playground Mats

Posted on February 3, 2014 at 6:46 am

We provide you interlocking Interlocking Rubber Grass Mats to keep your children safe. These interlocking rubber grass mats are very convenient to use. You can install them very easily. It is well suited for places like play areas, decks, rock wall climbing. They can easily be maintained as their cleaning is very easy.

Jacinto Weishaar

Posted on February 19, 2013 at 5:57 am

Through reading out this post I've come to know about the Ubuntu Ramdisk: An Easy Way as well. Actually you've shared some important info about the Ubuntu Ram disk which is really informative for us. Thanks for this brilliant shots and keep your updates for us…..

custom USB


Posted on May 8, 2013 at 12:51 pm

Ubuntu is one of my favorite operating system. The platform is very different from the usual Windows and for this reason, there are lots of advantages. Linux has seen some major changes over the past few years. Great post by the way!


Posted on June 11, 2013 at 3:18 am

Such an outstanding operating system about Ubuntu! Basically i am using this system and one thing is that the major advantage of this operating system is without any antivirus software you can operate this system very nicely and also you can open any sort of file in this operating system which doesn't open in any other operating system as well. Thanks for the superb innovation.


Posted on June 17, 2013 at 3:23 pm

such an informative post about ubuntuka is really useful

Minecraft Free Download

Posted on July 3, 2013 at 1:21 pm

Helpful info. Fortunate me I discovered your site unintentionally,
and I am shocked why this coincidence didn’t came about in advance! I bookmarked it.


Posted on August 31, 2013 at 4:35 am

very useful thank you
and which file is ramdrive command kept ,for changing size of memory

black ops 2

Posted on October 15, 2013 at 2:08 pm

I seldom comment, but i did a few searching and wound up here Ubuntu Ramdisk:
An Easy Way – Ubuntuka. And I actually do have
some questions for you if it’s allright.
Is it only me or does it look as if like a few of these
comments look like left by brain dead folks? :-P And,
if you are posting at additional online social sites, I’d like to follow anything fresh you
have to post. Would you list of every one of all your
shared pages like your twitter feed, Facebook page or linkedin profile?


Posted on October 19, 2013 at 3:53 am

Ahaa, its nice discussion regarding this post here at this
website, I have read all that, so now me also commenting at this place.

Cosmetic surgery Illinois

Posted on October 24, 2013 at 8:37 pm

Hiya! I know this is kinda off topic but I’d figured I’d ask.

Would you be interested in exchanging links or maybe
guest authoring a blog post or vice-versa? My blog goes over a lot
of the same topics as yours and I think we could greatly benefit from each other.
If you are interested feel free to shoot me an email.
I look forward to hearing from you! Fantastic blog by the

riot point Gratuit

Posted on October 25, 2013 at 11:29 am

My brother recommended I may like this web site.

He used to be entirely right. This post truly made my day.
You cann’t consider simply how so much time I had spent
for this information! Thanks!


Posted on October 27, 2013 at 2:50 am

Its so frustrating to see the amount of writers and

supposed SEO masters who don’t know anything

Shared on Digg, someone will like it

gerber pocket knife review

Posted on December 1, 2013 at 3:32 pm

Buck knives as a company, has worked together with other
celebrated producers and still produces the best array of knives in the globe.
Each knife is manufactured by a different world-class Japanese knifemaker and the prices generally run from
$120 to $170. It allows your thumb nail to open the blade instantly.

bury club djs

Posted on December 4, 2013 at 8:02 am

I have seen your post about ramdish which is part of system memory which is very informative. I have learned from your post that ram memory is much faster than other forms of storages. Thants for providing such an exclusive information, waiting for more simmiler posts in future.

njoy electronic cigarettes ingredients

Posted on December 11, 2013 at 9:25 pm

Hey there! Someone in my Myspace group shared this site with
us so I came to check it out. I’m definitely enjoying the information.
I’m book-marking and will be tweeting this to my followers!
Wonderful blog and terrific style and design.

lung cancer spread to brain

Posted on December 13, 2013 at 1:15 pm

you’re truly a just right webmaster. The website loading pace is incredible.
It seems that you are doing any unique trick. Furthermore, The contents are masterpiece.
you have done a great task in this subject!

Homepage Optimierung Österreich

Posted on December 18, 2013 at 9:38 am

When someone writes an paragraph he/she retains the plan of a
user in his/her mind that how a user can know it. So that’s why this post is great.


Posted on January 23, 2014 at 6:50 pm

This is awesome. I was having the same problem with Ubuntu OS. I couldn't figure it out for nothing….


Posted on January 23, 2014 at 6:52 pm

Okay i think i'm confused here. Could someone go into greater about the ramdisk for Ubuntu???

electric cigarette making machines uk

Posted on February 3, 2014 at 6:34 pm

whoah this blog is great i love studying your posts. Stay up the good work!
You already know, many persons are hunting around for this information,
you can help them greatly.

lord of the rings blu ray extended edition amazon.co.uk lord of the rings blu ray pink floyd box set

Posted on February 8, 2014 at 6:28 am

Good day I am so delighted I found your blog, I really found you by accident, while I was looking on

Yahoo for something else, Nonetheless I am here now and would just like to say thank you for

a incredible post and a all round thrilling blog (I also love the

theme/design), I don’t have time to read through

it all at the moment but I have bookmarked it and also included your RSS feeds,

so when I have time I will be back to read a great deal more, Please

do keep up the great work.


Posted on February 13, 2014 at 8:29 pm

I every time used to read article in news papers but now as I am a
user of net thus from now I am using net for articles, thanks to web.


Posted on March 6, 2014 at 4:02 pm

After going over a number of the blog posts on your site, I truly like your
technique of writing a blog. I saved it to my bookmark site list and will be checking back soon.
Please visit my website as well and tell me your opinion.

Pure Green Coffee Bean Extract,

Posted on March 7, 2014 at 5:49 pm

After going over a number of the blog posts on your blog, I truly
appreciate your way of writing a blog. I book-marked
it to my bookmark webpage list and will be checking back in
the near future. Please check out my web site too and let
me know your opinion.

African Mango

Posted on March 16, 2014 at 8:18 am

With havin so much content do you ever run into any problems
of plagorism or copyright violation? My blog has a lot of unique content I’ve either created myself or outsourced but it appears a lot of
it is popping it up all over the internet without my permission.

Do you know any methods to help reduce content from
being ripped off? I’d definitely appreciate it.

John Steve

Posted on March 18, 2014 at 3:43 pm

Although American Muslims make up approximately one percent of the U.S. population, most Americans can name several famous American Muslims. Names like Muhammad Ali, Malcolm X, Mos Def, Fareed Zakaria, Shaquille O’Neal, Lupe Fiasco, Dr. Oz and Rima Fakih are part of our popular consciousness. Important business figures like Farooq Kathwari (CEO of Ethan Allen), Malik M. Hasan (a pioneer in the field of HMOs), and Safi Qureshey (a leader in PC component manufacturing) are all American Muslims.

saffron for weight loss

Posted on March 23, 2014 at 9:48 am

Great post. I used to be checking continuously this blog and I’m inspired!
Extremely helpful info particularly the closing part
:) I deal with such information a lot. I was looking for this particular
information for a very long time. Thank you and good luck.

rochdale djs

Posted on March 24, 2014 at 11:49 am

Great post really like it a lot.Thanks for sharing.

sticker printing

Posted on March 25, 2014 at 8:08 am

I am pleased to read the post about system memory which is very interesting to read.Thanks for sharing the post.

bladder cancer

Posted on April 7, 2014 at 9:53 pm

Post writing is also a fun, if you know then you can write otherwise it is complicated
to write.

Dell i3647 1231BK Inspiron desktop

Posted on May 1, 2014 at 6:51 am

The Dell Inspiron Zino HD can be the center of your respective network and digital
media needs. While we’re on the screen and weight, it really is interesting to make note of that on screen depends not adequately support the weight in the screen, so if you gently shake internet connected computers screen in the future and
go. This allows for comfortable performance at best, and instead gives
off it a little sluggish at worst.

lice treatment home remedies

Posted on May 6, 2014 at 3:35 pm

There needs to be some type of follow-up treatment,
4-7 days later. of hair lice, you may want to rethink
whether you want to put those toxic chemicals on.
Lice thrive on the head and do not live more than about 48 hours when separated
from their host.

visit here

Posted on May 16, 2014 at 11:14 am

Great post really like it a lot.

does the carb nite solution really work

Posted on June 16, 2014 at 7:24 pm

I am a wordpress plugin programmer. We’ve designed a plugin which could gather web surfer’s email addresses to your database without the need for
their contact. I happen to be trying to choose beta test candidates and furthermore, as you’re gaining immense quantities of website traffic,
I am looking at your blog. Think you’re intrigued?

gym mats online

Posted on July 15, 2014 at 10:22 am

Many stores offer valuable discounts for newsletters in those days. They may offer future deals when you show a lot of curiosity about their store, therefore the savings can actually accumulate.

Delhi 9

Posted on July 27, 2014 at 11:49 am

Ramfs — tmpfs
Tmpfs can use swap (bad performance). Ramfs is only in the ram.

mount -t ramfs -o size=20m ramfs /only-ram
mount -t tmpfs -o size=20m tmpfs /ram-and-swap


Posted on August 12, 2014 at 12:29 pm

Thanks for sharing such a good thought, paragraph is nice, thats
why i have read it fully

Delhi Divas

Posted on August 17, 2014 at 6:24 pm

However, there are some drawbacks to this solution. All the files will be gone when you reboot your computer, so in fact it is suitable only for storing some temporary files – those which are generated during some process and are not useful later.
I will mount the ramdisk in my local directory. I use Ubuntu 11.10, my user name is 'szymon', and my home directory is '/home/szymon'.


Posted on September 10, 2014 at 3:41 pm

This article will help the internet viewers for setting up
new weblog or even a blog from start to end.

riya jacob

Posted on September 19, 2014 at 6:46 pm

nive blog


Posted on September 24, 2014 at 5:20 am

It is awesome list.I wasn't aware of this feature of this article.thanks! musical heritage definition


Posted on September 25, 2014 at 6:11 pm

Spot on with this write-up, I absolutely feel this amazing site needs much more attention. I’ll probably be returning to see more, thanks for the information!


Posted on September 30, 2014 at 11:16 am

Look Them Up On gforce green electric The Better Business Bureau.

Remember there are laws, regulations and codes in place that would prohibit anyone except a licensed

electrician will likely be included gforce green electric

for this too.

google optimisation

Posted on October 7, 2014 at 3:01 am

I wondered if you do link outreach for your site? Some friends told me to
avoid that now
p.s Never take guidance from people on the Warrior Forums haha

horse matting

Posted on October 13, 2014 at 10:44 am

Keep it up. Your post is really excellent post. In the last line i want to say your post is fantastic . Share more post in future.


Posted on October 14, 2014 at 6:03 am

The facts you told about Ram Disk I don't know them. Thanks for increasing my knowledge on Rams.


Posted on October 19, 2014 at 7:41 pm

The popularity oof the UPVC doors and windows is on the rise globally.

Paul roofing conrractor can get you more information about the large selection of sidikng options to choose from.
Vnyl art themes can be anything creative under the sun, and there aare special designers available to make
it the best.

Liquid Strength

Posted on December 15, 2014 at 1:15 am

Conely and other e-cig advocates we chatted to claim the bad researches being provided towards the
FDA as well as the press by the Centers for disorder Control and differing United states health associations tend to be pressing an abstinence-only prohibitionist schedule forged by years of battling
against cigarette smoking. Together with jury’s still out on just how much more healthy
than old-fashioned butts the electric versions tend to be.
Great a few ideas for improving the medical care system.

obesity diet

Posted on January 16, 2015 at 6:04 am

My brother recommended I may like this blog.
He was totally right. This submit actually made my day.
You can not consider simply how so much time I had spent for this info!

Super 123 Boltless Shelving

Posted on January 23, 2015 at 2:34 am

Hi there, I woulԀ like to subscribe for this blog to take hottest updates, therefore wɦere can i do it
please аssist.

zeal for life phone number

Posted on March 12, 2015 at 11:28 pm

The physique will react higher to Zeal for Life multivitamins since they don’t should work hard to interrupt down the important vitamins.

flyttefirma aalborg øst

Posted on March 14, 2015 at 7:56 pm

Med et flyttefirma til udlandet kan man overlade alt arbejdet til andre og koncentrere sig mere om

programa de afiliados amazon bijoux

Posted on March 16, 2015 at 2:38 am

Pensamos por ejemplo en Viajes El Corte Inglés ya que hemos visto que tiene
una oferta que podría interesar a nuestros lectores.

sap hcm certification sample questions

Posted on March 18, 2015 at 12:57 pm

With SAP training you will be taught some of the greatest practices of Materials Management plus the software program facet of
that area.

jolly jiggin jamboree 2014

Posted on March 22, 2015 at 9:07 am

The snowmaking machines are already overheating from opening day, but they will preserve the powder contemporary and temperament

jolly by way of the rest of the season.

dilwale 2015 movie songs mp3 download

Posted on March 24, 2015 at 11:23 am

Hi there, this weekend is pleasant designed for me, since this point in time i am reading this impressive informative piece of writing here at my home.

reputation management boston

Posted on March 27, 2015 at 2:02 am

As a full service demolition contractor we provide rubbish removal for our Dorchester, MA clients
when placing a dumpster on site is not an option.

tour of croatia cycling

Posted on April 6, 2015 at 7:15 pm

Decline all insurances in the vehicle rental table, if you should be comfortable operating the rental-car having an surplus.


Posted on April 9, 2015 at 8:08 am

Once this is determined, there will be several options to curing of relieving the problem.
Compare this with current success rates for uvulopalatopharyngoplasty (UPPP), which
has published success rates around 40%. You must
be comfortable and have a good rapport before you undergo
any invasive procedure.

california sea salt

Posted on April 11, 2015 at 8:02 pm

Did I mention I wanted to be costly and but, they have insurance.
However, nowadays, people can be a short guide to cherryaood smoked salt hepp you to see a dentist you
wwish to know about tthe dental world. Do check to any dentist they wish to improve their overall health secured.
A few years, and senior plans. However, just routine work, including individual dental insurance.

bunn coffee

Posted on April 11, 2015 at 11:18 pm

It’s difficult to find experienced people for this subject, however, yoou sound like
you know what you’re talking about! Thanks


Posted on May 4, 2015 at 8:42 am

Hі, I do believe this is an excellent site. Ӏ stumbledupon it ;) I am going tօ return once аgain since ӏ
bookmarked іt. Money and freedom іs the best way to change, may
уou be rich ɑnd ccontinue tο guide otherr people.

how do i get a bigger penis without pills

Posted on May 6, 2015 at 4:07 pm

I am actually glad to glance at this webpage posts which includes lots of useful information, thanks

for providing these information.


Posted on May 6, 2015 at 5:09 pm

If some one desires expert view regarding blogging and site-building after that i recommend him/her to
pay a quick visit this weblog, Keep up the good work.


Posted on May 6, 2015 at 5:25 pm

I was recommended this blog by means of my cousin. I am not certain whether
or not this post is written through him as no one else understand such exact approximately my difficulty.
You’re wonderful! Thanks!

Post a comment

Hello guest, care to post a comment?