As highlighted at the AWS re:Invent 2020, many customers are reaping the price-performance benefits of using the Arm Neoverse powered AWS Graviton2 processors. Amazon EC2 M6g, C6g, R6g, and C6gn instances provide up to 40% better price performance over x86-based Amazon EC2 instances.
In this blog, we showcase 51% performance benefits of running Memcached workloads on AWS Graviton2 based instances compared to equivalent x86-based instances. We are publishing a series of workload performance benchmarks on Graviton2 and recommend checking out our NGINX, Elasticsearch blogs.
Memcached is an open-source, high-performance, distributed memory object caching system and is a popular choice for powering real-time applications in web, mobile apps, gaming, ad-tech, and e-Commerce. It is an in-memory key-value store that offers higher application performance by removing the need to access disks or SSDs. By keeping its data in memory, it avoids delays and can access data much faster than traditional disk-based databases.
For performance benchmarking of Memcached we used memory-optimized Amazon EC2 R6g instances. These instances are ideal for running memory intensive workloads like Memcached. We installed Memcached open-source binaries on R6g and R5 instances and observed the following throughput and latency results:
Figure 1: Performance gain for R6g vs R5 instances for self-hosted Memcached deployment
Figure 2: Lower latency for R6g vs R5 instances for self-hosted Memcached deployment.
We deployed Memtier, an open-source high-throughput benchmarking tool for Memcached, on separate EC2 instances in the same VPC as Memcached instances. Each instance of Memcached received an identical load based on the parameters below.
Figure 3: Performance benchmarking test setup
Following input parameters were used while performing the benchmarking tests on R5 and R6g EC2 instances.
Table 1 Input parameters for benchmarking tests
Each test run generates 5 threads with 100 clients per thread, which gives 500 simultaneous connections (sessions). That adds up to 5 million number of requests sent each run from Memtier. The results in Table 1 show throughput (Operations/Sec) and latency (lower is better) values.
Table 2 Memcached performance results on R5 vs R6g
Following are the pre-requisites to build the test setup.
Memcached 1.6.6 requires Ubuntu 20.10 and may not be installed via the APT repository. Download the binary file (arm64 and x86_84) manually and then install it on respective EC2 instances (R6g and R5). Follow the steps mentioned here to install the Memtier benchmarking tool.
A sample input command to execute the Memtier tests is mentioned in the following command:
memtier_benchmark -s <Memcache_IP_address> -p 11211 --protocol=memcache_text --clients=100 --threads=5 --ratio=1:1 --key-pattern=R:R --key-minimum=16 --key-maximum=16 --data-size=128 --requests=10000 --run-count=20
While executing the benchmarking tests, we used Grafana to visualize the CPU utilization per core and overall CPU utilization metrics for each of the instances. Figure 4 and 5 show the utilization charts for R5 and R6g instances.
Figure 4: CPU utilization graph for R5 instances.
Figure 5: CPU utilization graphs for R6g instances.
Deploying Memcached on AWS Graviton2 instances can provide 51% performance improvements and in addition a 20% cost benefit. Deploying new applications on AWS Graviton2 is simple and quick, allowing these gains to be realized without any complex migration requirements. For further details on getting started with AWS Graviton2, please visit this github page.
Feel free to reach out to us on firstname.lastname@example.org with any inquires related to running your software workloads on Arm Neoverse platforms.
Check my findings from several months back: https://martin-grigorov.medium.com/compare-memcached-performance-on-x86-64-and-arm64-cpu-architectures-7fe781e34ab8 Memtier is not a good tool to load test Memcached. Better use github.com/.../mc-crusher