Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

This question already has an answer here:

I have read that you should not store /tmp on a SSD, because the frequent writes will shorten the lifetime of the SSD. But what about /var/tmp?

Is it reasonable for /var/tmp to be stored on a SSD? Or should we avoid having /var/tmp stored on a SSD, to avoid killing the SSD prematurely?

share|improve this question

marked as duplicate by Michael Kjörling, Anthon, jasonwryan, slm, manatwork Aug 12 '13 at 6:31

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
possibly related: unix.stackexchange.com/questions/80864/… –  frostschutz Aug 11 '13 at 19:18
    
Contrary to the header at the top, the question "What NOT to put on an SSD" does not answer my question: it says nothing about /var/tmp specifically. I did read that question before posting here, and it didn't answer my question; my question is about /var/tmp. I'm not sure why my question was marked with that header. –  D.W. Aug 12 '13 at 4:16
add comment

2 Answers 2

up vote 10 down vote accepted

While it is true that all flash based storage devices have a limited number of writes before the transistor insulation breaks down, it's not as bad as before with wear leveling nowadays.

Basically due to the fact that most modern SSD's employ wear leveling and are based on NandFlash, burning through a drive is not a problem like it used to be.

You shouldn't need to worry about it. A SSD with constant writes will still outlast any rotary hard drive.

Resources

http://www.storagesearch.com/ssdmyths-endurance.html

http://maxschireson.com/2011/04/21/debunking-ssd-lifespan-and-random-write-performance-concerns/

http://www.tomshardware.com/forum/267303-32-what-write-limit-ssds

share|improve this answer
    
The read cycles are unlimited on all systems. –  ott-- Aug 11 '13 at 19:14
    
You are correct, I've modified the answer –  spuder Aug 11 '13 at 19:15
add comment

There is little essential difference between /tmp and /var/tmp in this regard.

Step back a bit, though. It is by no means a settled question that you should avoid putting /tmp on an SSD. The earliest SSDs were subject to being worn out by excessive writes, but high quality modern SSDs have solved a lot of this. Partly they do this through wear leveling, and partly through reserving a large enough pool of spare blocks that they can survive a normal amount of block wear.

The cheaper the SSD, the fewer spare blocks it will have. Therefore, there may be some justification for conservative system setup strategies if you're going to use the cheapest sorts of consumer SSDs.

The line of reasoning that advises against putting any temporary filesystem on an SSD seems to be an extension of avoiding swap/virtual memory on SSDs, which at least makes somewhat more sense, because these files/partitions are fixed in place on disk. Wear leveling prevents this, too, from being as big a problem as in early SSDs.

My point here, though, is that this logic breaks down with /tmp, since the files created on it will naturally be scattered among the sectors allocated to that filesystem. The problem decreases still more when you put /tmp type directories within other filesystems, as with /usr/tmp and /var/tmp.

Bottom line, no, don't worry about it.

Observe that people have been running database servers off of SSDs in recent years. There's a fixed-data-location high-write-count setup if you ever saw one.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.