Adobe Commerce Cloud Performance. Redis Cache performance issue.

Redis includes the redis-benchmark utility that simulates running commands done by N clients at the same time sending M total queries (it is similar to the Apache's ab utility). Below you'll find the full output of a benchmark executed against a Linux box.

The redis-benchmark program is a quick and useful way to get some figures and evaluate the performance of a Redis instance on a given hardware. However, by default, it does not represent the maximum throughput a Redis instance can sustain. Actually, by using pipelining and a fast client (hiredis), it is fairly easy to write a program generating more throughput than redis-benchmark. The default behavior of redis-benchmark is to achieve throughput by exploiting concurrency only (i.e. it creates several connections to the server).

Remember Redis is single threaded. If you have a lot of clients that try to connect to your Redis instance continuously, you will keep your instance busy with connection handling instead of executing the commands you run your business logic on. This may lead to a slowdown/blocking of your Redis instance. Also, Adobe Commerce Cloud has sing server installation architecture when everything installed on one server and other processes PHP, MySQL, Crons can kill Redis performance as well.

Let's check Magento Cloud Redis performance run:

redis-benchmark -h 127.0.0.1 -p 6370 -c 100 -t get

We are having result:

====== GET ======
100000 requests completed in 1.68 seconds
100 parallel clients
3 bytes payload
keep alive: 1

Lets Test Performance of the Redis on M5.xlarge AWS instance installed via Docker Container :

Summary:
throughput summary: 88731.15 requests per second
latency summary (msec):
avg min p50 p95 p99 max
0.569 0.216 0.535 0.751 0.887 1.463

so, we can see Magento cloud is almost twice slower in the case of Throughput performance and Redis command latency.

Unfortunately, we can’t fix Adobe Cloud's broken architecture and design. The only way we have is to migrate out of the Magento cloud to a self-hosted cloud where we can improve stuff on a lower level.

Magento/APP Cloud Architect. Melting metal server infrastructure into cloud solutions.