Author |
Message |
se7en
|
|
Post subject: /tmp to ram?
Posted: 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. |
|
|
|
|
 |
DonKult
|
|
Post subject: RE: /tmp to ram?
Posted: 02.02.2011, 10:55
|
|
Team Member

Joined: 2010-09-02
Posts: 485
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
|
|
|
|
 |
dieres
|
|
Post subject:
Posted: 02.02.2011, 11:29
|
|

Joined: 2010-09-12
Posts: 30
Status: Offline
|
|
|
|
 |
towo
|
|
Post subject:
Posted: 02.02.2011, 11:37
|
|

Joined: 2010-09-13
Posts: 522
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 |
|
|
|
|
 |
se7en
|
|
Post subject:
Posted: 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!
|
|
|
|
 |
slh
|
|
Post subject:
Posted: 02.02.2011, 23:46
|
|

Joined: 2010-08-25
Posts: 954
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. |
|
|
|
|
 |
dibl
|
|
Post subject:
Posted: 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. |
|
|
|
|
 |
se7en
|
|
Post subject:
Posted: 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 |
|
|
|
|
 |
dpt
|
|
Post subject:
Posted: 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.
|
|
|
|
 |
|