cachegrand is an open-source fast, scalable and modular Key-Value store designed from the ground up to take advantage of today's hardware, compatible with the well known Redis, able to provide better performance than many other platforms.
The benchmarks below have been carried out on an AMD EPYC 7502P with 2 x 25Gbit network links using Ubuntu 22.04, with the default configuration and using memtier_benchmark with 10M different keys, 64 bytes of payload, and with 100 clients per thread (1 thread 100 clients, 64 threads 6400 clients) using 2 different machines with the same hardware to generate the load.
cachegrand is able to scale almost linearly if enough cpu power is left to the operating system to process the network data.
Below a comparison done using batching (pipelines) with 256 commands and payloads of 64 bytes, because of the extra load generated by the batching the amount of clients has been reduced to 10 per thread for a total of 640 clients.
Latencies are great as well, especially taking into account that with 6400 clients over 64 cores the operating system doesn't really have too much room to handle the network traffic.
Key features:
Planned Key Features:
It's possible to find more information in the docs' folder.
The platform is written in C, validated via unit tests, Valgrind and integration tests, it's also built with a set of compiler options to fortify the builds (#85).
Currently, it runs only on Linux, on Intel or AMD cpus and requires a kernel v5.7 or newer, will be ported to other platforms once will become more feature complete.
cachegrand is not production ready and not feature complete, plenty of basic functionalities are being implemented, the documentation is lacking as well as it's being re-written, please don't open issues for missing documentation.
The status of the project is tracked via GitHub using the project management board.
Please if you find any bug, malfunction or regression feel free to open an issue or to fork the repository and submit your PRs! If you do open an Issue for a crash, if possible please enable sentry.io in the configuration file and try to reproduce the crash, a minidump will be automatically uploaded on sentry.io. Also, if you have built cachegrand from the source, please attach the compiled binary to the issue as well as sentry.io knows nothing of your own compiled binaries.
The platform is regularly benchmarked as part of the development process to ensure that no regressions slip through, it's possible to find more details in the documentation.
Packages are currently not available, they are planned to be created for the v0.3 milestone.
Instructions on how to build cachegrand from the sources are available in the documentation
cachegrand comes with a default configuration but for production use please review the documentation to ensure an optimal deployment.
cachegrand doesn't need to run as root but please review the configuration section to ensure that enough lockable memory has been allowed, enough files can be opened and that the slab allocator has been enabled and enough huge pages have been provided
Before trying to start cachegrand, take a look to the performance tips available in the docs' section as they might provide a valuable help!
$ ./cachegrand-server --help
Usage: cachegrand-server [OPTION...]
-c, --config-file=FILE Config file (default config file
/usr/local/etc/cachegrand/cachegrand.conf )
-l, --log-level=LOG LEVEL log level (error, warning, info, verbose, debug)
-?, --help Give this help list
--usage Give a short usage message
Mandatory or optional arguments to long options are also mandatory or optional
for any corresponding short options.
/path/to/cachegrand-server -c /path/to/cachegrand.yaml
[2022-06-05T10:26:08Z][INFO ][program] cachegrand-server version v0.1.0 (built on 2022-07-05T10:26:07Z)
[2022-06-05T10:26:08Z][INFO ][program] > Release build, compiled using GCC v10.3.0
[2022-06-05T10:26:08Z][INFO ][program] > Hashing algorithm in use t1ha2
[2022-06-05T10:26:08Z][INFO ][config] Loading the configuration from ../../etc/cachegrand.yaml
[2022-06-05T10:26:08Z][INFO ][program] Ready to accept connections
Download the example config file
curl https://raw.githubusercontent.com/danielealbano/cachegrand/main/etc/cachegrand.yaml.skel -o /path/to/cachegrand.yaml
Edit it with your preferred editor and then start cachegrand using the following command
docker run \
-v /path/to/cachegrand.yaml:/etc/cachegrand/cachegrand.yaml \
--ulimit memlock=-1:-1 \
--ulimit nofile=262144:262144 \
-p 6379:6379 \
--rm \
cachegrand/cachegrand-server:latest