How to Install and Benchmark Valkey 7.2.5 – A Redis Alternative
This guide explains why Redis Labs changed its license, introduces the community‑driven Valkey fork, provides step‑by‑step commands to download, compile, install, configure as a systemd service, test with clients, and benchmark performance against Redis.
Background
Redis Labs changed the license of Redis 7.4 from the BSD‑style license to RSALv2 and SSPLv1, which removed its OSI‑approved open‑source status. In response, the Linux Foundation created Valkey 7.2.5 , a fork of Redis 7.2.4 that remains source‑available under a permissive license.
Installation
Download and extract
wget https://github.com/valkey-io/valkey/archive/refs/tags/7.2.5.tar.gz
tar -zxvf 7.2.5.tar.gzCompile and install
cd valkey-7.2.5
make
sudo make installSuccessful installation creates the binaries valkey-server , valkey-cli , valkey-benchmark and symlinks that replace the traditional Redis names.
Start the server
/usr/local/bin/valkey-server /etc/valkey/valkey.confIf port 6379 is already occupied, use an alternative port (e.g., 6378 ) by editing /etc/valkey/valkey.conf or passing --port 6378 on the command line.
Running as a systemd service
Create the unit file /etc/systemd/system/valkey.service with the following content:
[Unit]
Description=Valkey – community‑driven Redis alternative
After=network.target
[Service]
User=redis
Group=redis
ExecStart=/usr/local/bin/valkey-server /etc/valkey/valkey.conf
ExecStop=/usr/local/bin/valkey-cli shutdown
Restart=always
[Install]
WantedBy=multi-user.targetEnable and start the service:
sudo systemctl enable valkey.service
sudo systemctl start valkey.service
sudo systemctl status valkey.serviceWhen the status shows active (running) , Valkey is ready to accept connections.
Client usage
Valkey provides a CLI that is compatible with redis-cli. Example session on port 6378:
$ valkey-cli -p 6378
127.0.0.1:6378> set name "Tinywan"
OK
127.0.0.1:6378> get name
"Tinywan"The same commands work with the original redis-cli when pointed at the Valkey port.
Performance testing
Valkey ships with valkey-benchmark, a drop‑in replacement for redis-benchmark. A typical benchmark command is:
valkey-benchmark -h 127.0.0.1 -p 6378 -n 10000 -c 20 -qSample output (requests per second) for a subset of commands is shown below. Values are comparable to Redis; Valkey is slightly faster on PING and SPOP, while Redis is faster on SET and GET.
PING_INLINE : Valkey 45248.87 rps, Redis 42735.04 rps
SET : Valkey 28409.09 rps, Redis 34843.21 rps
GET : Valkey 31645.57 rps, Redis 49019.61 rps
SPOP : Valkey 42918.46 rps, Redis 26954.18 rps
ZPOPMIN : Valkey 48076.92 rps, Redis 23696.68 rps
XADD : Valkey 23752.97 rps, Redis 24449.88 rps
Both tools accept the same options, so existing Redis benchmark scripts can be reused against Valkey without modification.
Open Source Tech Hub
Sharing cutting-edge internet technologies and practical AI resources.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
