4

Which parts of Ubuntu would you offload from an SSD installed system to HDD or vice versa, to reduce write cycles and still enjoy better responsiveness?

I assume the following, but must be missing quite a bunch.

  1. swap partition - unless you really think your SSD will survive long
  2. /tmp
  3. any database data directories
  4. things that keep updating like ~/Downloads and other user login session directories

Or is it easier to say what to keep on SSD rather than what to move away... basically I think for SSD longevity per-se, it would make sense to only store programs on SSD and data that is pretty much constant. Is there at all a sensible way to map out the default Ubuntu (Desktop) directories structure by this criteria?

Ubuntu 14.04 LTS.

matanox
  • 2,293
  • Personally I wouldn't worry about it too much, the prices of SSD devices have fallen so much now that even if you manage to wear an SSD out, you can just buy a new one. Although I doubt you will ever notice, unless you use them for databases or something 24/7. – Minos Jan 10 '15 at 16:27
  • 1
    Good perspective. But reinstalling Ubuntu after its disk is gone is a quite noticeable waste of a days' work. Especially ever since Ubuntu One and its server syncing service shutdown. – matanox Jan 10 '15 at 20:14
  • You're right of course that reinstalling Ubuntu can take up quite some time, but my point was more that it is highly unlikely that you will actually wear it out in the first place. Having said that, I do have swaps and hibernation disabled, but everything is stored on SSD's. – Minos Jan 12 '15 at 10:09
  • Thanks, good to know. What's the usage load on your system and how long did it survive up to now? is it a gaming machine? development machine? sedentary internet browsing? database server? – matanox Jan 12 '15 at 22:03
  • 1
    My system is build as a gaming machine, but I use it for everything. It has two SSD's, a five year old Intel Postville X25-M and an almost 3 year old samsung disk. I do use a separate data server with regular HDD's for storage. I have also installed quite a few SSD's in other peoples pc's none of which have had issues with their SSD drives so far. – Minos Jan 13 '15 at 07:43

2 Answers2

3

I have the following on my notebook

  • ssd. Holds "/" and "/home/"
  • hdd. Holds all directories in "/home/$USER/".

My own files are what are written to disk most whilst downloading so I keep those on my hdd. I tend to watch series and download them so it is often: download, watch, delete.

If you look at the "root" system and want to lower the amounts of writes Ubuntu (/Debian/Linux) is heading towards a system where all files that are written to often are moved towards a "run" directory (aka "ramdisk"s) . See What are "/run/lock" and "/run/shm" used for? for an explanation on those. That in itself has lowered the amount of writes a lot without you doing anything for it. But you can take advantage of this yourself...

Put /tmp into a ramdisk. /etc/fstab:

tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0

Firefox puts its cache in your home partition. By moving this cache in RAM you can speed up Firefox and reduce disk writes. Open about:config, add i a new string value called browser.cache.disk.parent_directory and set the value to /tmp and it will be added to the ramdisk (as explained above). There is a generic tool for this called Profile sync daemon.

Rinzwind
  • 299,756
1

If SSD write related wearout is a concern, I believe choosing directories that are not supposed to change much would be optimal. Those can be spotted in the following standard, assuming Ubuntu and software you install on it, conform to this standard.

http://refspecs.linuxfoundation.org/FHS_2.3/fhs-2.3.html

I didn't try it, as it came in too late, but maybe next time, or if I had a quick & safe way to move those paths that make sense from my new HDD only installation.

matanox
  • 2,293
  • 1
    Also check out about durability of SSD technologies here - http://www.computerweekly.com/feature/MLC-vs-SLC-Which-flash-SSD-is-right-for-you – matanox Jan 20 '15 at 14:13