2

In this article in Linux Journal, the author states that his workstation sustains 6.3 GB/day of writes to his SSD.

Using tune2fs -l, I see that my SSD filesystem was created on

Filesystem created:       Sat Jun 28 09:20:03 2014

and lifetime writes are:

Lifetime writes:          6737 GB

That turns out to be 10 GB/day, which seems outrageous. I don't do any audio or video editing on the SSD. My /usr and /home dirs are on the SSD, everything else is on a HDD. I rarely edit images. I have Thunderbird, Firefox (with 20 tabs usually) and Skype open all the time, so you can tell what I mostly do with the machine.

Does anybody have similar data they can share? I'll do the calcs if you include your data from tune2fs in a comment.

Greg Bell
  • 516
  • 4
  • 8

1 Answers1

2

Probably 10GB/day is not typical but it mostly depends on what you are doing. This is quite easy to know what is causing such writes. Install iotop - I/O monitor and run

sudo iotop -ao

then navigate with < to disk write and check which process is causing writes.

For sure Firefox is writing data (caching) all the time and this writing could be huge. Imho the best way is to move firefox profile to tmpfs (ramdisk) and syncing on boot and shutdown or make tweaks in about:config. It will decrease your ssd writes.

You can see the total writes since the drive was mounted by looking in session_write_kbytes file:

echo "Session wrote: $(echo "scale=2;$(cat /sys/fs/ext4/sda3/session_write_kbytes)/1024" | bc) MB"

Change sda3 with your proper partition.

Greg Bell
  • 516
  • 4
  • 8
EdiD
  • 4,457
  • 3
  • 26
  • 41
  • There's also 'fatrace', but that and iotop rely on me watching to see what happened. If every 4 days something writes 100 GB, I'm unlikely to catch that. Graphing the session writes would help see spikes (or equivalently, the output from tune2fs that I in my original question).

    All this complexity is why I was just asking people what their GB/day stats were...

    – Greg Bell May 01 '16 at 07:53
  • @GregBell you can catch what you want without watching what is happening; iotop has --batch option dedicated for logging over time. – EdiD May 01 '16 at 13:52