# Multiple socket CPUs with poor performance

**URL:** <https://discuss.ray.io/t/multiple-socket-cpus-with-poor-performance/4703>\
**Category:** Ray Core\
**Created:** [January 14, 2022, 6:31pm UTC](https://discuss.ray.io/t/multiple-socket-cpus-with-poor-performance/4703 "2022-01-14T18:31:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Phil\_Brodrick](https://avatars.discourse-cdn.com/v4/letter/p/d9b06d/32.png) [@Phil\_Brodrick](https://discuss.ray.io/u/Phil_Brodrick)\
**Post date:** [January 14, 2022, 6:31pm UTC](https://discuss.ray.io/t/multiple-socket-cpus-with-poor-performance/4703/1 "2022-01-14T18:31:56Z")

</div>

Hey there,

I’m using ray on a cluster where each node has a two-socket CPU with shared memory access (lscpu data below for clarity), 40 cores in total. When using simple calls to ray.init(), if num\_cpus is set to \> 20 (where multiple sockets would need to be spanned), performance tanks - top will show each raylet working at only about ~30%, and timing tests show poor performance as well. I’ve read through and tried a few different posts:

This one: [[rllib] Workload is not evenly distributed on a dual socket windows machine · Issue #14153 · ray-project/ray · GitHub](https://github.com/ray-project/ray/issues/14153) seemed relevant, but was closed without answer (there’s a related post on the discussion boards as well).  
As well as this one: [Restricting Ray to particular NUMA zone? · Issue #1634 · ray-project/ray · GitHub](https://github.com/ray-project/ray/issues/1634), though I only looked at using numactl on the initial job, as the plasma seems deprecated now.

Anyone have any thoughts on how to set things up so that ray can take full advantage of all cores?

I’ll note that in older versions of ray (\< 1.5) this wasn’t an issue. Package conflicts force the use of more recent versions however.

Architecture: x86\_64  
CPU op-mode(s): 32-bit, 64-bit  
Byte Order: Little Endian  
CPU(s): 40  
On-line CPU(s) list: 0-39  
Thread(s) per core: 1  
Core(s) per socket: 20  
Socket(s): 2  
NUMA node(s): 4  
Vendor ID: GenuineIntel  
CPU family: 6  
Model: 85  
Model name: Intel(R) Xeon(R) Gold 6230 CPU @ 2.10GHz  
Stepping: 7  
CPU MHz: 799.932  
CPU max MHz: 3900.0000  
CPU min MHz: 800.0000  
BogoMIPS: 4200.00  
Virtualization: VT-x  
L1d cache: 32K  
L1i cache: 32K  
L2 cache: 1024K  
L3 cache: 28160K  
NUMA node0 CPU(s): 0-2,5,6,10-12,15,16  
NUMA node1 CPU(s): 3,4,7-9,13,14,17-19  
NUMA node2 CPU(s): 20-22,25,26,30-32,35,36  
NUMA node3 CPU(s): 23,24,27-29,33,34,37-39  
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant\_tsc art arch\_perfmon pebs bts rep\_good nopl xtopology nonstop\_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds\_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4\_1 sse4\_2 x2apic movbe popcnt tsc\_deadline\_timer aes xsave avx f16c rdrand lahf\_lm abm 3dnowprefetch epb cat\_l3 cdp\_l3 intel\_pt ssbd mba ibrs ibpb stibp ibrs\_enhanced tpr\_shadow vnmi flexpriority ept vpid fsgsbase tsc\_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm mpx rdt\_a avx512f avx512dq rdseed adx smap clflushopt clwb avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 cqm\_llc cqm\_occup\_llc cqm\_mbm\_total cqm\_mbm\_local dtherm ida arat pln pts hwp hwp\_act\_window hwp\_epp hwp\_pkg\_req pku ospke avx512\_vnni md\_clear spec\_ctrl intel\_stibp flush\_l1d arch\_capabilities
