Hello,
on a cluster that I have installed for a client, the function nhc_hw_gather_data() spends a lot of time parsing /proc/cpuinfo.
[root@<redacted> ~]# time nhc
real 0m9.824s
user 0m1.532s
sys 0m8.232s
With the proposed patch, the time is now reduced by a factor of 5+
[root@<redacted>~]# time nhc
real 0m1.692s
user 0m1.563s
sys 0m0.105s
The patch works by caching the content of /proc/cpuinfo in a local variable
Informations :
- OS : Red Hat Enterprise Linux release 8.8 (Ootpa)
- Kernel : 4.18.0-477.27.1.el8_8.x86_64
- CPU : Dual-socket with AMD EPYC 9654 96-Core Processor
0001-Makes-proc-cpuinfo-parsing-faster-by-caching-the-con.patch