ungoogled-chromium icon indicating copy to clipboard operation
ungoogled-chromium copied to clipboard

Failure to disable cach disk with command line which causes ruin because of Heavy I/O that destroys SSD because of the cache !

Open trimechee opened this issue 1 year ago • 13 comments

OS/Platform

Windows

Installed

Compiled from source

Version

104.0.5112.81

Tested upstream?

  • [ ] I have tried reproducing this issue in Chrome and it could not be reproduced there
  • [ ] I have tried reproducing this issue in vanilla Chromium and it could not be reproduced there

Description

Heavy I/O

How to Reproduce?

Normal use

Actual behaviour

Excessive disk sate writes

Expected behaviour

EDIT : i discover this new feature in chromium based browsers : chrome://settings/content/siteData , so so this option can disable session store/storage and minimize the read write and data operations used by the web browsers and thus the energy and battery consumption especially when we use the web browser mainly to watch streaming videos please ?


Hello,

"Chrome and Spotify are writing over 150GB per day to my SSD."

"At the rates I'm clocking I'm actually probably closer to this group that is showing upwards of 100 GIG (yes, ONE HUNDRED GIG) of writes to my SSD PER DAY - just from leaving Chrome open even if I run the awesome extension (and BTW about the ONLY thing anyone has come up with to indicate helps this at all by sleeping tabs via the "Great Suspender" extension). "

https://bugs.chromium.org/p/chromium/issues/detail?id=176727

https://www.reddit.com/r/pcmasterrace/comments/54fft5/chrome_and_spotify_are_writing_over_150gb_per_day/

a user seems to have found a solution to avoid the wear of SSD and HHD and huge disk writes of chromium but I don't know if these flag work with the current version, another user said that the excessive storage writes date of chromium is due to cookies to save the state of cookies even in inactive state so should we disable cookies to save our SSDs ?

"I was finally able to fix the heavy disk I/O activity (while idle, and ultra heavy hdd kill while loading pages) by adding the following command line arguments in shortcut:

%pathtoyourbrowser% --profile-directory=Default --disable-cache --disk-cache-size=0 --disk-cache-dir="Z:"

These commands should disable any kind of disk cache except for streaming multimedia - with no noticable speed diff. So the main reason why chrome eats up HDD for me was disk cache - and does so on every version on every variant with any setting in Chrome flags. There is a high chance that your chromium browser variant will not apply these commands on newer versions, however choosing an advanced browser with implemented setting for disk cache location will ensure that cache is not stored (see 360Chrome cn browser option in attachment and i think Slimjet browser also have it, just specify non-writeable location for cache storage). HDD activity while idle and loading heavy pages (example music. torchbrowser. com) in task manager down from 50% HDD to 3-4% (like in FF but FF is still lower I/O both in load and idle and while streaming multimedia). You could do the same with --incognito trick but then your visited history would never be saved.

Hope this helps someone save his HDD/SSD."

https://bugs.chromium.org/p/chromium/issues/detail?id=401391#c7

disable memory cache may be a good ideo to make browser faster but we cant't disable momory cache :

https://stackoverflow.com/questions/69286753/how-do-i-disable-chromes-memory-cache-without-devtools

It will be great if Ungoogled Browser gives us an effective option to completely disable the cache disk and even the memory disk, maybe it can cancel the excessive session store and speed up the noteooks that have an old HDD and save the SSDs!

Thanks a lot !

Relevant log output

Year 2013 and bug persist :

" Inactive chrome generate such I/O (task manager - it kills my disk)?
i/o read 8 200 000 000
i/o write 1 900 000 000

i/o pre minute is about (7% of cpu used constanly):
read + 200 000 000  + 50 0000 000

See what Chrome doing (what is it - process monitor sysinternals)?
chrome.exe	3056	0.0000000	159 914	159 914	159 914	60 792	60 792	834	834	834	n/a	0	n/a	0 "

Additional context

Untitled

trimechee avatar Aug 07 '22 13:08 trimechee

Is it a duplicate of #2032?

PF4Public avatar Aug 07 '22 15:08 PF4Public

@PF4Public NO, in issue 2032, i asked option to disable session store or increase interval of session store, here, and i invite you to read the end f my message, i asked for effective solution and an easy way to activate option to deactivate the cache disk and disable the cache memory and I explain to you why I ask for this feature because I tried to deactivate disk cache and it does not always work, I will change the title of my message to avoid misunderstanding

trimechee avatar Aug 07 '22 16:08 trimechee

On linux I put the cache on a ramdisk. On windows....

Ph0rk0z avatar Aug 11 '22 12:08 Ph0rk0z

Yes, it is complicated and we are supposed to use 3rd party tools to move cache to ram, I wonder why there aren't easier ways :(

trimechee avatar Aug 11 '22 16:08 trimechee

google sucks, is why. but on windows firefox accelerates video very well and that can fully turn off cache besides ram.

Ph0rk0z avatar Aug 12 '22 00:08 Ph0rk0z

In firefox i disbale disk cache and now, i disable even memory cache and it lookts very very fast and save hard disk

trimechee avatar Aug 12 '22 08:08 trimechee

This is what I use to disable most caching.

--disk-cache-size=1
--media-cache-size=1
--disable-gpu-program-cache
--disable-gpu-shader-disk-cache
--skia-font-cache-limit-mb=1
--skia-resource-cache-limit-mb=1
--v8-cache-options=none

Not sure if all of these still work though, as I remember setting this up maybe around ~2 years ago. There is more if search for "cache" at https://peter.sh/experiments/chromium-command-line-switches.

In my testing, --v8-cache-options is critical, as otherwise the browser tends to save tens of thousands of JS scripts to the disk, especially if you visit a lot of different sites.

tomasz1986 avatar Aug 12 '22 08:08 tomasz1986

Why disable memory cache unless you're really short on ram. I love ram cache as the browser clears everything as soon as you kill it.

Did not know about v8 cache, need to add that to all my windows flags. On linux it would be redundant when I just set up: https://easylinuxtipsproject.blogspot.com/p/speed-mint.html#ID9 and symlink .cache there.

Ph0rk0z avatar Aug 12 '22 12:08 Ph0rk0z

Why disable memory cache unless you're really short on ram. I love ram cache as the browser clears everything as soon as you kill it.

Yeah, I use the same switches on multiple devices, and some of them do have only 2 GB of RAM 😉.

For the record, some links to the actual source code, as 3rd party websites are often wrong regarding the possible options, etc.

  • https://source.chromium.org/chromium/chromium/src/+/main:content/public/common/content_switches.cc?q=v8-cache-options
  • https://source.chromium.org/chromium/chromium/src/+/main:chrome/common/chrome_switches.cc?q=disk-cache-size
  • https://source.chromium.org/chromium/chromium/src/+/main:gpu/command_buffer/service/gpu_switches.cc?q=disable-gpu-shader-disk-cache

Not sure about media-cache-size, because I can't find in the source code anymore. It used to be located right next to disk-cache-size, but it doesn't seem to be there in the current version of the code.

Edit:

media-cache-size was removed in https://chromium.googlesource.com/chromium/src/+/f99eeb0dc116a6c02383069b7cc4b2276058f6f1:

Remove the MediaCacheSize policy and --media-cache-size command line flag. (…) The DiskCacheSize policy can be used instead to control the size of the unified cache.

tomasz1986 avatar Aug 12 '22 12:08 tomasz1986

@tomasz1986 Great ! thank you very much ! so flag --disk-cache-size is sufficient and overrides the media-cache-size flag?

@Ph0rk0z when I disabled memory cache because fiefox seems to become even faster when memory cache is disabled, but it says some sites may not work normally if cache disabled, so far I haven't encountered any problem

trimechee avatar Aug 12 '22 16:08 trimechee

@tomasz1986 so it's good idea to prevent wear of the hard disk to set none to the flag --v8-cache-options ?

trimechee avatar Aug 12 '22 16:08 trimechee

Yes and yes. I've been playing around with these flags today, and the two

--disk-cache-size=1
--v8-cache-options=none

are probably enough to significantly reduce disk activity.

tomasz1986 avatar Aug 12 '22 20:08 tomasz1986

Wonderful ! thank you very much for these precious advices :)

trimechee avatar Aug 13 '22 14:08 trimechee