Multiple socket CPUs with poor performance

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 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, 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