Z
Z
zvzz2014-11-01 16:27:37
Network administration
zvzz, 2014-11-01 16:27:37

Is an Amazon EC2 c3.xlarge CPU 50 times slower than a cheap $20 VM?

Good afternoon
A small site with a load of 1-2 kilopersons per day lives on an Amazon c3.xlarge instance (4x Xeon E5-2680 / 8Gb RAM) under LAMP.
A similar test server lives for him on a cheap instance of a small hoster under OpenVZ. There is a pre-release version of the site, a copy of the prod-base. The difference in software and settings between the servers is unknown, but in theory they are identical.
The difference in the execution of requests to the site api is 50 times: on the test 0.2 sec, on prod - 10 sec. What is slow is the harmless PHP code (5.5, no networking and IO, mostly string comparison) that processes a data set of several thousand records, but does it instantly on the test and takes a very long time in production. The difference grows linearly. The base works equally fast.
I know EC2 is comparatively slow, but if a $20 server is 50 times faster than a $200 server, it's probably not an error.
I will be very glad to any councils.
CPU prod

processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 62
model name      : Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz
stepping        : 4
microcode       : 0x415
cpu MHz         : 2793.322
cache size      : 25600 KB
physical id     : 1
siblings        : 4
core id         : 1
cpu cores       : 1
apicid          : 35
initial apicid  : 35
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 dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat epb xsaveopt pln pts dts tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms
bogomips        : 6784.63
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual

CPU test
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 58
model name      : Intel(R) Xeon(R) CPU E3-1245 V2 @ 3.40GHz
stepping        : 9
cpu MHz         : 3392.317
cache size      : 8192 KB
physical id     : 0
siblings        : 8
core id         : 0
cpu cores       : 4
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 dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat epb xsaveopt pln pts dts tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms
bogomips        : 6784.63
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Puma Thailand, 2014-11-01
@opium

Dear, it's not exactly the CPU, it's faster on Amazon than on your virtual machine, it's about settings, code and other goodies.
Actually install a profiler and see where your code slows down, too lazy to figure it out yourself, hire an intelligent admin.
pumainthailand.com/congrats-roman-you-are-in-our-top-5

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question