Re: [PATCH] udev: Lower the starting children_max -> drop the minimum required RAM from 23mb to 5mb

Kay Sievers <[email protected]>
Newsgroups gmane.linux.hotplug.devel
Message-ID <CAPXgP10Xp6KtgaMwer=nsg8zHjE4QjEOfm53d2B6s7wYKdKpPA@mail.gmail.com>
On Sun, Jun 3, 2012 at 5:28 PM, Lauri Kasanen <[email protected]> wrote:
> Udev was the limiting factor for us on low-RAM systems.
> Given an average RSS of 180kb, 128 workers would require ~23mb of RAM.

All workers are direct clone()s of the master process without exec(),
you are sure that every of them uses additional 128k?

> 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.

It does, if does not get started by systemd.

> 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.

That logic is from the time we needed to fork() for every event. Even
on a system with lots of devices we usually do not need more than
30-50 workers. Today, workers are re-used; we could lower that limit
even more if needed, without bad side effects.

Applied.

Thanks,
Kay
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.