{"id":10,"date":"2020-05-04T17:33:29","date_gmt":"2020-05-04T17:33:29","guid":{"rendered":"https:\/\/www.scalebench.com\/?p=10"},"modified":"2026-08-14T20:07:36","modified_gmt":"2026-08-14T20:07:36","slug":"aws-ec2-m5-vs-m5a-benchmarks","status":"publish","type":"post","link":"https:\/\/www.scalebench.com\/blog\/?p=10","title":{"rendered":"AWS EC2 M5 vs. M5a benchmarks"},"content":{"rendered":"\n<p class=\"has-small-font-size wp-block-paragraph\">AWS provides numerous types of cloud VMs, the M series is a general purpose flavour with several options.\u00a0 Two of interest are the base M5 and the M5a, which pits Intel against AMD, with interesting results.<\/p>\n\n\n\n<p class=\"has-small-font-size wp-block-paragraph\">Specs are the following,<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>M5.4xlarge<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\n<ul class=\"wp-block-list\">\n<li class=\"has-small-font-size\">16 cores \/ 3140.90 mhz \/&nbsp;Intel(R) Xeon(R) Platinum 8175M CPU @ 2.50GHz<\/li>\n\n\n\n<li class=\"has-small-font-size\">L1d: 32 L1i: 32 L2: 1024 L3: 33792<\/li>\n\n\n\n<li class=\"has-small-font-size\">RAM: 61.47 GB \/ swap: 0.00 GB \/ hugepages: 0.00 GB \/ hp size: 2.00 MB<\/li>\n\n\n\n<li class=\"has-small-font-size\">nvme0n1p1, 1023.00 GB, xfs<\/li>\n\n\n\n<li class=\"has-small-font-size\">Amazon Linux 2 52.12.100.150<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>M5a.4xlarge<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\n<ul class=\"wp-block-list\">\n<li class=\"has-small-font-size\">16 cores \/ 2468.86 mhz \/&nbsp;AMD EPYC 7571<\/li>\n\n\n\n<li class=\"has-small-font-size\">L1d: 32 L1i: 64 L2: 512 L3: 8192<\/li>\n\n\n\n<li class=\"has-small-font-size\">RAM: 61.80 GB \/ swap: 0.00 GB \/ hugepages: 0.00 GB \/ hp size: 2.00 MB<\/li>\n\n\n\n<li class=\"has-small-font-size\">nvme0n1p1, 1023.00 GB, xfs<\/li>\n\n\n\n<li class=\"has-small-font-size\">Amazon Linux 2 52.43.208.84<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>\nTesting Parameters\n<\/strong><\/h4>\n\n\n<p class=\"has-small-font-size wp-block-paragraph\">using the Scalebench platform to leverage Sysbench benchmarking tool,<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\n<ul class=\"wp-block-list\">\n<li class=\"has-small-font-size\">Sysbench benchmark suite<\/li>\n\n\n\n<li class=\"has-small-font-size\">3 X 60 second runs<\/li>\n\n\n\n<li class=\"has-small-font-size\">cpu \u2013 max prime (N=2000)<\/li>\n\n\n\n<li class=\"has-small-font-size\">memory \u2013 seqrd, seqwr, rndrd, rndwr (default settings)<\/li>\n\n\n\n<li class=\"has-small-font-size\">disk \u2013 seqrd, seqwr, rndrd, rndwr (default settings)<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Results<\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>CPU<\/strong><\/h3>\n\n\n\n<p class=\"has-small-font-size wp-block-paragraph\">the sysbench cpu test calculates a set of prime numbers and counts the total iterations as events.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"400\" src=\"https:\/\/www.scalebench.com\/wp-content\/uploads\/2026\/08\/1-1.jpg\" alt=\"\" class=\"wp-image-11\" srcset=\"https:\/\/www.scalebench.com\/blog\/wp-content\/uploads\/2026\/08\/1-1.jpg 700w, https:\/\/www.scalebench.com\/blog\/wp-content\/uploads\/2026\/08\/1-1-300x171.jpg 300w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/figure>\n\n\n\n<p class=\"has-small-font-size wp-block-paragraph\">from the results, we can see that the m5a performs about 15% faster for 1-8 simultaneous threads, and then reverses this trend and performs about 15% slower for 16-64 threads.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>MEMORY<\/strong><\/h3>\n\n\n\n<p class=\"has-small-font-size wp-block-paragraph\">The memory tests consist of 4 separate tests which read\/write in sequential\/random fashion.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"300\" src=\"https:\/\/www.scalebench.com\/wp-content\/uploads\/2026\/08\/1-2.jpg\" alt=\"\" class=\"wp-image-12\" srcset=\"https:\/\/www.scalebench.com\/blog\/wp-content\/uploads\/2026\/08\/1-2.jpg 700w, https:\/\/www.scalebench.com\/blog\/wp-content\/uploads\/2026\/08\/1-2-300x129.jpg 300w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"300\" src=\"https:\/\/www.scalebench.com\/wp-content\/uploads\/2026\/08\/1-3.jpg\" alt=\"\" class=\"wp-image-13\" srcset=\"https:\/\/www.scalebench.com\/blog\/wp-content\/uploads\/2026\/08\/1-3.jpg 700w, https:\/\/www.scalebench.com\/blog\/wp-content\/uploads\/2026\/08\/1-3-300x129.jpg 300w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"300\" src=\"https:\/\/www.scalebench.com\/wp-content\/uploads\/2026\/08\/1-4.jpg\" alt=\"\" class=\"wp-image-14\" srcset=\"https:\/\/www.scalebench.com\/blog\/wp-content\/uploads\/2026\/08\/1-4.jpg 700w, https:\/\/www.scalebench.com\/blog\/wp-content\/uploads\/2026\/08\/1-4-300x129.jpg 300w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"300\" src=\"https:\/\/www.scalebench.com\/wp-content\/uploads\/2026\/08\/1-5.jpg\" alt=\"\" class=\"wp-image-15\" srcset=\"https:\/\/www.scalebench.com\/blog\/wp-content\/uploads\/2026\/08\/1-5.jpg 700w, https:\/\/www.scalebench.com\/blog\/wp-content\/uploads\/2026\/08\/1-5-300x129.jpg 300w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/figure>\n\n\n\n<p class=\"has-small-font-size wp-block-paragraph\">Looking at the results we see m5a is very strong for sequential reads, especially for &lt; 8 threads. Yet both the random read\/write benchmarks give the advantage to the m5. To explain these differences, both the thread management of the cpus and the cpu caches (the intel chip has a generous L2\/L3 cache) would be possible avenues to explore.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>DISK<\/strong><\/h3>\n\n\n\n<p class=\"has-small-font-size wp-block-paragraph\">We again do 4 separate tests read\/write in sequential\/random fashion, the big difference of course is the speed, location and durability of the data.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"300\" src=\"https:\/\/www.scalebench.com\/wp-content\/uploads\/2026\/08\/1-6.jpg\" alt=\"\" class=\"wp-image-16\" srcset=\"https:\/\/www.scalebench.com\/blog\/wp-content\/uploads\/2026\/08\/1-6.jpg 700w, https:\/\/www.scalebench.com\/blog\/wp-content\/uploads\/2026\/08\/1-6-300x129.jpg 300w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"300\" src=\"https:\/\/www.scalebench.com\/wp-content\/uploads\/2026\/08\/1-7.jpg\" alt=\"\" class=\"wp-image-17\" srcset=\"https:\/\/www.scalebench.com\/blog\/wp-content\/uploads\/2026\/08\/1-7.jpg 700w, https:\/\/www.scalebench.com\/blog\/wp-content\/uploads\/2026\/08\/1-7-300x129.jpg 300w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"300\" src=\"https:\/\/www.scalebench.com\/wp-content\/uploads\/2026\/08\/1-8.jpg\" alt=\"\" class=\"wp-image-18\" srcset=\"https:\/\/www.scalebench.com\/blog\/wp-content\/uploads\/2026\/08\/1-8.jpg 700w, https:\/\/www.scalebench.com\/blog\/wp-content\/uploads\/2026\/08\/1-8-300x129.jpg 300w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"300\" src=\"https:\/\/www.scalebench.com\/wp-content\/uploads\/2026\/08\/1-9.jpg\" alt=\"\" class=\"wp-image-19\" srcset=\"https:\/\/www.scalebench.com\/blog\/wp-content\/uploads\/2026\/08\/1-9.jpg 700w, https:\/\/www.scalebench.com\/blog\/wp-content\/uploads\/2026\/08\/1-9-300x129.jpg 300w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/figure>\n\n\n\n<p class=\"has-small-font-size wp-block-paragraph\">Clearly the disk benchmarks are being throttled and hit a ceiling for 2+&nbsp; threads for all operations aside from sequential reads, and there is basically no difference between the two VM types. This is not surprising as the default AWS storage is EBS, which is non-local to the VM and accessed via a network link. The limits for each VM type can be found&nbsp;<a href=\"https:\/\/docs.aws.amazon.com\/AWSEC2\/latest\/UserGuide\/ebs-optimized.html\" target=\"_blank\" rel=\"noreferrer noopener\">here&nbsp;<\/a>and&nbsp;<a href=\"https:\/\/aws.amazon.com\/ebs\/features\/\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a>.<\/p>\n\n\n\n<p class=\"has-small-font-size wp-block-paragraph\">AWS has both I\/O and throughput limits for EBS and Sequential reads likely bundle the I\/O and so allows the tests to scale until hitting the throughput limit.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Takeaways<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li class=\"has-small-font-size\">for workloads that are predictable and are not expected to consistently implement load &gt; cpu threads the m5a gives a performance advantage. These include more OLTP like workloads. For heavier and more OLAP like workloads (i.e. reporting), the M5 is the better option.<\/li>\n\n\n\n<li class=\"has-small-font-size\">Workloads that are mainly sequential read based, (many web based data applications tend to be architected as time-series based and majority reads), could benefit from the M5a. Other applications that are heavy on writing data, and\/or either reading or writing data randomly at any spot in the database would be better off with the M5.<\/li>\n\n\n\n<li class=\"has-small-font-size\">If your application is heavy on disk usage, either datastore with a working dataset much larger than memory, or heavy writing generally, both VM types are throttled by the network storage that is block storage. This is setup for most of the larger cloud providers, sacrificing disk performance for separating storage from the processing to allow easy resizing and storage of data without the VM. For top disk performance, you may want to consider local storage instead.<\/li>\n<\/ol>\n\n\n\n<p class=\"has-small-font-size wp-block-paragraph\">In a future post, we\u2019ll compare EBS storage (both general and provisioned iops) to local storage (disks attached to the VM like in the old days), and show the difference.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>AWS provides numerous types of cloud VMs, the M series is a general purpose flavour with several options.\u00a0 Two of interest are the base M5 and the M5a, which pits Intel against AMD, with interesting results. Specs are the following, M5.4xlarge M5a.4xlarge Testing Parameters using the Scalebench platform to leverage Sysbench benchmarking tool, Results CPU [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-10","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.scalebench.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/10","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.scalebench.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.scalebench.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.scalebench.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.scalebench.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10"}],"version-history":[{"count":2,"href":"https:\/\/www.scalebench.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/10\/revisions"}],"predecessor-version":[{"id":23,"href":"https:\/\/www.scalebench.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/10\/revisions\/23"}],"wp:attachment":[{"href":"https:\/\/www.scalebench.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.scalebench.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.scalebench.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}