My python program (single threaded) uses 59 seconds to process a file on my Mac Pro, and it's info is below:
MacBook Pro (15-inch, 2019)
2.4 GHz 8-Core Intel Core i9
16 GB 2400 MHz DDR4
Radeon Pro 560X 4 GB
Intel UHD Graphics 630 1536 MB
However, it takes 1.43 minute to process the same file on a server, which have multiple cores. The CentOs cpus is below:
# cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 85
model name : Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz
stepping : 4
microcode : 0x1
cpu MHz : 2200.002
cache size : 14080 KB
physical id : 0
siblings : 32
core id : 0
cpu cores : 16
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx avx512f avx512dq rdseed adx smap avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1
bogomips : 4400.00
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
# free -mh
total used free shared buff/cache available
Mem: 220G 26G 10G 1.2G 183G 191G
Each container probably has 2 cores with 8G memory each.
Does it make sense that the CentOs takes almost double time to complete the same task?
/proc/cpuinfo
would suggest you only have a single thread available. If yes, then you may well be contending for CPU time with other virtual machines... consider also (as others have said) that the i9 is able to do significantly more work than the Xeon... CentOS won't likely be the "problem", the underlying system (and CPU) will be.