A few people asked us how HotKV compares with Microsoft Garnet, so we ran a Garnet benchmark. We did it on Azure, with Microsoft's own load tool and the same key and value sizes Microsoft uses in its published charts. Garnet is a very fast server, and we wanted to measure against it on its home ground rather than on ours.
In short. On two Azure D48als_v7 machines, HotKV 0.3.3 beat Garnet 2.2.7 by 9% on GET and 11% on SET when clients send one request at a time over 128 connections. With 128 pipelined connections the two were level on GET at about 135 million requests a second. Garnet was faster on pipelined SET (6% at 128 connections) and on pipelined GET with 1 or 32 connections. Along the way we cut HotKV's CPU cost per GET by 27% and per SET by 22%.
Why we picked Garnet
Garnet came out of Microsoft Research. It speaks the Redis protocol, it is open source, and it is quick. Microsoft keeps a page of Garnet benchmark results that compares it with Redis, KeyDB and Dragonfly, and shows Garnet scaling further than Redis and KeyDB as clients are added.
That made it the right opponent. Beating a slow server proves nothing. We also wanted the test to be hard to argue with, so we used Microsoft's cloud, Microsoft's tool (Resp.benchmark) and Microsoft's sizes, which are 8-byte keys, 8-byte values and 1,024 keys in total.
A quick word on pipelining, since it decides most of the results below. A pipelined client sends a batch of requests without waiting for each reply, then reads all the replies at once. That takes the network round trip out of the picture, so the test measures the server itself. Real applications pipeline less, or not at all. That is why we also ran a test where every client sends one request and waits for the answer. Both views are useful, and the two servers do not come out the same in them.
What the first runs told us
Our first runs were not flattering. With one connection sending pipelined GETs in batches of 4,096, Garnet did well over 10 million requests a second and HotKV did a lot less. In that test the network barely matters. The client keeps the server's input full, so the number you see is simply how much work the server does per request.
So we profiled HotKV under exactly that load and looked at where the time went. Very little of it was spent finding or storing the value. Most of it went on work around each request that a plain GET or SET never needed. We removed that work in HotKV 0.3.3. We are keeping the details to ourselves, but the effect is easy to measure.
On one CPU core, a GET now costs the server about 95 nanoseconds and a SET about 134. That is 27% less for GET and 22% less for SET than before. Commands with options, like SET key value EX 60, cost about what they did. Nothing changes in behaviour. We sent the same commands to the old and new code, hundreds of hand-written cases and thousands of random command streams, and compared the replies byte for byte. Every test that passed before still passes.
Cheaper requests help in two ways. A busy server gets through more requests per second. A quiet one needs fewer cores for the same traffic, and cores are what you pay for in the cloud.
Garnet benchmark setup
Both servers ran on an Azure Standard_D48als_v7 with an AMD EPYC 9V45, 48 vCPUs and Ubuntu 24.04. The load came from a second machine of the same size in the same subnet. Only one server ran at a time.
Garnet was the 2.2.7 release with its default settings plus --index 1g --protected-mode no. HotKV 0.3.3 ran with 48 threads, persistence off, protected mode off, and its worker threads pinned with server-cpulist 0-47. Redis and Valkey have the same setting. The client was Resp.benchmark built from the Garnet 2.2.7 source, as described in Garnet's benchmark guide.
Every test ran for 10 seconds, twice, with the second round in reverse order. The numbers below are the averages. We ran two kinds of load. In the pipelined tests each connection sends batches of 4,096 requests, with 1, 32 or 128 connections. In the other test, 128 connections each send one request and wait for the reply before sending the next, which is how most applications talk to a cache.
For the CPU numbers above we used one worker pinned to one core and one connection. We read the server's CPU time before and after each run and divided it by the number of requests served.
The throughput results of every run, the run script and both server launch lines are in our benchmark repository, so anyone can rerun the test and check the numbers.
Pipelined GET
In the charts each group has its own scale, because one connection and 128 connections are an order of magnitude apart.
At 128 connections HotKV did 135.2 million GETs a second and Garnet 134.6 million. Call it a tie. At that point the machine running the load is close to its own limit, so neither server is really being pushed.
With fewer connections Garnet is ahead. On one connection it did 10.89 million against our 8.67 million, and with 32 connections 139.8 million against 106.2 million. Those are the gaps we are working on now.
Pipelined SET
Writes tell a similar story, with a smaller gap at the high end.
With 32 and 128 connections HotKV is within 5 to 6% of Garnet, at 76.2 and 85.2 million SETs a second against 80.3 and 90.3 million. On a single connection Garnet leads clearly, 8.28 million against 6.51 million. One connection pushing SETs as fast as it can is the purest measure of the cost of a write, and Garnet's is still lower than ours.
One request at a time
Most real traffic is not pipelined in batches of four thousand. A web request reads a session, waits, writes something, waits. Here the round trip over the network dominates, and what matters is how quickly the server turns each request around with many clients connected.
This is where HotKV wins. It answered 1.088 million GETs a second against Garnet's 1.002 million, 9% more, and 1.110 million SETs against 0.997 million, 11% more.
All the numbers
Here is everything from the charts in one table. Pipelined results are in millions of requests a second, and the one-at-a-time results in thousands.
| Test | Garnet 2.2.7 | HotKV 0.3.3 | HotKV vs Garnet |
|---|---|---|---|
| GET, 1 connection | 10.89 | 8.67 | -20% |
| GET, 32 connections | 139.8 | 106.2 | -24% |
| GET, 128 connections | 134.6 | 135.2 | level |
| GET, 128 connections, one at a time | 1,002 | 1,088 | +9% |
| SET, 1 connection | 8.28 | 6.51 | -21% |
| SET, 32 connections | 80.3 | 76.2 | -5% |
| SET, 128 connections | 90.3 | 85.2 | -6% |
| SET, 128 connections, one at a time | 997 | 1,110 | +11% |
The CPU cost per request on one core was 92.7 to 96.9 ns for GET and 132.3 to 135.5 ns for SET. Those are the medians of two series of five runs each.
What we did not test
This is one workload. The keys and values are tiny and there are only 1,024 of them, so everything sits in the CPU cache. Bigger values, millions of keys, other commands, persistence, replication and cluster mode can all change the picture, and none of them were part of this run. We tested one machine type on one day, with two rounds per test.
Garnet ran with its defaults plus the two flags above, and HotKV with its threads pinned. If you think a different Garnet setting would be fairer, tell us. We will rerun it and publish what we get.
Garnet and Microsoft are trademarks of Microsoft Corporation, and Redis is a trademark of Redis Ltd. We name them only to identify the software we measured. This implies no sponsorship, endorsement or affiliation.
Try it on your own workload
Benchmarks with 8-byte values are a starting point, not an answer. The cheaper GET and SET come with HotKV 0.3.3 and need no configuration. You can request early access to HotKV Cloud and point your own traffic at it, or check the pricing first. We have also published a Redis latency benchmark and a cluster benchmark if you want more numbers.
Frequently asked questions
Is HotKV faster than Microsoft Garnet?
In some tests. With 128 clients each sending one request at a time, HotKV 0.3.3 served 9% more GETs and 11% more SETs than Garnet 2.2.7. With 128 pipelined connections they were level on GET. Garnet was faster on pipelined SET and on pipelined GET with 1 or 32 connections.
What did you change in HotKV 0.3.3?
We made a plain GET 27% cheaper in server CPU and a plain SET 22% cheaper. Most of the cost was work around each request that these commands did not need. Replies, persistence, replication and access control behave exactly as before.
Do I have to change any settings to get the faster GET and SET?
No. It applies to GET and SET as nearly every Redis client sends them, with default settings. Pinning worker threads with server-cpulist, as we did here, helps on top of that on machines with many cores.
Why use Microsoft's Resp.benchmark and not memtier or redis-benchmark?
Because Microsoft uses it for its own Garnet benchmark results. Using their tool and their key and value sizes means the comparison does not rest on a choice we made.
Did any other commands get slower?
No. Commands with options, such as SET with an expiry, cost the same CPU per request as before, within the normal variation between runs. Every test that passed before still passes, and replies match the old code.
Why is Garnet still faster at pipelined SET?
With one connection sending batches of 4,096 SETs, the cost of each write decides the result. Ours is now about 134 ns of CPU per SET, down 22%, and Garnet's is lower still. We are working on it.



Continue the conversation
Comments
Questions about the method? A different result on your hardware? Share what you found. Comments are reviewed before they appear.