add more vm tunables via crosh and/or via board-specific settings |
||||||
Issue descriptionWe have been playing around with these three kernel memory manager settings: - swap size - tab/app discard margin - min_filelist_kbytes (minimum amount of in-memory file-backed (i.e. instruction) pages The first two can be set per-board and per-device. The third (min_filelist_kbytes) only per-board at the moment. We propose to add yet another tunable: extra_free_kbytes. This controls the starting/stopping threshold for kswapd. Increasing it from its default value of 0 makes it more likely that a larger reserve of free memory will be available, which helps the system tolerate spikes in demand without oom-killing. We will need to experiment with this setting, like we did for the others, and most likely also have per-board defaults.
,
Apr 20 2017
Hopefully extra_free_kbytes is the last tunable we need to find the best combination for the memory configuration, for existing and new coming devices. With them we can ask dogfooders with verified mode machines to help our experiments.
,
Apr 29 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/751c01dfaf8ed60a7b08f80c107e13ebf56a8ac8 commit 751c01dfaf8ed60a7b08f80c107e13ebf56a8ac8 Author: Luigi Semenzato <semenzato@chromium.org> Date: Sat Apr 29 09:42:48 2017 swap.sh: add tunables This adds tunables for /proc/sys/vm/min_filelist_kbytes and /proc/sys/vm/extra_free_kbytes. Note min_filelist_kbytes is currently set via sysctl. That approach makes it hard to configure the values dynamically, so I'd rather do it here (and separately remove the sysctl settings). Some shell-fu is applied to unify the treatment of parameters. In addition, we change the location of the files with per-device override values. BUG= chromium:713415 TEST=partially tested, maybe will test a little more CQ-DEPEND=CL:484802 Change-Id: Icc24c4b8846f41d4fe5e8bed033229e599cdcba3 Reviewed-on: https://chromium-review.googlesource.com/484789 Commit-Ready: Luigi Semenzato <semenzato@chromium.org> Tested-by: Luigi Semenzato <semenzato@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org> [modify] https://crrev.com/751c01dfaf8ed60a7b08f80c107e13ebf56a8ac8/chromeos-base/swap-init/files/init/swap.sh [rename] https://crrev.com/751c01dfaf8ed60a7b08f80c107e13ebf56a8ac8/chromeos-base/swap-init/swap-init-0.0.1-r15.ebuild
,
Apr 29 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/1caa11fd05f33912a6bb5ce0d522eb761bc1c861 commit 1caa11fd05f33912a6bb5ce0d522eb761bc1c861 Author: Luigi Semenzato <semenzato@chromium.org> Date: Sat Apr 29 09:42:47 2017 Add extra_free and min_filelist tunables. This puts min_filelist_kbytes and extra_free_kbytes under user control. It also unifies the code with that for the low-memory margin. "swap set_extra_free <amount>" persistently sets a per-device value for increasing the target amount of free RAM that the kernel page allocator tries to maintain. This is the kernel parameter /proc/sys/vm/extra_free_kbytes (in MiB) "swap set_min_filelist <amount>" sets the size for the active and inactive file lists below which we stop scanning them. This is /proc/sys/vm/min_filelist_kbytes (converted to MiB). BUG= chromium:713415 TEST=tested manually CQ-DEPEND=CL:484789 Change-Id: I2663471298a025f0bf73b939d620c1910340fa97 Reviewed-on: https://chromium-review.googlesource.com/484802 Commit-Ready: Luigi Semenzato <semenzato@chromium.org> Tested-by: Luigi Semenzato <semenzato@chromium.org> Reviewed-by: Luigi Semenzato <semenzato@chromium.org> [modify] https://crrev.com/1caa11fd05f33912a6bb5ce0d522eb761bc1c861/debugd/src/swap_tool.cc [modify] https://crrev.com/1caa11fd05f33912a6bb5ce0d522eb761bc1c861/debugd/src/debug_daemon.cc [modify] https://crrev.com/1caa11fd05f33912a6bb5ce0d522eb761bc1c861/debugd/src/swap_tool.h [modify] https://crrev.com/1caa11fd05f33912a6bb5ce0d522eb761bc1c861/debugd/dbus_bindings/org.chromium.debugd.xml [modify] https://crrev.com/1caa11fd05f33912a6bb5ce0d522eb761bc1c861/crosh/crosh [modify] https://crrev.com/1caa11fd05f33912a6bb5ce0d522eb761bc1c861/debugd/src/debug_daemon.h
,
Apr 29 2017
Please note that currently any per-board and per-device settings of min_filelist_kbytes may be moot because of the dynamic setting of the value done at arc++ start/stop. See issue 716777.
,
Jun 15 2017
Done?
,
Jun 21 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/2d8edd5c8bc25e82e87551a1693a9233a83508a5 commit 2d8edd5c8bc25e82e87551a1693a9233a83508a5 Author: Luigi Semenzato <semenzato@chromium.org> Date: Wed Jun 21 05:56:39 2017 swap.sh: add tunables This adds tunables for /proc/sys/vm/min_filelist_kbytes and /proc/sys/vm/extra_free_kbytes. Note min_filelist_kbytes is currently set via sysctl. That approach makes it hard to configure the values dynamically, so I'd rather do it here (and separately remove the sysctl settings). Some shell-fu is applied to unify the treatment of parameters. In addition, we change the location of the files with per-device override values. BUG= chromium:713415 TEST=partially tested, maybe will test a little more CQ-DEPEND=CL:484802 Change-Id: Icc24c4b8846f41d4fe5e8bed033229e599cdcba3 Reviewed-on: https://chromium-review.googlesource.com/484789 Commit-Ready: Luigi Semenzato <semenzato@chromium.org> Tested-by: Luigi Semenzato <semenzato@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org> (cherry picked from commit 751c01dfaf8ed60a7b08f80c107e13ebf56a8ac8) Reviewed-on: https://chromium-review.googlesource.com/542455 Reviewed-by: Ben Cheng <bccheng@chromium.org> Commit-Queue: Ben Cheng <bccheng@chromium.org> Tested-by: Ben Cheng <bccheng@chromium.org> Trybot-Ready: Ben Cheng <bccheng@chromium.org> [modify] https://crrev.com/2d8edd5c8bc25e82e87551a1693a9233a83508a5/chromeos-base/swap-init/files/init/swap.sh [rename] https://crrev.com/2d8edd5c8bc25e82e87551a1693a9233a83508a5/chromeos-base/swap-init/swap-init-0.0.1-r15.ebuild
,
Jun 21 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/3e37713e7e4f46b7c45ae6818e31f21b661e7f6a commit 3e37713e7e4f46b7c45ae6818e31f21b661e7f6a Author: Ben Cheng <bccheng@chromium.org> Date: Wed Jun 21 16:56:25 2017 Revert "swap.sh: add tunables" This reverts commit 2d8edd5c8bc25e82e87551a1693a9233a83508a5. Reason for revert: <INSERT REASONING HERE> Original change's description: > swap.sh: add tunables > > This adds tunables for /proc/sys/vm/min_filelist_kbytes > and /proc/sys/vm/extra_free_kbytes. > > Note min_filelist_kbytes is currently set via sysctl. > That approach makes it hard to configure the values > dynamically, so I'd rather do it here (and separately > remove the sysctl settings). > > Some shell-fu is applied to unify the treatment of > parameters. > > In addition, we change the location of the files > with per-device override values. > > BUG= chromium:713415 > TEST=partially tested, maybe will test a little more > CQ-DEPEND=CL:484802 > > Change-Id: Icc24c4b8846f41d4fe5e8bed033229e599cdcba3 > Reviewed-on: https://chromium-review.googlesource.com/484789 > Commit-Ready: Luigi Semenzato <semenzato@chromium.org> > Tested-by: Luigi Semenzato <semenzato@chromium.org> > Reviewed-by: Mike Frysinger <vapier@chromium.org> > (cherry picked from commit 751c01dfaf8ed60a7b08f80c107e13ebf56a8ac8) > Reviewed-on: https://chromium-review.googlesource.com/542455 > Reviewed-by: Ben Cheng <bccheng@chromium.org> > Commit-Queue: Ben Cheng <bccheng@chromium.org> > Tested-by: Ben Cheng <bccheng@chromium.org> > Trybot-Ready: Ben Cheng <bccheng@chromium.org> Bug: chromium:713415 Change-Id: Ic4922de36d8543ae368eb9b6d2f6434ac12114fb Reviewed-on: https://chromium-review.googlesource.com/543676 Reviewed-by: Ben Cheng <bccheng@chromium.org> Commit-Queue: Ben Cheng <bccheng@chromium.org> Tested-by: Ben Cheng <bccheng@chromium.org> Trybot-Ready: Ben Cheng <bccheng@chromium.org> [add] https://crrev.com/3e37713e7e4f46b7c45ae6818e31f21b661e7f6a/chromeos-base/swap-init/swap-init-0.0.1-r13.ebuild [modify] https://crrev.com/3e37713e7e4f46b7c45ae6818e31f21b661e7f6a/chromeos-base/swap-init/files/init/swap.sh
,
Jun 22 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/96f9c79d52a9d09e2d3d68815603dc416a6ecc01 commit 96f9c79d52a9d09e2d3d68815603dc416a6ecc01 Author: Ben Cheng <bccheng@chromium.org> Date: Thu Jun 22 03:16:08 2017 Revert "swap.sh: add tunables" This reverts commit 2b34fcf6ef44ff57ed906ef81562def434a50a4f. Reason for revert: need to clean up the ebuild version. Original change's description: > swap.sh: add tunables > > This adds tunables for /proc/sys/vm/min_filelist_kbytes > and /proc/sys/vm/extra_free_kbytes. > > Note min_filelist_kbytes is currently set via sysctl. > That approach makes it hard to configure the values > dynamically, so I'd rather do it here (and separately > remove the sysctl settings). > > Some shell-fu is applied to unify the treatment of > parameters. > > In addition, we change the location of the files > with per-device override values. > > BUG= chromium:713415 > TEST=partially tested, maybe will test a little more > CQ-DEPEND=CL:484802 > > Change-Id: Icc24c4b8846f41d4fe5e8bed033229e599cdcba3 > Reviewed-on: https://chromium-review.googlesource.com/484789 > Commit-Ready: Luigi Semenzato <semenzato@chromium.org> > Tested-by: Luigi Semenzato <semenzato@chromium.org> > Reviewed-by: Mike Frysinger <vapier@chromium.org> > (cherry picked from commit 751c01dfaf8ed60a7b08f80c107e13ebf56a8ac8) > Reviewed-on: https://chromium-review.googlesource.com/542455 > Reviewed-by: Ben Cheng <bccheng@chromium.org> > Commit-Queue: Ben Cheng <bccheng@chromium.org> > Tested-by: Ben Cheng <bccheng@chromium.org> > Trybot-Ready: Ben Cheng <bccheng@chromium.org> > (cherry picked from commit 2d8edd5c8bc25e82e87551a1693a9233a83508a5) > Reviewed-on: https://chromium-review.googlesource.com/544555 Bug: chromium:713415 Change-Id: Iadfaedc15ee7be4c2798a80a744a15d0c85ce5d0 Reviewed-on: https://chromium-review.googlesource.com/544655 Reviewed-by: Ben Cheng <bccheng@chromium.org> Commit-Queue: Ben Cheng <bccheng@chromium.org> Tested-by: Ben Cheng <bccheng@chromium.org> Trybot-Ready: Ben Cheng <bccheng@chromium.org> [add] https://crrev.com/96f9c79d52a9d09e2d3d68815603dc416a6ecc01/chromeos-base/swap-init/swap-init-0.0.1-r13.ebuild [modify] https://crrev.com/96f9c79d52a9d09e2d3d68815603dc416a6ecc01/chromeos-base/swap-init/files/init/swap.sh
,
Jun 22 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/2b34fcf6ef44ff57ed906ef81562def434a50a4f commit 2b34fcf6ef44ff57ed906ef81562def434a50a4f Author: Luigi Semenzato <semenzato@chromium.org> Date: Thu Jun 22 03:00:58 2017 swap.sh: add tunables This adds tunables for /proc/sys/vm/min_filelist_kbytes and /proc/sys/vm/extra_free_kbytes. Note min_filelist_kbytes is currently set via sysctl. That approach makes it hard to configure the values dynamically, so I'd rather do it here (and separately remove the sysctl settings). Some shell-fu is applied to unify the treatment of parameters. In addition, we change the location of the files with per-device override values. BUG= chromium:713415 TEST=partially tested, maybe will test a little more CQ-DEPEND=CL:484802 Change-Id: Icc24c4b8846f41d4fe5e8bed033229e599cdcba3 Reviewed-on: https://chromium-review.googlesource.com/484789 Commit-Ready: Luigi Semenzato <semenzato@chromium.org> Tested-by: Luigi Semenzato <semenzato@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org> (cherry picked from commit 751c01dfaf8ed60a7b08f80c107e13ebf56a8ac8) Reviewed-on: https://chromium-review.googlesource.com/542455 Reviewed-by: Ben Cheng <bccheng@chromium.org> Commit-Queue: Ben Cheng <bccheng@chromium.org> Tested-by: Ben Cheng <bccheng@chromium.org> Trybot-Ready: Ben Cheng <bccheng@chromium.org> (cherry picked from commit 2d8edd5c8bc25e82e87551a1693a9233a83508a5) Reviewed-on: https://chromium-review.googlesource.com/544555 [delete] https://crrev.com/4a786895a926760d921942a20882265ee82636f3/chromeos-base/swap-init/swap-init-0.0.1-r13.ebuild [modify] https://crrev.com/2b34fcf6ef44ff57ed906ef81562def434a50a4f/chromeos-base/swap-init/files/init/swap.sh
,
Jun 22 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/08cafd0c570a2913b77209a1e2fea1ae056e80ed commit 08cafd0c570a2913b77209a1e2fea1ae056e80ed Author: Luigi Semenzato <semenzato@chromium.org> Date: Thu Jun 22 03:32:44 2017 Reland "swap.sh: add tunables" This is a reland of 2b34fcf6ef44ff57ed906ef81562def434a50a4f Original change's description: > swap.sh: add tunables > > This adds tunables for /proc/sys/vm/min_filelist_kbytes > and /proc/sys/vm/extra_free_kbytes. > > Note min_filelist_kbytes is currently set via sysctl. > That approach makes it hard to configure the values > dynamically, so I'd rather do it here (and separately > remove the sysctl settings). > > Some shell-fu is applied to unify the treatment of > parameters. > > In addition, we change the location of the files > with per-device override values. > > BUG= chromium:713415 > TEST=partially tested, maybe will test a little more > CQ-DEPEND=CL:484802 > > Change-Id: Icc24c4b8846f41d4fe5e8bed033229e599cdcba3 > Reviewed-on: https://chromium-review.googlesource.com/484789 > Commit-Ready: Luigi Semenzato <semenzato@chromium.org> > Tested-by: Luigi Semenzato <semenzato@chromium.org> > Reviewed-by: Mike Frysinger <vapier@chromium.org> > (cherry picked from commit 751c01dfaf8ed60a7b08f80c107e13ebf56a8ac8) > Reviewed-on: https://chromium-review.googlesource.com/542455 > Reviewed-by: Ben Cheng <bccheng@chromium.org> > Commit-Queue: Ben Cheng <bccheng@chromium.org> > Tested-by: Ben Cheng <bccheng@chromium.org> > Trybot-Ready: Ben Cheng <bccheng@chromium.org> > (cherry picked from commit 2d8edd5c8bc25e82e87551a1693a9233a83508a5) > Reviewed-on: https://chromium-review.googlesource.com/544555 Bug: chromium:713415 Change-Id: I13734c1a365598de5b24ccf4ab4f0700b7b08889 Reviewed-on: https://chromium-review.googlesource.com/544656 Reviewed-by: Ben Cheng <bccheng@chromium.org> Commit-Queue: Ben Cheng <bccheng@chromium.org> Tested-by: Ben Cheng <bccheng@chromium.org> Trybot-Ready: Ben Cheng <bccheng@chromium.org> [delete] https://crrev.com/96f9c79d52a9d09e2d3d68815603dc416a6ecc01/chromeos-base/swap-init/swap-init-0.0.1-r13.ebuild [modify] https://crrev.com/08cafd0c570a2913b77209a1e2fea1ae056e80ed/chromeos-base/swap-init/files/init/swap.sh
,
Jun 30 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/5d8accb6ee87c5dd17a5d699123b8b7908dac342 commit 5d8accb6ee87c5dd17a5d699123b8b7908dac342 Author: Luigi Semenzato <semenzato@chromium.org> Date: Thu Jun 29 23:59:41 2017 Reland "swap.sh: add tunables" This is a reland of 2d8edd5c8bc25e82e87551a1693a9233a83508a5 Original change's description: > swap.sh: add tunables > > This adds tunables for /proc/sys/vm/min_filelist_kbytes > and /proc/sys/vm/extra_free_kbytes. > > Note min_filelist_kbytes is currently set via sysctl. > That approach makes it hard to configure the values > dynamically, so I'd rather do it here (and separately > remove the sysctl settings). > > Some shell-fu is applied to unify the treatment of > parameters. > > In addition, we change the location of the files > with per-device override values. > > BUG= chromium:713415 > TEST=partially tested, maybe will test a little more > CQ-DEPEND=CL:484802 > > Change-Id: Icc24c4b8846f41d4fe5e8bed033229e599cdcba3 > Reviewed-on: https://chromium-review.googlesource.com/484789 > Commit-Ready: Luigi Semenzato <semenzato@chromium.org> > Tested-by: Luigi Semenzato <semenzato@chromium.org> > Reviewed-by: Mike Frysinger <vapier@chromium.org> > (cherry picked from commit 751c01dfaf8ed60a7b08f80c107e13ebf56a8ac8) > Reviewed-on: https://chromium-review.googlesource.com/542455 > Reviewed-by: Ben Cheng <bccheng@chromium.org> > Commit-Queue: Ben Cheng <bccheng@chromium.org> > Tested-by: Ben Cheng <bccheng@chromium.org> > Trybot-Ready: Ben Cheng <bccheng@chromium.org> Bug: chromium:713415 Change-Id: Iefe7d09304952c4e774cebd9c821c6ffdf8b2c58 Reviewed-on: https://chromium-review.googlesource.com/557346 Reviewed-by: Luigi Semenzato <semenzato@chromium.org> Commit-Queue: Luigi Semenzato <semenzato@chromium.org> Tested-by: Luigi Semenzato <semenzato@chromium.org> [delete] https://crrev.com/9838d45060eba83dc1ae2dbd4bce8524264ea70e/chromeos-base/swap-init/swap-init-0.0.1-r13.ebuild [modify] https://crrev.com/5d8accb6ee87c5dd17a5d699123b8b7908dac342/chromeos-base/swap-init/files/init/swap.sh
,
Jul 26 2017
I hope we've added enough tunables. I am closing this so that we don't have the temptation to add more.
,
Jan 22 2018
|
||||||
►
Sign in to add a comment |
||||||
Comment 1 by sonnyrao@chromium.org
, Apr 19 2017