For some reason, common browsers (Chromium is particularly bad, but Firefox isn't much better) generate constant IO load, particularly writes, on my Debian system. This is the case even when the browser does not have any work to do (e.g. I am just reading a static webpage, or it is minimized in the background). For chromium, the "chromium [BrowserBlocking]" subprocess alone generates almost 300kb of disk writes couple seconds, not doing anything. I run a journaled filesystem, so the effect of those writes is amplified.
This is extremely annoying especially on my laptop; my Samsung 960 Pro supports APST (sleep) states, but it can never actually reach deep sleep because it constantly gets woken up by the browser process. The CPU is similarly prevented from using its idle states effectively. My battery life with the browser running is noticeably worse than without. Also, even though not an issue with modern SSDs, I also would rather avoid the constant and useless degradation of the flash substrate caused by these unnecessary operations.
The browser does not deal with data that has any value, so data integrity is no concern here. Ideally, I would want to tell the kernel to ignore any requests for synchronous IO from chromium, and cache all write requests in memory until either the filesystem gets dismounted or the system starts having memory pressure.
Example from "pidstat -d 1 -C chromium" while idle:
05:05:09 PM 1000 30539 0.00 300.00 0.00 0 chromium 05:05:13 PM UID PID kB_rd/s kB_wr/s kB_ccwr/s iodelay Command 05:05:14 PM 1000 30539 0.00 28.00 0.00 0 chromium
05:05:14 PM UID PID kB_rd/s kB_wr/s kB_ccwr/s iodelay Command 05:05:15 PM 1000 30539 0.00 4.00 0.00 0 chromium
05:05:22 PM 1000 30539 0.00 212.00 0.00 0 chromium
Since this is a problem shared by multiple browsers, I want to avoid having to start hacking around in the code of any specific browser. How can I accomplish this?