From: Lauri Kasanen Date: Sun, 3 Jun 2012 15:11:58 +0000 (+0300) Subject: udev: lower the starting children_max -> drop the minimum required RAM from 23mb... X-Git-Tag: v185~6 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a52289f7f50b3e851bf831cb692eea9ff02e9b50;p=systemd udev: lower the starting children_max -> drop the minimum required RAM from 23mb to 5mb Udev was the limiting factor for us on low-RAM systems. Given an average RSS of 180kb, 128 workers would require ~23mb of RAM. Now, please consider what happens when there is only, say, 15mb free. Udev protects itself from OOM, and the kernel can do nothing but panic. 28 workers * 0.18mb = ~5mb. This change should not affect more powerful systems much, given that they still get the addition from the amount of RAM. --- diff --git a/src/udev/udevd.c b/src/udev/udevd.c index 79053102..229031cc 100644 --- a/src/udev/udevd.c +++ b/src/udev/udevd.c @@ -1353,9 +1353,9 @@ int main(int argc, char *argv[]) /* set value depending on the amount of RAM */ if (memsize > 0) - children_max = 128 + (memsize / 8); + children_max = 28 + (memsize / 8); else - children_max = 128; + children_max = 28; } log_debug("set children_max to %u\n", children_max);