[RHEL] fork() System Call Slow Under Certain Workload

Solution Verified - Updated -

Issue

  • In software using fork() system call to spawn child processes to handle client queries, a situation can arise in which the fork() can take an unreasonably long time. Under an idle situation, this process of spawning a child took a couple of milliseconds. However, as parent process' memory size increases, fork() will take more and more time to complete. A majority of time appears to be spent on copying the parent's memory page table for the child.
  • Eventually, fork() can be seen to take upwards of 1-5 seconds to complete, drastically reducing performance of the overlying application.

Environment

  • Red Hat Enterprise Linux (all versions)

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In