Ever since AMD launched their EPYC CPU for servers I needed to confirm it, however I didn’t contain the opportunity till currently, when Packet.glean started offering bare steel servers for a cheap ticket. So I started a pair of cases to confirm Percona Server for MySQL under this CPU. In this benchmark, I came all the draw via some attention-grabbing discrepancies in efficiency between AMD and Intel CPUs when working under systemd .
The command up
To test CPU efficiency, I aged a learn-finest in-memory sysbench OLTP benchmark, because it burns CPU cycles and no IO is performed by Percona Server.
For this benchmark I aged Packet.glean c2.medium.x86 cases powered by AMD EPYC 7401P processors. The OS is exposed to forty eight CPU threads.
For the OS I tried
- Ubuntu 16.04 with default kernel Four.Four and upgraded to Four.15
- Ubuntu 18.04 with kernel Four.15
- Percona Server started from SystemD and with out SystemD (for reasons which is in a neighborhood to change into obvious later)
To contain some aspects for comparison, I also ran a identical workload on my 2 socket Intel CPU server, with CPU: Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz. I look here’s no longer most most fashioned Intel CPU, however this used to be the correct I had at the time, and it also gave forty eight CPU Threads.
Or in tabular format:
|Threads||Ubuntu 16, kernel Four.Four; systemd||
Ubuntu 16, kernel Four.Four;
|20||15347.Sixty eight||15347.fifty six||14756.27|
|forty two||19374.86||19463.08||21537.Seventy 9|
|fifty six||20548.51||20362.31||23768.forty 9|
|Sixty Four||20860.51||20729.fifty two||23797.14|
|72||21123.Seventy one||21001.06||23645.ninety five|
|ninety||21622.fifty four||21441.seventy three||23486.29|
|128||22161.forty two||22031.Fifty three||23315.33|
|512||19524.forty one||19381.69||19181.Seventy one|
There are few conclusions we can survey from this files
- AMD EPYC CPU scales quite well to the sequence of CPU Threads
- Basically the most fashioned kernel helps to lift the throughput.
Now, let’s review the effects for Ubuntu 18.04
|Threads||Ubuntu 18, systemd|
|forty two||20493.Fifty seven||17360.fifty six|
|forty eight||22217.forty seven||17906.Four|
|fifty six||22564.Four||17931.Eighty three|
|Sixty Four||22590.29||17902.ninety five|
|72||22472.seventy five||17857.seventy three|
|80||22421.ninety 9||17766.seventy six|
This is the place the consequence stunned me: on Ubuntu 18.04 with SystemD working Percona Server for MySQL as a provider the throughput used to be as a lot as 24% higher than if Percona Server for MySQL is started from a bash shell. I quit no longer know exactly what causes this dramatic distinction—systemd uses completely different slices for products and providers and particular person instructions, and in some way it affects the efficiency.
To place a baseline, I ran the identical benchmark on my Intel box, working Ubuntu 16, and I tried two kernels: Four.Thirteen and Four.15
|Threads||Ubuntu 16, kernel Four.Thirteen, systemd||Ubuntu 16, kernel Four.15, systemd||
Ubuntu 16, kernel Four.15, NO systemd
|Four||2929.sixty three||3186.01||3338.forty seven|
|8||6075.seventy three||6279.forty 9||6624.forty 9|
|20||12790.ninety six||12599.seventy eight||14147.1|
|24||14213.Sixty eight||14659.forty 9||15716.sixty one|
|forty two||18671.14||19808.92||21875.eighty Four|
|Sixty Four||19946.Fifty seven||21457.32||24054.09|
|ninety||20194.seventy eight||21195.sixty one||23945.93|
|256||20410.55||20952.Sixty Four||22775.sixty three|
Right here we survey the reverse consequence with SystemD: Percona Server working from a bash shell reveals the higher throughput in comparison with the SystemD provider. So for some cause, systemd works in a different way for AMD and Intel CPUs. Please let me know in case you’ve any solutions on the final note technique to kind out the impact that systemd has on efficiency.
So there are some conclusions from these results:
- AMD EPYC reveals a factual efficiency scalability; the fresh kernel helps to reinforce it
- systemd reveals completely different results on throughput for AMD and Intel CPUs
- With AMD the throughput declines for a high concurrent workload with 512 threads, while Intel does no longer display camouflage a decline.