0

I have a CPU heavy data mining job that's parallelizable. Each job run takes ~10 minutes. The job isn't heavy in IO, it's mostly heavy in CPU compute. I have a 32-core rig with 2 threads per core and hyperthreading.

My first question is whether it's optimal to run 32 or 64 jobs in parallel? My second question is what per-job performance hit will I expect when I go from 32 jobs in parallel to 64 jobs (assume that IO isn't a bottleneck)?

Architecture:        x86_64
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Little Endian
CPU(s):              32
On-line CPU(s) list: 0-31
Thread(s) per core:  2
Core(s) per socket:  8
Socket(s):           2
NUMA node(s):        2
Vendor ID:           GenuineIntel
CPU family:          6
Model:               45
Model name:          Intel(R) Xeon(R) CPU E5-2680 0 @ 2.70GHz
Stepping:            7
CPU MHz:             3092.334
CPU max MHz:         3500.0000
CPU min MHz:         1200.0000
BogoMIPS:            5386.65
Virtualisation:      VT-x
L1d cache:           32K
L1i cache:           32K
L2 cache:            256K
L3 cache:            20480K
NUMA node0 CPU(s):   0-7,16-23
NUMA node1 CPU(s):   8-15,24-31
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 arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm epb pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm ida arat pln pts md_clear flush_l1d
0

Intel statistics say that using the two threads of a core results in 30% more throughput. So to get as much CPU power as possible, you can run as many jobs as there are threads, which is 64 in your case.

I don't usually leave a core for use by the operating system, since its needs are rather modest in comparison.

However, that many threads executing causes much thread-switching, so could slow down the execution.

In short, you will have to experiment. The optimal number of jobs would be somewhere between 32 and 64, but it also depends on the nature of the task that you are running.

| improve this answer | |
0

Rule of thumb if you're running inside your own desktop OS & still needing to use it…

simultaneous jobs == (real cores - 1);

Any more & you are relying on the HT cores sharing 'nicely'.
The -1 is to give any other task somewhere to run. Personally, any task like that I would run in a VM set to use my physical core count, rather than share my working OS with it.

That way my desktop OS isn't unduly disturbed by the VM running hard.

If the machine has no other tasks, ymmv. I don't know your use-case.
I don't do data mining, but that would be for heavy video compression or code compiling.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.