1
LazyZhu 2015-07-05 16:38:14 +08:00
|
2
ryd994 2015-07-05 18:44:37 +08:00 via Android
cat /proc/cpuinfo
慢慢看 |
3
msg7086 2015-07-06 08:28:12 +08:00
4核
worker_processes 4; worker_cpu_affinity 0001 0010 0100 1000; 2核 worker_processes 2; worker_cpu_affinity 01 10; 别说你举一反三都不行。 |
4
70599 OP @msg7086 这是针对一个cpu的配置是吧?我下面这样的cpuinfo看起来像有两个单核逻辑cpu,我看对了吗?
cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 45 model name : Intel(R) Xeon(R) CPU E5-2650 0 @ 2.00GHz stepping : 7 microcode : 1805 cpu MHz : 1795.673 cache size : 20480 KB physical id : 2 siblings : 1 core id : 0 cpu cores : 1 apicid : 2 initial apicid : 2 fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : fpu de tsc msr pae cx8 sep cmov pat clflush mmx fxsr sse sse2 ss ht syscall nx lm rep_good unfair_spinlock pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 popcnt tsc_deadline_timer aes hypervisor lahf_lm arat epb xsaveopt pln pts dts bogomips : 3591.34 clflush size : 64 cache_alignment : 64 address sizes : 46 bits physical, 48 bits virtual power management: processor : 1 vendor_id : GenuineIntel cpu family : 6 model : 45 model name : Intel(R) Xeon(R) CPU E5-2650 0 @ 2.00GHz stepping : 7 microcode : 1805 cpu MHz : 1795.673 cache size : 20480 KB physical id : 2 siblings : 1 core id : 0 cpu cores : 1 apicid : 2 initial apicid : 2 fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : fpu de tsc msr pae cx8 sep cmov pat clflush mmx fxsr sse sse2 ss ht syscall nx lm rep_good unfair_spinlock pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 popcnt tsc_deadline_timer aes hypervisor lahf_lm arat epb xsaveopt pln pts dts bogomips : 3591.34 clflush size : 64 cache_alignment : 64 address sizes : 46 bits physical, 48 bits virtual power management: 按照双核CPU的配置来? |
5
msg7086 2015-07-06 23:13:33 +08:00
$ grep vendor /proc/cpuinfo | wc -l
2 当然按照双核来。 (其实是按照线程数,比如i7 4c8t就用8线程比较好。 |