Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
preview: Use dumb-init as PID 1 (#2982)
build_docs.pl runs a number of git commands through its normal course of operation. After a certain point, these git commands will implicitly run git gc in the background. By design, the original git process forks off the gc child process and forgets about it. The child process will get reparented to PID 1, which is either build_docs.pl or a shell. Neither of those will handle SIGCHLD for processes they're not aware of, so the number of zombie processes grows indefinitely. With a large number of zombie processes (80k processes observed in elastic-apps-web), metricbeat starts consuming all available CPU resources, severely degradating the performance of the cluster. This has a side effect of reducing the network performance to around ~50Mbps and increasing the I/O wait to ~30%. dumb-init was picked because it's dumb and doesn't try to do anything fancy. There should be nothing that interferes with build_docs.pl's operation. Signals are forwarded to dumb-init's child. dumb-init will also detach itself from the controlling TTY and attach its child process instead. Ticket: https://elasticco.atlassian.net/browse/SRVCS-1367 Signed-off-by: Andrew Gunnerson <[email protected]>
- Loading branch information