Releases: danielealbano/cachegrand
v0.4.0
🚀 cachegrand v0.4.0: Implement Authentication Support, Improved Logging, New Commands, redis-benchmark support and More!
We are thrilled to announce the release of cachegrand v0.4.0, featuring a wide array of improvements and bugfixes!
✨ Here's a quick rundown of what's new in v0.4.0:
- Redis Authentication: Now cachegrand supports the Redis authentication mechanism, both via the AUTH and HELLO commands, supporting as well the
default
username if no username is provided. - Syslog Sink Implementation: A new sink for syslog has been added, improving the logging capabilities of cachegrand.
- TTL Enforcement: it's now possible to enfroce the TTL (Time To Live) of the data, ensuring that data doesn't live forever in the cache.
- New commands: the PING over the inline protocolo and the CONFIG GET commands has been implemented, the latter provides default values for the most of the settings as they are Redis specific
- Redis Benchmark Support: cachegrand now supports Redis-benchmark for performance testing, including the ping, get, set, incr, and mset tests. This allows you to evaluate the performance of your Redis server with standard benchmarks, ensuring the optimal configuration for your needs. Use the command
redis-benchmark -t ping,get,set,incr,mset
to run the benchmarks. - Command Disable Feature: The new feature that allows commands to be disabled gives more control over the server's behavior.
- Fix for Hashtable Locking: Hashtable locking issues have been fixed, improving the stability and reliability of the system.
- Reduced Aggressiveness of Key Eviction: The aggressiveness of the keys eviction fiber has been reduced, making the system more responsive.
🔗 Visit our website https://cachegrand.io/ and GitHub repository https://github.com/danielealbano/cachegrand for more information.
🎯 To try it out
docker run \
-it \
--pull=always \
--ulimit memlock=-1:-1 \
--ulimit nofile=262144:262144 \
-p 6379:6379 \
-p 6380:6380 \
-p 9090:9090 \
--rm \
cachegrand/cachegrand-server:latest
Happy caching! 🎉
v0.3.0
🚀 cachegrand v0.3.0: Multi database support, New Commands, Performance Enhancements, and More!
We are excited to announce the release of cachegrand v0.3.0, we have introduced several new features and performance improvements!
✨ Here's a quick rundown of what's new in v0.3.0:
- Monotonic clock fixed for modern Intel CPUs: an optimization implemented in v0.2.1 to improve the performances of the monotonic clock introduced a bug which was causing it to malfunction on recent Intel CPUs.
- Multi-database support: You can now utilize multiple databases within cachegrand, providing even more flexibility for your data management needs.
- Configurable database limit: Define the maximum number of databases allowed via the config file, giving you greater control over your caching setup.
- Support for SELECT and ECHO command: Enhancing the Redis-compatible interface with the addition of these essential commands.
- kTLS improvements: We've fixed kTLS compatibility issues on Docker, Podman, Kubernetes, and other container platforms. Additionally, kTLS can now be enabled or disabled at runtime for greater flexibility.
- Improved TLS CA loading: We've enhanced the process of loading TLS Certificate Authorities for better security and ease of use.
- Initial module support: The introduction of initial module support lays the foundation for future expansions and integration with other tools.
- Buffering for snapshot generation: We've implemented buffering, which significantly improves the efficiency and performance of snapshot generation.
- Disable logging to a file in the example config file: To simplify the initial setup process, we've disabled logging to a file by default in the example config file.
- Various bug fixes: We're continuously working to make cachegrand more stable and reliable, and this update includes numerous bug fixes to ensure a smooth user experience.
🔗 Visit our website https://cachegrand.io/ and GitHub repository https://github.com/danielealbano/cachegrand for more information.
🎯 To try it out
docker run \
-it \
--pull=always \
--ulimit memlock=-1:-1 \
--ulimit nofile=262144:262144 \
-p 6379:6379 \
-p 6380:6380 \
-p 9090:9090 \
--rm \
cachegrand/cachegrand-server:latest
Happy caching! 🎉
v0.2.1
🚀 cachegrand v0.2.1: New Commands, Snapshot Save at Shutdown, Performance Enhancements, and More!
We are excited to announce the release of cachegrand v0.2.1, we have introduced several new features and performance improvements!
✨ Here's a quick rundown of what's new in v0.2.1:
- Support for BGSAVE and SAVE Redis commands, this update brings support for the BGSAVE and SAVE commands, allowing you to save the dataset to disk with ease.
- Support for SHUTDOWN SAVE and SHUTDOWN NOSAVE Redis commands, you can now safely shut down your cachegrand instance with or without saving the dataset to disk using the SHUTDOWN SAVE and SHUTDOWN NOSAVE commands.
- Saving snapshot (RDB) at shutdown, you can now configure the saving of a snapshot at shutdown via the database.snapshots.snapshot_at_shutdown setting, providing additional flexibility and control.
- Improved database limits checking, we've made enhancements to the database limits checking, ensuring a smoother and more efficient experience for users.
- Enhanced FFMA handling of realloc operations, the Fast-Forward Memory Allocator (FFMA) has been improved to handle realloc operations more effectively.
- Fixed memory leak issues, in this release, we've addressed a memory leak issue that occurred when freeing or replacing values, ensuring optimal performance and better control over memory consumption.
- io_uring ring registration, with a kernel version 5.19 or more recent, cachegrand can now register the io_uring ring, enabling even better performance.
- Prometheus enabled by default, we've made it easier than ever to monitor your cachegrand instance by enabling Prometheus by default in the skel config file and in the Docker image.
- Updated Performance Tips, to help you get the most out of cachegrand, we have updated our performance tips, ensuring you can maximize the speed and efficiency of your Key-Value store.
With these new features and improvements, cachegrand continues to push the boundaries of Key-Value store performance. We are committed to making cachegrand the go-to solution for developers and organizations seeking the fastest and most efficient Key-Value store available.
cachegrand can now do its first steps in production environments as the new release now allows to to load and save (RDB) snapshots, save them on demand, on a schedule, on shutdown and via the SHUTDOWN SAVE (SHUTDOWN NOSAVE to skip the dump at the shutdown)!
We have also started a new repository called (cachegrand-benchmarks)[https://github.com/cachegrand/cachegrand-benchmarks] to track cachegrand's performance compared to the main competitors, it contains the raw data and a number of scripts to generate them.
Here an overview of the performance of cachegrand compared to the main competitors on the market
🔗 Visit our website https://cachegrand.io/ and GitHub repository https://github.com/danielealbano/cachegrand for more information.
Also, don't miss out on the opportunity of joining the beta testing for a Cache-as-a-Service platform based on top of cachegrand, visit https://cachegrand.io/cache-as-a-service for more information.
🎯 To try it out
docker run \
-it \
--pull=always \
--ulimit memlock=-1:-1 \
--ulimit nofile=262144:262144 \
-p 6379:6379 \
-p 6380:6380 \
--rm \
cachegrand/cachegrand-server:latest
Happy caching! 🎉
v0.2.0
🚀 cachegrand v0.2.0: Featuring RDB Load/Save, Eviction Policies, Performance Enhancements, and More!
We're excited to announce the release of cachegrand v0.2.0, packed with new features, optimizations, and improvements to elevate your data storage experience. Here's what's new in this release:
✨ New Features:
- RDB Load/Save support: Exchange data with Redis or other Redis-like platforms (currently supporting strings only)
- Keys Eviction: Configurable limits and policies with default hard limit at 75% usable memory and soft limit at 70%
- Auto-tuning keys eviction aggressiveness based on soft and hard limits
- Clock Performance Improvements: Switched to TSC for most time-related operations
- Optimized Hashtable: Efficiently identifies and skips empty sections to save cycles and avoid unnecessary data scanning
- io_uring Cooperative Taskrun and Single Issuer Support: Boosts performance (5.19 kernel required for Taskrun; 6.0 kernel required for Single Issuer)
- FFMA Support without Hugepages: Rewritten and optimized, outperforming other memory allocators in most cases under low and high concurrency
🔗 Visit our website https://cachegrand.io/ and GitHub repository https://github.com/danielealbano/cachegrand for more information.
Also, don't miss out on the opportunity of joining the beta testing for a Cache-as-a-Service platform based on top of cachegrand, visit https://cachegrand.io/cache-as-a-service for more information.
🎯 To try it out
docker run \
-it \
--pull=always \
--ulimit memlock=-1:-1 \
--ulimit nofile=262144:262144 \
-p 6379:6379 \
-p 6380:6380 \
--rm \
cachegrand/cachegrand-server:latest
📋 Below the list of supported Redis commands
Command | Notes |
---|---|
✔ APPEND | |
✔ COPY | Missing DB parameter |
✔ DBSIZE | |
✔ DECR | |
✔ DECRBY | |
✔ DEL | |
✔ EXISTS | |
✔ EXPIRE | |
✔ EXPIREAT | |
✔ EXPIRETIME | |
✔ FLUSHDB | Missing ASYNC parameter |
✔ GET | |
✔ GETDEL | |
✔ GETEX | |
✔ GETRANGE | |
✔ GETSET | |
✔ HELLO | Missing AUTH and SETNAME parameters |
✔ INCR | |
✔ INCRBY | |
✔ INCRBYFLOAT | |
✔ KEYS | |
✔ LCS | Missing IDX, MINMATCHLEN and WITHMATCHLEN parameters |
✔ MGET | |
✔ MSET | |
✔ MSETNX | |
✔ PERSIST | |
✔ PEXPIRE | |
✔ PEXPIREAT | |
✔ PEXPIRETIME | |
✔ PING | |
✔ PSETEX | |
✔ PTTL | |
✔ QUIT | |
✔ RANDOMKEY | |
✔ RENAME | |
✔ RENAMENX | |
✔ SCAN | Missing TYPE parameter |
✔ SET | |
✔ SETEX | |
✔ SETNX | |
✔ SETRANGE | |
✔ SHUTDOWN | |
✔ STRLEN | |
✔ SUBSTR | |
✔ TOUCH | |
✔ TTL | |
✔ UNLINK |
We appreciate your feedback and questions in the comments below. Thank you for trying cachegrand v0.2.0, and happy coding! 🎉
v0.1.5
It has been a while from the last release, this new version includes quite a number of minor bugfixes, general improvements and, most importantly, ARMv8 64bit support.
Now cachegrand can run on ARMv8 hardware when running a 64bit operating system, both the hashtable and the fiber library have been optimized to take advantage of the ARM instruction set.
The release actually contains also the initial implementation of the new hashtable although this hasn't been integrated in cachegrand yet.
The docker image has been updated to include the ARMv8 64bit build.
Below the full list of commands implemented
Command | Notes |
---|---|
✔ APPEND | |
✔ COPY | Missing DB parameter |
✔ DBSIZE | |
✔ DECR | |
✔ DECRBY | |
✔ DEL | |
✔ EXISTS | |
✔ EXPIRE | |
✔ EXPIREAT | |
✔ EXPIRETIME | |
✔ FLUSHDB | Missing ASYNC parameter |
✔ GET | |
✔ GETDEL | |
✔ GETEX | |
✔ GETRANGE | |
✔ GETSET | |
✔ HELLO | Missing AUTH and SETNAME parameters |
✔ INCR | |
✔ INCRBY | |
✔ INCRBYFLOAT | |
✔ KEYS | |
✔ LCS | Missing IDX, MINMATCHLEN and WITHMATCHLEN parameters |
✔ MGET | |
✔ MSET | |
✔ MSETNX | |
✔ PERSIST | |
✔ PEXPIRE | |
✔ PEXPIREAT | |
✔ PEXPIRETIME | |
✔ PING | |
✔ PSETEX | |
✔ PTTL | |
✔ QUIT | |
✔ RANDOMKEY | |
✔ RENAME | |
✔ RENAMENX | |
✔ SCAN | Missing TYPE parameter |
✔ SET | |
✔ SETEX | |
✔ SETNX | |
✔ SETRANGE | |
✔ SHUTDOWN | |
✔ STRLEN | |
✔ SUBSTR | |
✔ TOUCH | |
✔ TTL | |
✔ UNLINK |
What's Changed (most relevant PRs)
- Implement types support in the storage db by @danielealbano in #232
- Cachegrand Benchmark Generator by @Valkyrie00 in #244
- Fix benchmark hashtable mpmc op set by @danielealbano in #245
- Fix hugepage cache stats usage by @danielealbano in #246
- Add keys validation hashtable mpmc set test by @danielealbano in #247
- Include the cachegrand-benchmark-generator only when building the internal benches by @danielealbano in #249
- Implement aarch64 armv8 support by @danielealbano in #250
- Improved code coverage by @Valkyrie00 in #252
- Refactor small circular buffer by @danielealbano in #254
New Contributors
- @ryanrussell made their first contribution in #235
Full Changelog: v0.1.4...v0.1.5
v0.1.4
This v0.1.4 add quite a few new commands and general improvements, most notably the memory consumption has been optimized pairing cachegrand slab allocator (now renamed FFMA or Fast Fixed Memory Allocator) with Microsoft's mimalloc allocator, which performs really better than tcmalloc and jemalloc and almost as well as FFMA without the downside of requiring extra memory.
Below the full list of commands implemented
Command | Notes |
---|---|
✔ APPEND | |
✔ COPY | Missing DB parameter |
✔ DBSIZE | |
✔ DECR | |
✔ DECRBY | |
✔ DEL | |
✔ EXISTS | |
✔ EXPIRE | |
✔ EXPIREAT | |
✔ EXPIRETIME | |
✔ FLUSHDB | Missing ASYNC parameter |
✔ GET | |
✔ GETDEL | |
✔ GETEX | |
✔ GETRANGE | |
✔ GETSET | |
✔ HELLO | Missing AUTH and SETNAME parameters |
✔ INCR | |
✔ INCRBY | |
✔ INCRBYFLOAT | |
✔ KEYS | |
✔ LCS | Missing IDX, MINMATCHLEN and WITHMATCHLEN parameters |
✔ MGET | |
✔ MSET | |
✔ MSETNX | |
✔ PERSIST | |
✔ PEXPIRE | |
✔ PEXPIREAT | |
✔ PEXPIRETIME | |
✔ PING | |
✔ PSETEX | |
✔ PTTL | |
✔ QUIT | |
✔ RANDOMKEY | |
✔ RENAME | |
✔ RENAMENX | |
✔ SCAN | Missing TYPE parameter |
✔ SET | |
✔ SETEX | |
✔ SETNX | |
✔ SETRANGE | |
✔ SHUTDOWN | |
✔ STRLEN | |
✔ SUBSTR | |
✔ TOUCH | |
✔ TTL | |
✔ UNLINK |
Notes:
To improve the memory consumption the memory allocator used in some parts of cachegrand was switched from FFMA to mimalloc, this has caused a performance regression which will be addressed in a future release.
What's Changed
- Move unit tests in subfolder by @danielealbano in #184
- Wire in redis integration tests by @danielealbano in #185
- Fix redis-server integration tests reporting by @danielealbano in #186
- Hashtable keep track of the keys count by @danielealbano in #187
- Implement storage db flush sync by @danielealbano in #188
- Implement a set of commands by @danielealbano in #190
- Fix LCS behaviour when non existant keys are provided by @danielealbano in #191
- Implement new command copy by @danielealbano in #192
- Expand used redis tests by @danielealbano in #193
- Implement expire and persist related commands by @danielealbano in #194
- Implement touch and unlink commands by @danielealbano in #195
- Implement GETDEL and GETEX by @danielealbano in #196
- Implement getrange and setrange by @danielealbano in #198
- Implemented forbidden tags for redis server integration test by @Valkyrie00 in #197
- Validate the set, mset, setrange and similar refuse to create empty keys by @danielealbano in #201
- Implement randomkey command by @danielealbano in #202
- Implement keys command by @danielealbano in #203
- Fix invalid expiration time handling in set and getex by @danielealbano in #209
- Implemented PSETEX command by @Valkyrie00 in #207
- Implement setnx command by @Valkyrie00 in #210
- Implemented SETEX command by @Valkyrie00 in #206
- Implement substr command by @danielealbano in #212
- Implement scan command by @danielealbano in #211
- Implement append command by @danielealbano in #213
- Fix Fedora build instructions by @danielealbano in #215
- Implement strlen command by @danielealbano in #214
- Implement INCR, INCRBY, INCRBYFLOAT, DECR and DECRBY commands by @danielealbano in #216
- Implement rename commands by @danielealbano in #218
- Implement mimalloc by @danielealbano in #230
Full Changelog: v0.1.3...v0.1.4
v0.1.3
This new release introduces a number of improvements and bug fixes, most notabily fixes how io_uring short sends are handled which, in some edge cases, was causing local connection to receive partial data for values of >2.5MB.
The release also includes the new automated parser, which will drammatically speed up the support for the new commands, support for Read-Modify-Write operations in the Storage DB, full support for the SET command, some bugfixes and some general performance improvements.
What's Changed
- Redis max arguments by @Valkyrie00 in #167
- Implement a code generator to to automatically create all redis commands scaffolding arguments parsing and commands callbacks by @danielealbano in #170
- Implement support for storage db entries expirations by @danielealbano in #172
- Report clock resolution during the bootstrap by @danielealbano in #174
- Implement support for RMW operations and update the SET command to use them when needed by @danielealbano in #179
- Honor socket keepalive settings by @danielealbano in #180
- Redis integration tests launcher by @Valkyrie00 in #183
- Fix receive and send when multiple db chunks are involved by @danielealbano in #182
Full Changelog: v0.1.2...v0.1.3
v0.1.2
This latest release includes a number of general improvements, like the TLS support, the MGET command and the pipelining support, and a number of fixes, including a corner case in the redis protocol parser that was showing up only when using pipelining.
Main changes
- TLS support implemented by @danielealbano in #155
- Convert the slab allocator and the hugepages cache to being lock-less by @danielealbano in #162
- Improve pipelining performances by @danielealbano in #163
- MGET redis command by @Valkyrie00 in #164
Full Changelog: v0.1.1...v0.1.2
v0.1.1
This new release includes supports prometheus (more details here https://github.com/danielealbano/cachegrand/blob/main/docs/architecture/modules/prometheus.md ) to allows easy monitoring and metrics collections for benchmarking and a few minor fixes
What's Changed
- Fix various alerts reported by LGTM by @danielealbano in #145
- Moved ulimit by @Valkyrie00 in #147
- Add support for Prometheus by @danielealbano in #150
New Contributors
- @Valkyrie00 made their first contribution in #147
Full Changelog: v0.1.0...v0.1.1
v0.1.0
Finally after an extensive amount of research, development and benchmarks, I am proud to release the v0.1.0 version of cahegrand!
This release has a pretty limited Redis compatibility, don’t expect to be able to run it with clients using anything more than the basic commands, and surely a few bugs sneaked through the testing process, but architecturally-wise the most is in-place allowing the platform to scale-up vertically almost linearly!
Notes:
- As mentioned, the Redis compatibility is limited, a basic set of redis commands is supported (HELLO, PING, GET, SET, DEL, QUIT, SHUTDOWN)
- The in-memory storage engine is fully functional, meanwhile the on-disk storage engine is a PoC and is missing major optimizations
- The modular architecture allows you to implement your own modules (caching or not) taking advantage of the functionalities provided by cachegrand
- The file I/O interface and the network I/O interface are currently supporting only io_uring and require a kernel 5.8 or newer, they are mostly ready to be expanded to support XDP/DPDK and SPDK
- Currently the hashtable doesn’t automatically expand if needed, the amount of allowed keys is defined in the configuration, there is also no control on the amount of usable memory
- To get better performances it’s better to setup hugepages and enable the slab allocator as the difference is notable
- Pipeline is underperforming as each response is sent sequentially instead of being squashed together
If you decide to benchmark it, please keep in mind that you need to (a) enable the slab allocator and provide enough hugepages, (b) better to test it over the cable and not on localhost and (c) leave some cpu power for the kernel to process the network data otherwise the operating system will not be able to handle the incoming packets.
If you get a crash please enable sentry.io in the configuration and try to replicate the crash, a crash dump will be automatically uploaded and will be available for investigation, although please be aware that it might contain information from the memory used by the process.
Full Changelog: https://github.com/danielealbano/cachegrand/commits/v0.1.0