Experiment with swappiness on Android |
||||
Issue descriptionSince there is a cgroup per process (or per uid?), we can experiment with different swappiness levels. Interesting, that there is android.os.Process.setSwappiness(), but it's hidden. Anyway, in Chrome we'll write to procfs directly.
,
Jan 7
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jan 7
+yfriedman as this might become relevant soon, actually.
,
Jan 7
,
Jan 7
I tried tuning this for a particular device, and in terms of startup speed 180 > 150 > 100 > 60. I think many (most?) devices probably customize the default to a sensible value, and I think the device I was testing on defaulted to 150. I would also assume the ideal value is going to depend on the device characteristics? I wouldn't know how though. We could consider trying something like a finch trial to increase swappiness by x above the default, under the assumption that Chrome prefers unusually high swappiness?
,
Jan 7
On further investigation, not sure there's anything to do here. On my pixel and gobo devices, the swappiness defaults to 100, which is the max there (and decreasing it hurts startup perf (averaged over 20 runs)). On my other device it defaults to 150 with a max of 200, and increasing it might help but this seems non-standard and probably best not to mess with?
,
Jan 7
Can we change swappiness for renderer processes? I.e. when memory gets tight Android starts to compress pages, and there is no way to tell it not to compress v8 pages. I'm curious what would happen if we set swappiness to 0 for renderer processes.
,
Jan 8
IIRC swappiness is already set to 100 on most Android devices, and we cannot increase it further unless the device has a patched kernel: https://elixir.bootlin.com/linux/v4.20-rc7/source/kernel/sysctl.c#L1364 This also requires memcg which is only on Android Go IIRC if we want to set it per app. |
||||
►
Sign in to add a comment |
||||
Comment 1 by mariakho...@chromium.org
, Jan 5 2018