Force no more than one write/sync to disk in X seconds

601 views Asked by At

I'm worried that I see through the disk LED and iotop quite some write activity every couple of seconds, mostly coming from the chromium's processes, on a completely idle system.

It doesn't make any sense at all to have such a high number of writes to disk, even less with SSD disks. The reads isn't a problem for me, also because I have plenty of disk cache on my 20gb RAM notebook.

The commit option (which is by default 30s) obviously isn't the solution. Tried to increase or even decrease and still see one write every couple of seconds.

So is there a way to force not more than one write per arbitrary interval?

3

There are 3 answers

0
brauliobo On BEST ANSWER

PSD - Profile Sync Daemon - is the specific solution for Chromium and other browsers https://wiki.archlinux.org/title/profile-sync-daemon

https://github.com/graysky2/profile-sync-daemon

4
mohsen.b On

At first check your linux is using CFQ scheduler. then you can use ionice to control I/O scheduling class and priority of a program. It supports following three scheduling classes (quoting from the man page):

Idle : A program running with idle io priority will only get disk time when no other program has asked for disk io for a defined grace period. The impact of idle io processes on normal system activity should be zero. This scheduling class does not take a priority argument. Best effort : This is the default scheduling class for any process that hasn't asked for a specific io priority. Programs inherit the CPU nice setting for io priorities. This class takes a priority argument from 0-7, with lower number being higher priority. Programs running at the same best effort priority are served in a round-robin fashion. This is usually recommended for most application. Real time : The RT scheduling class is given first access to the disk, regardless of what else is going on in the system. Thus the RT class needs to be used with some care, as it can starve other processes. As with the best effort class, 8 priority levels are defined denoting how big a time slice a given process will receive on each scheduling window. This is should be avoided for all heavily loaded system.

ionice options PID ionice options -p PID ionice -c1 -n0 PID

for limiting more than this i think you should use of your SAN utilities.

0
linuxfan says Reinstate Monica On

Take a look at eatmydata (https://github.com/stewartsmith/libeatmydata).

It could be ok for you, but read all the docs and think twice before using it...