Linux check the number of physical CPUs, cores, logical CPUs, and linux
When learning swoole, it is recommended that the number of worker processes opened is the number of cpu cores1-4 times. So let’s learn how to check the CPU core count
# 查看物理CPU个数
cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l
# 查看每个物理CPU核数
cat /proc/cpuinfo| grep "cpu cores"| uniq
# 查看逻辑CPU个数
cat /proc/cpuinfo| grep "processor"| wc -l<br /><br /># 查看CPU信息(型号)<br />cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c
Copy after login
http://www.bkjia.com/PHPjc/1087778.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1087778.htmlTechArticleLinux Check the number of physical CPUs, number of cores, number of logical CPUs, and the number of linux. When learning swoole, it is recommended The number of worker processes opened is 1-4 times the number of CPU cores. So I learned how to check the CPU core number...