What boost can Apple’s M1 give to Redis?

Wacław The Developer
3 min readDec 17, 2021

Hi! Today i will compare bare-metal (not virtualized) Redis 6.2.6 on two devices:

M1-based MacBook Air

and Intel i5 1.4 GHz quad-core based MacBook Pro

Let’s do benchmarks! (without pipelines first)

All data will be collected by:

for i in {1..40..1}doredis-benchmark -t      get,set,incr,lpush,rpush,lpop,rpop,sadd,spop,hset,zadd,zpopmin,mset    -P $i -q; redis-cli flushall; sleep 1done

The vertical axis will display requests/per second, horizontal — number of commands for one pipeline (we are using pipeline mode).

The Redis servers are configured on bare metal. Without persistence options.

Commands for regular key

There is interesting thing: the intel-based laptop performs with a more stable rate and maximum performance was almost achieved on the pipeline with 15 commands.

But M1 shows absolutely shocking results! It has much more potential for increasing pipeline size — around 33 commands per pipeline and shows overall difference almost 3 times on GET and INCR command!

As you can see — M1 provides unstable, but very impressive performance during the tests.

Commands for list

Here, M1 shows around 2 times better performance on almost every command, but I still can’t understand the unstable performance rate during tests.

Commands for sets

The most impressive boost we can see on SPOP command. M1-based setup is almost 3 times faster on ~70 commands per pipeline mode!

Commands for hash, sorted set

Same situation with ZPOPMIN — M1-based laptop almost 3 times faster. Other commands have a significant boost too.

Summary

I created the chart about the diffrence in execution performance for all of comands tested in this article. The vertical axis shows how many times M1-based MacBook Air faster than i5-based MacBook Pro. As you can see — it is something between 2 and 3 times faster. But the basic SET command is not so faster. In my opinion, it is because of technical limits of RAM on both devices (SET uses basic write operation, but other commands require more CPU activity)

--

--