linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lauri Kasanen <curaga@operamail.com>
To: linux-hotplug@vger.kernel.org
Subject: [PATCH] udev: Lower the starting children_max -> drop the minimum required RAM from 23mb to 5mb
Date: Sun, 03 Jun 2012 15:28:08 +0000	[thread overview]
Message-ID: <1338737288.24120.140661084367789.5D16C15D@webmail.messagingengine.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1246 bytes --]

Hi all

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.

PS: Please CC me.

Signed-off-by: Lauri Kasanen <curaga@operamail.com>
---
 src/udev/udevd.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/udev/udevd.c b/src/udev/udevd.c
index 7905310..229031c 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);
 
-- 
1.7.2.1

-- 
http://www.fastmail.fm - The professional email service


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-udev-Lower-the-starting-children_max-drop-the-minimu.patch --]
[-- Type: text/x-diff; name="0001-udev-Lower-the-starting-children_max-drop-the-minimu.patch", Size: 1415 bytes --]

From f08a54bd6b39d448702d8dcbc59910fea419c456 Mon Sep 17 00:00:00 2001
From: Lauri Kasanen <curaga@operamail.com>
Date: Sun, 3 Jun 2012 18:11:58 +0300
Subject: [PATCH] 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.

Signed-off-by: Lauri Kasanen <curaga@operamail.com>
---
 src/udev/udevd.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/udev/udevd.c b/src/udev/udevd.c
index 7905310..229031c 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);
 
-- 
1.7.2.1


             reply	other threads:[~2012-06-03 15:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-03 15:28 Lauri Kasanen [this message]
2012-06-04 14:38 ` [PATCH] udev: Lower the starting children_max -> drop the minimum required RAM from 23mb to 5mb Kay Sievers
2012-06-04 16:21 ` Lauri Kasanen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1338737288.24120.140661084367789.5D16C15D@webmail.messagingengine.com \
    --to=curaga@operamail.com \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).