Hundreds of gigabytes written by Cinnamon, mintUpdate, and Firefox video caching. SSD weardown.

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Post Reply
HyperBear
Level 1
Level 1
Posts: 15
Joined: Thu May 04, 2023 3:39 am

Hundreds of gigabytes written by Cinnamon, mintUpdate, and Firefox video caching. SSD weardown.

Post by HyperBear »

Cinnamon writes several gigabytes to disk per day. Needless to say, that is not good for the lifespan of an SSD.

Here is a current screenshot after 10 days of uptime:
Screenshot from 2023-12-22 15-12-26 cinnamon disk write 4 GB per day.png
gvfsd-metadata
As far as I know, the writes by gvfsd-metadata are unavoidable due to the ext4 journaling.

firefox-bin
The high writes by Firefox are mainly due to video caching, because there is no way to turn this useless feature off.

There is an about:config property called "browser.privatebrowsing.forceMediaMemoryCache", but as the name implies, it is only for private browsing, not normal browsing.

Video caching to disk is a coprolite leftover from the times where computers usually ran from magnetic hard drives and had low RAM such as 4 GB, so the hard drive was used a lot for swapping and caching. Magnetic hard dries have unlimited rewrite cycles since writing only means changing magnetic fields. Hard drives only wear down from the mechanical movements, not from the writing itself.

Now that solid state drives are more affordable, computers have solid state drives and much larger RAM such as 16 GB. Video caching to disk is obsolete, and all it does is hurting SSDs.

RAM can be used for it now. 16 GB RAM was exotic in 2012 and only very few computers and laptops such as Samsung 700G7A had it. Now, 16 GB is commonplace.

But I don't know why Cinnamon has the need to write 4 GB to disk per day.

Here is a screenshot from August which also has mintUpdate in it:
Screenshot from 2023-08-24 13-52-40 cinnamon and MintUpdate disk write.png
Screenshot from 2023-08-24 13-52-40 cinnamon and MintUpdate disk write.png (13.57 KiB) Viewed 204 times
MintUpdate is not essential to the fuctioning of the user interface, so taskkilling it solves the problem. But Cinnamon obviously is essential to the user interface, so taskkilling it would not be an option.

Is there any way to prevent Cinnamon from writing hundreds of gigabytes of junk to the SSD? And what does it write anyway? Why does a user interface have a need to write hundreds of gigabytes?
User avatar
Jolly Roger
Level 4
Level 4
Posts: 272
Joined: Wed May 22, 2019 9:22 am
Location: città di Rovato / BS - Italy

Re: Hundreds of gigabytes written by Cinnamon, mintUpdate, and Firefox video caching. SSD weardown.

Post by Jolly Roger »

Hi HyperBear
---
See (Easy Linux Tips Project)

SSD: how to optimize your solid state drive for Linux Mint and Ubuntu

https://easylinuxtipsproject.blogspot.c ... tml#ID16.3
---
For the durability of SSDs, see this information, link:

https://www.ontrack.com/en-us/blog/how- ... eally-last

https://www.ionos.co.uk/digitalguide/se ... life-span/
---
Hi.
---
⚠️
Translation via Deepl.
🇷🇺 🇷🇺 🇷🇺
User avatar
axrusar
Level 6
Level 6
Posts: 1279
Joined: Sat Jan 30, 2021 5:30 pm

Re: Hundreds of gigabytes written by Cinnamon, mintUpdate, and Firefox video caching. SSD weardown.

Post by axrusar »

HyperBear wrote: Fri Dec 22, 2023 10:26 am Cinnamon writes several gigabytes to disk per day.
Here is a current screenshot after 10 days of uptime:


But I don't know why Cinnamon has the need to write 4 GB to disk per day.
Just checking my own system out of curiosity, 20 days since my last reboot and i see:

Image

lets call it 350 GB in 20 days = 17 GB per day.
I play a lot with VMs and video files....

Now considering my cheapo consumer grade 1TB NVMe drive is rated at 260 TBW, i calculate a lifespan of 42 years writing 17GB/day.
I am pretty sure I will upgrade my system way before that :lol:

Some guys here may give you an answer about what is performing the writing on the disk, but i suggest you find out the TBW rating for your specific drive, do the math and not worry about it.
Last edited by axrusar on Fri Dec 22, 2023 3:26 pm, edited 2 times in total.
Linux Mint Una Cinnamon 20.3 Kernel: 5.15.x | Quad Core I7 4.2Ghz | 24GB Ram | 1TB NVMe | Intel Graphics
Image
Kurt3162
Level 4
Level 4
Posts: 457
Joined: Wed Apr 02, 2014 2:05 pm

Re: Hundreds of gigabytes written by Cinnamon, mintUpdate, and Firefox video caching. SSD weardown.

Post by Kurt3162 »

Sorry to barge in, but what are you using to create those reports? :shock:
User avatar
all41
Level 19
Level 19
Posts: 9326
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: Hundreds of gigabytes written by Cinnamon, mintUpdate, and Firefox video caching. SSD weardown.

Post by all41 »

Kurt3162 wrote: Fri Dec 22, 2023 11:51 am Sorry to barge in, but what are you using to create those reports? :shock:
System Monitor/Processes toolbar Edit/Preferences
There you can choose which fields are displayed.
Everything in life was difficult before it became easy.
yellowfinch
Level 4
Level 4
Posts: 316
Joined: Tue Aug 30, 2016 1:58 pm

Re: Hundreds of gigabytes written by Cinnamon, mintUpdate, and Firefox video caching. SSD weardown.

Post by yellowfinch »

HyperBear wrote: Fri Dec 22, 2023 10:26 am The high writes by Firefox are mainly due to video caching, because there is no way to turn this useless feature off.
There may not be a way to entirely turn off cache usage, but if you have enough RAM (and it doesn’t necessarily take much) you may be able to squarely redirect your browser’s caching to RAM. Failing that, you should be able to simply set the maximum amount of allocatable disk cache. (And perhaps increase the allowable memory cache, while you’re at it.) I would search in the Mozzilazine, or on the Web at large. This 2021 Reddit post seems reasonable.

I’ve always used my browsers without disk caching. I was doing it even before SSDs, decades ago, starting with Firefox, later with Pale Moon (initially a Firefox derivative) and now with Brave (a Chromium derivative).

So when I check the tallies of reads and writes for running processes, I see N/A for all the Brave processes. :D

The only theoretical drawback I can think of is: if you frequently shut down and reboot your system and re-access some of the very same stuff afterwards. In that case all the content will have to be fetched again because the RAM-residing cache will have been wiped, so it might increase your network traffic somewhat. But even with caching to disk, there is never a guarantee that your cache was actually large enough to hold all of what you end up needing.
User avatar
AZgl1800
Level 20
Level 20
Posts: 10718
Joined: Thu Dec 31, 2015 3:20 am
Location: Oklahoma where the wind comes Sweeping down the Plains
Contact:

Re: Hundreds of gigabytes written by Cinnamon, mintUpdate, and Firefox video caching. SSD weardown.

Post by AZgl1800 »

I have never once, lost a SSD drive, and I have always used Cinnamon exclusively.

Initially the small ones, 128gb, 256, 1TB and now a 4TB,

me thinks you worry too much

cinnamon.jpg
LM21.2 Cinnamon ASUS FX705GM | Donate to Mint https://www.patreon.com/linux_mint
Image
HyperBear
Level 1
Level 1
Posts: 15
Joined: Thu May 04, 2023 3:39 am

57KB?!

Post by HyperBear »

AZgl1800 wrote: Fri Dec 22, 2023 5:36 pm cinnamon.jpg
57 K disk writes only? What is mine doing that yours isn't?
User avatar
AZgl1800
Level 20
Level 20
Posts: 10718
Joined: Thu Dec 31, 2015 3:20 am
Location: Oklahoma where the wind comes Sweeping down the Plains
Contact:

Re: 57KB?!

Post by AZgl1800 »

HyperBear wrote: Fri Dec 22, 2023 6:56 pm
AZgl1800 wrote: Fri Dec 22, 2023 5:36 pm cinnamon.jpg
57 K disk writes only? What is mine doing that yours isn't?
don't know, this is a Fresh Install, only 3 weeks old, but it does have 16gB RAM, might that be it?
no Swap file usage, period.

I don't mess with it, it is out of the box.

Code: Select all

Kernel: 5.15.0-91-generic x86_64 bits: 64
    Desktop: Cinnamon 5.8.4 Distro: Linux Mint 21.2 Victoria

file usage.jpg
LM21.2 Cinnamon ASUS FX705GM | Donate to Mint https://www.patreon.com/linux_mint
Image
User avatar
all41
Level 19
Level 19
Posts: 9326
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: Hundreds of gigabytes written by Cinnamon, mintUpdate, and Firefox video caching. SSD weardown.

Post by all41 »

You can specify temp files to be written to ram.
How I do this:

Code: Select all

sudo cp -v /usr/share/systemd/tmp.mount /etc/systemd/system/
then:

Code: Select all

sudo systemctl enable tmp.mount
Everything in life was difficult before it became easy.
Post Reply

Return to “Software & Applications”