Skip to content

Conversation

@aggifford
Copy link

Replaces line-by-line bash loop with grep/awk commands for processing /proc/cpuinfo, reducing execution time from 40+ seconds to <1 second on systems with 768+ threads.

On high thread count systems (e.g., dual AMD EPYC with 768 threads), /proc/cpuinfo contains ~19,200 lines. The original while-loop implementation caused nhc_hw_gather_data() to timeout even with TIMEOUT=600.

The optimized implementation uses grep and awk for direct value extraction, maintaining identical functionality while dramatically improving performance.

Fixes #30

Replaces line-by-line bash loop with grep/awk commands for processing
/proc/cpuinfo, reducing execution time from 40+ seconds to <1 second
on systems with 768+ threads.

On high thread count systems (e.g., dual AMD EPYC with 768 threads),
/proc/cpuinfo contains ~19,200 lines. The original while-loop implementation
caused nhc_hw_gather_data() to timeout even with TIMEOUT=600.

The optimized implementation uses grep and awk for direct value extraction,
maintaining identical functionality while dramatically improving performance.

Fixes mej#30
@KasperSkytte
Copy link

I'm having the same issue on even 288 thread zen3 servers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Optimize nhc_hw_gather_data for gathering CPU information on KNL nodes

3 participants