Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
se7enOffline
Post subject: /tmp to ram?  PostPosted: 02.02.2011, 10:30



Joined: 2010-09-11
Posts: 164

Status: Offline
I read about that it is possible to mount your /tmp in the ram.
Does someone know if that makes sense and if how would I do that best.
 
 View user's profile Send private message  
Reply with quote Back to top
DonKultOffline
Post subject: RE: /tmp to ram?  PostPosted: 02.02.2011, 10:55
Team Member


Joined: 2010-09-02
Posts: 482

Status: Offline
Its pretty easy, you just need to add a line to /etc/fstab, but if its really beneficial depends on if you use (and how you use) /tmp. I doubt it has a practical gain for the "normal" user (but define "normal" now…)…

As always, there isn't a magical trick making a computer twice as fast - beside inserting new hardware maybe…

I do a lot of compiling on /tmp for example which is quiet handy from time to time as fileaccess is obviously a bit faster, but most of the time for the reason that i don't need to clean up after me as its magically auto-deleted.

_________________
MfG. DonKult
"I never make stupid mistakes. Only very, very clever ones." ~ The Doctor
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
dieresOffline
Post subject:   PostPosted: 02.02.2011, 11:29



Joined: 2010-09-12
Posts: 30

Status: Offline
if mount shows the following line:

tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)

isn't this just that you want to do?
have a look to http://en.wikipedia.org/wiki/Tmpfs
 
 View user's profile Send private message  
Reply with quote Back to top
towoOffline
Post subject:   PostPosted: 02.02.2011, 11:37



Joined: 2010-09-13
Posts: 497
Location: Pößneck / Thüringen
Status: Offline
      Code:
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)

is not enougth
      Code:
tmpfs                                         /tmp                           tmpfs           defaults,noatime,mode=1777                 0 0

mounts /tmp to ramdisk
 
 View user's profile Send private message  
Reply with quote Back to top
se7enOffline
Post subject:   PostPosted: 02.02.2011, 23:25



Joined: 2010-09-11
Posts: 164

Status: Offline
one ore question. what happens if I burn an 4gb dvd which creates an image in /tmp.
will that use up all my 4gb of ram?

_________________
Don't mention the war!
Meine Meinung steht fest! Bitte verwirren Sie mich nicht mit Tatsachen!
 
 View user's profile Send private message  
Reply with quote Back to top
slhOffline
Post subject:   PostPosted: 02.02.2011, 23:46



Joined: 2010-08-25
Posts: 736

Status: Offline
...keep in mind that regular use cases usually imply that you need at the very least enough space to store a DVD ISO image in /tmp/ and /var/tmp/, which amounts to >>4.5 GB RAM (and/ or nice little games with overcommiting through swap, but do you really want to swap just for stuff in /tmp/...?). Yes, there are use cases to use tmpfs for temporary data storage, but you should really know what you want to accomplish - and why - before considering this.

Hint, a current generation SSD is not really a reason for this.
 
 View user's profile Send private message  
Reply with quote Back to top
diblOffline
Post subject:   PostPosted: 03.02.2011, 00:05



Joined: 2010-09-12
Posts: 302
Location: Dayton, Ohio, USA
Status: Offline
      slh wrote:

Hint, a current generation SSD is not really a reason for this.


OK, this is based on the r/w capability of the modern SSD, but how do you trade that against large memory availability? If there is 6GB or 8GB of memory available, there is no problem saving an ISO image in tmpfs.
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
se7enOffline
Post subject:   PostPosted: 03.02.2011, 09:24



Joined: 2010-09-11
Posts: 164

Status: Offline
ok but I could tell my system to use only a certain amount of ram right?
The fstab would look like that right?

shm /dev/shm tmpfs nodev,nosuid,noexec 0 0

tmpfs /tmp tmpfs defaults,size=1200M,mode=1777 0 0
 
 View user's profile Send private message  
Reply with quote Back to top
dptOffline
Post subject:   PostPosted: 03.02.2011, 11:48



Joined: 2010-09-11
Posts: 281
Location: New Delhi
Status: Offline
For 1 million write cycles life , a SSD will last for 10 years with about 274 writes per day.
I had not noticed this, SSDs are surely going to replace hard disks.

Thanks slh for the hint. It is a very very useful hint.

dpt

_________________
In a lunatic asylum, everyone thinks that he is the doctor.
 
 View user's profile Send private message AIM Address  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 12 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by Zafenio