I got puzzled setting up server with the following cpu facts:
"ansible_processor": [
"GenuineIntel",
"Intel(R) Xeon(R) CPU E5-2650L v3 @ 1.80GHz",
"GenuineIntel",
"Intel(R) Xeon(R) CPU E5-2650L v3 @ 1.80GHz"
],
"ansible_processor_cores": 1,
"ansible_processor_count": 2,
"ansible_processor_threads_per_core": 1,
"ansible_processor_vcpus": 2,
It seems to report the number of CPUs correctly but what should I base my workers (threads) number on? I was sure I'd use ansible_processor_cores
but it seems to report only one (1 - sic!) despite reporting two processors! How do you get the number of threads available for worker processes?
Looking into the code ansible_processor_vcpus
should be your choice.
It should contain number of processors in /proc/cpuinfo (which actually is a number of total threads, as per this answer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With