Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux? |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
10-24-2022, 10:28 AM
|
#1
|
Member
Registered: Aug 2014
Distribution: Devuan
Posts: 219
Rep: 
|
[Solved] Home SSD getting ~100GB of writes per day.
Hello,
My SSD, mounted only to my home dir, is getting roughly 100GB of writes per day. I'm at a loss for how this could be. I'm using only very normal SW, mail-client (I turned off the shred function some time ago), webbrowser, etc. The filesystem is NILFS2, which is designed for SSDs. I also setup fstrim without an effect on how much data is being written.
Does anyone have an idea how I can figure out what is going on?
For example, is there a way to track writes? I know about iotop, but it often just lists kernel processes, not what is causing the kernel to perform a write.
Thanks!
Last edited by ballsystemlord; 11-03-2022 at 11:44 AM.
|
|
|
10-24-2022, 11:35 AM
|
#2
|
Senior Member
Registered: Sep 2014
Distribution: Slackware
Posts: 1,913
Rep: 
|
Website cache, most certainly. Video stream writes cache on your drive and deletes cache from your drive dynamically.
So you'll never see the cache directory inflate too much, but youtube for example does write quite a lot of that.
That said, everything's using disk as a cache dump these days, see: mesa shader cache, mozilla sqlite database.. etc..
|
|
2 members found this post helpful.
|
11-03-2022, 11:46 AM
|
#3
|
Member
Registered: Aug 2014
Distribution: Devuan
Posts: 219
Original Poster
Rep: 
|
I moved the browser's complete folder to an HDD. Now I'm getting about 6GB of writes to the SSD per day.
Thanks guys!
|
|
|
11-03-2022, 02:17 PM
|
#4
|
LQ Guru
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 17,633
|
Quote:
Originally Posted by elcore
Website cache, most certainly. Video stream writes cache on your drive and deletes cache from your drive dynamically.
So you'll never see the cache directory inflate too much, but youtube for example does write quite a lot of that.
That said, everything's using disk as a cache dump these days, see: mesa shader cache, mozilla sqlite database.. etc..
|
Interesting...
If someone has spare ram, then, is it worth putting ~/.cache in a ramdisk?
How big would it need to be?
|
|
|
11-03-2022, 02:43 PM
|
#5
|
Senior Member
Registered: Sep 2014
Distribution: Slackware
Posts: 1,913
Rep: 
|
Quote:
Originally Posted by business_kid
Interesting...
If someone has spare ram, then, is it worth putting ~/.cache in a ramdisk?
How big would it need to be?
|
Sure, what I did couple of years ago well I mounted tmp as tmpfs (in fstab) according to some advice I was given around here. It was 2G of 4G RAM, so half by default, configurable.
After that I'd just create /tmp/cache1 on boot with a rc.local, and then use the browser about :config to point default cache dir at /tmp/cache1
For another browser, I'd use /tmp/cache2 and so forth. After grasping the concept, I've done also an extraction of full browser profile archive to /tmp on boot, which is a bit more advanced.
I could also recommend squid if you're into caching web stuff locally, takes a while to configure and has huge documentation, but works nice in my experience.
If you have a LOT of big files, iso images, videos etc. it's probably better to have a mechanical storage disk or something. I do have some SSDs but for systems only, not for storage.
Last edited by elcore; 11-03-2022 at 02:45 PM.
|
|
|
11-04-2022, 05:59 AM
|
#6
|
LQ Guru
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 17,633
|
Wouldn't a symlink from ~/.cache to /tmp/cache1 do it? That even saves farting about with default locations. Is that stuff ever read?
|
|
|
11-04-2022, 07:50 AM
|
#7
|
Senior Member
Registered: Sep 2014
Distribution: Slackware
Posts: 1,913
Rep: 
|
Quote:
Originally Posted by business_kid
Wouldn't a symlink from ~/.cache to /tmp/cache1 do it? That even saves farting about with default locations. Is that stuff ever read?
|
Probably worth mentioning it's ~/.cache/mozilla (if you're using firefox) and not ~/.cache (you'd likely want to keep the shader cache, and thumbnails for example).
If all of it is on tmpfs, on next boot you're basically recreating it all. Causing thumbnails to load slow, and forcing shaders to recompile.
But if you want to be thorough, sure, it can all go to tmpfs, even /home (where you might want to make some major changes in /etc/skel).
|
|
|
11-05-2022, 05:00 PM
|
#8
|
Member
Registered: Aug 2014
Distribution: Devuan
Posts: 219
Original Poster
Rep: 
|
Quote:
Originally Posted by business_kid
Wouldn't a symlink from ~/.cache to /tmp/cache1 do it? That even saves farting about with default locations. Is that stuff ever read?
|
Yes, that would work fine.
####
Something I discovered was that apparently there's an option browser.cache.disk.enable that will turn off caching on your disk. You might have to toggle something more than that. I'm not personally interested in the option, so I did not research it further.
|
|
|
11-06-2022, 06:34 AM
|
#9
|
LQ Guru
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 17,633
|
Thanks for the reply. I'm not going to go with that option if I can find a better one, as I'm told the mesa shader cache will have to be recompiled constantly.
Looking at tmpfs, it's got 1.6G and nothing used according to 'df -h'. Tmpfs has a line in fstab
Code:
tmpfs /dev/shm tmpfs nosuid,nodev,noexec 0 0
So I've created a directory /dev/shm/chromium-ungoogled and put a symlink to it from ~/.cache/chromium-ungoogled, which seems to work. It's holding 51M at the moment because I rsync'ed the existing cache. That all vanishes of course if I umount tmpfs, either shutting it down or unmounting. I'll check it later.
Last edited by business_kid; 11-06-2022 at 06:36 AM.
|
|
|
All times are GMT -5. The time now is 08:20 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|