SUSE Support

Here When You Need Us

The number of udev workers can exhaust the system memory in some cases

This document (7022793) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 12 SP3
SUSE Linux Enterprise Server 12 SP2
SUSE Linux Enterprise Server 11 SP4

Situation

udev spawns multiple workers to handle hardware events sent by the kernel. However for some systems, the number of events sent by the kernel during the boot process can be high and so does the number of spawned workers due to a specific hardware such as a network adapter with a lot of tx queues or some specific storage hardware. This could cause memory exhaustion resulting in a possible system crash.

Resolution

Boot with Kernel boot parameter "udev.children-max=NUM" where NUM value can be tuned by the user. 
 
It is also worth noting that a reasonable size of swap might help avoiding out of memory conditions.

Cause

To prevent memory exhaustion, udev limits the number of workers. The limit is based on the following formula:
 
num_of_workers = 8 + num_of_cpus * 64 
 
The formula implicitly assumes that a system with a high number of cpus usually has plenty of memory. However it can cause out of memory errors on systems where the assumption is not true. For example, when the size of system memory is relatively small compared to the high number of cpus. 
 
 Since a universal value is pretty hard to find, it is still possible to tune the value through kernel parameter "udev.children_max", on systems where the default value could be problem. 
 
 See systemd-udevd(8) man page for more details.

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:7022793
  • Creation Date: 29-Mar-2018
  • Modified Date:12-Mar-2021
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

tick icon

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

tick icon

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.