Re: Determining the number of CPU cores and hyperthreads from userspace

2021-09-19 Thread Abel Abraham Camarillo Ojeda
is this useful?: $ cat sysconf.c #include #include int main() { printf("nproc configured %ld\n", sysconf(_SC_NPROCESSORS_CONF)); printf("nproc online %ld\n", sysconf(_SC_NPROCESSORS_ONLN)); return 0; } $ cc -o sysconf sysconf.c $ ./sysconf nproc configured 4 nproc

Re: Determining the number of CPU cores and hyperthreads from userspace

2021-09-19 Thread Chris Bennett
On Sun, Sep 19, 2021 at 01:37:05PM -0400, Daniel Wilkins wrote: > Hyperthreads are easy: they've been disabled for years (unless they got > flipped on and I didn't notice.) > Does the setting in the BIOS need to be turned off also? Or is it irrelevant? I had a server for a while where the

Re: Determining the number of CPU cores and hyperthreads from userspace

2021-09-19 Thread Daniel Wilkins
Hyperthreads are easy: they've been disabled for years (unless they got flipped on and I didn't notice.)

Determining the number of CPU cores and hyperthreads from userspace

2021-09-19 Thread Baptiste Jonglez
Hello, In the interest of fetching this information from Ansible for the GCC compile farm [1], I would like to determine the number of cores vs. hyper-threads on a system. With OpenBSD 6.9, this is what I get with "sysctl hw" on a dual 6-core Xeon system: hw.model=Intel(R) Xeon(R) CPU E5-2640 0