crond consumes high cpu when nofile limit is high
Issue
- With multiple small crond jobs, we can see peak of CPU consumption by crond.
$ ulimit -n
5242880
- In strace, we can see huge number of close sycall of non existing file descriptors:
22199 09:33:01.247518 [00007f42ab343078] close(1012) = -1 EBADF (Bad file descriptor) <0.000013>
22199 09:33:01.247581 [00007f42ab343078] close(1013) = -1 EBADF (Bad file descriptor) <0.000014>
22199 09:33:01.247630 [00007f42ab343078] close(1014) = -1 EBADF (Bad file descriptor) <0.000014>
22199 09:33:01.247681 [00007f42ab343078] close(1015) = -1 EBADF (Bad file descriptor) <0.000028>
Environment
- Red Hat Enterprise Linux 8 - 9
- cronie
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.