Answer the question
In order to leave comments, you need to log in
Monitor writes to an SSD disk in Linux?
Good afternoon! Tell me a utility for monitoring disk activity, which can show in real time which process writes to which file? IOTOP shows processes (without files, unfortunately), but it seems that it skips, because in IOSTAT the numbers of entries grow, and there is no activity in IOTOP. All that is not needed (tracked by IOTOP), as well as the pace and caches of browsers are moved to the RAM , even the configs were demolished there. Chromium constantly wrote something to the config folder (ess-but before shutting down, the configs are copied back to the SSD). Recording on an SSD in a laptop is still 5-10 gigs per day (despite the fact that I don’t save anything for myself). Here I want to track who and what writes to the drive.
UPD
inotify does not show what process is writing and shows all entries, including those in tmpfs! Judging by it, everything is written in tmpfs, but at the same time, the numbers in iostat -m in the "MB_wrtn" field are growing!
Finally caught it. In home folder .WebIde90 from storm. Take it to the operating room. Zhor megabytes stopped ...
But this does not change the essence! Is there really no software that tracks exactly who and what writes to the disk?
Answer the question
In order to leave comments, you need to log in
Maybe inotify will help .
In general, it writes a lot of things to the disk. Browser cache, a bunch of other caches and temporary files. This is not particularly scary with modern SSDs - they are designed for a large amount of data being written. As a small optimization, you can mount /tmp in tmpfs - this will slightly reduce the amount of data written to disk.
I will reveal a terrible military secret, in Linux, and in other file systems, it is customary to record the time of the last access to a file (directories, etc.), it is called atime (access time). This feature can be disabled in fstab by setting the mount options to noatime . There is also the option nodiratime , but it is automatically enabled for noatime.
And if you don’t want to write anything to disk at all, then use either overlayfs or aufs, and mount the root partition in readonly. For ubuntu, you can read here - https://help.ubuntu.com/community/aufsRootFileSyst...
PS. To the heap - www.digitalinternals.com/unix/linux-io-performance...
swap disabled? atime disabled? Any /run , /tmp, /var/run moved to ram? Logs disabled? Is log rotation disabled?
Well, yes - when recording 10 gigs a day, the lousiest 120G ssd on NAND will live for about 10 years in terms of overwriting resource - the electrician will die faster. Corsair Neutron GTX will live ~250 years with such "activity".
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question