Increased disk writes in Ubuntu 20.04 and 22.04

I periodically run ‘fstrim’ in verbose mode. Beginning two or three months ago I noticed that the number of GB reported as trimmed had roughly quadrupled and was frequently near the entire empty capacity remaining in the disk. Yet the log files were not growing nor was the disk filling up. This occurred on three different computers running 20.04 and persists after recently updating two of them (full wipe clean installs) to 22.04.

To investigate this I loaded a command-line utility called ‘fatrace’ which displays disk activity in real time. It showed that there was a tremendous amount of writing coming from Firefox. I made some of the recommended adjustments in FF to decrease disk writes. That helped reduce the size of the trims but they were still 2 to 3 times larger than they’d been, say, a year ago.

My guess is that Ubuntu is doing a lot more logging than it used to though I can’t see any difference in the behavior of the OS. Nor can I see any benefit of the increased writes. I know that modern SSD drives can tolerate a very large lifetime number of writes so maybe I’m worrying about nothing, but the increased writes seem wasteful.

Has anyone else noticed this? What do you think is going on?

Are you using Firefox as a snap or a package?
I know that using a VM increases disk writes, and I suspect using snap does the same.

Systemd log files are huge.
You could try disabling the systemd logging and use conventional syslog log files instead

Regards
Neville

Firefox in Ubuntu has been changed to a snap. That may have something to do with it as you suggest. I’ll look into disabling systemd logging since I’ve never ever looked at it.

Thanks for the suggestion.

This is a good article

It has english and german, dont be frightened off by the title
Neville

I was thinking about the increased disk writes. Although it is a larger number of bytes than it used to be it’s generally smaller than the empty disk space remaining on the drive based on what TRIM is telling me in verbose mode.

This means (I think) that each memory cell is getting written to, on average, less than once between each TRIM. So what seems like a lot of data writing is not really that much.

Hi @don.karon
I think you have worked it out.
With modern SSD drives you dont really need to worry .

1 Like