https://github.com/danielealbano/cachegrand Skip to content Toggle navigation Sign up * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code + Explore + All features + Documentation + GitHub Skills + Changelog * Solutions + By Size + Enterprise + Teams + Compare all + By Solution + CI/CD & Automation + DevOps + DevSecOps + Case Studies + Customer Stories + Resources * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles + Repositories + Topics + Trending + Collections * Pricing [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this user All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} danielealbano / cachegrand Public * * Notifications * Fork 9 * Star 314 cachegrand - a modern OSS Key-Value store built for today's hardware cachegrand.io License BSD-3-Clause license 314 stars 9 forks Star Notifications * Code * Issues 27 * Pull requests 0 * Discussions * Actions * Projects 1 * Security * Insights More * Code * Issues * Pull requests * Discussions * Actions * Projects * Security * Insights danielealbano/cachegrand This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. main Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags 5 branches 5 tags Code * Clone HTTPS GitHub CLI [https://github.com/d] Use Git or checkout with SVN using the web URL. [gh repo clone daniel] Work fast with our official CLI. Learn more. * Open with GitHub Desktop * Download ZIP Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching Xcode If nothing happens, download Xcode and try again. Launching Visual Studio Code Your codespace will open once ready. There was a problem preparing your codespace, please try again. Latest commit @danielealbano danielealbano Update Redis docs ... 0e19a47 Sep 13, 2022 Update Redis docs 0e19a47 Git stats * 2,166 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time .github 3rdparty benches docs etc src tests tools .gitignore .gitmodules .lgtm.yml CMakeLists.txt CNAME CODE_OF_CONDUCT.md LICENSE README.md _config.yml codecov.yml valgrind.supp View code [ ] Faster without spending one extra cent! What is cachegrand? Please be aware that Issues & contributions Performances How to install Distro packages Build from source Configuration Running cachegrand Help Start it locally Docker README.md Build & Test codecov LGTM Grade Lines of code COCOMO cachegrand logo Faster without spending one extra cent! Why pay more for less? cachegrand can help to squeeze all the value of your existing infrastructure is already offering! But not only we are working hard to expand compatibility with the most known caching platforms, cachegrand also comes with a tiered storage, although currently is work in progress, which will let you leverage hot, warm and cold disks to cache more data than the available memory! cachegrand needs your support and help, it's Open Source, no funky licenses as it's under a BSD 3-clause license, so you can use it as standalone platform or incorporate it into your platform(s), and it's being built because we love to do not let resources go under-utilized! What is cachegrand? cachegrand is an open-source fast, scalable and modular Key-Value store designed from the ground up to take advantage of modern hardware, able to provide better performance when compared to similar projects but also capable to provide a great flexibility in terms of management and developer experience. 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 (no network optimizations) 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 linearly if enough cpu power is left to the operating system to process the network data. GET Operations/s SET Operations/s 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. GET Operations/s SET Operations/s 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. Latency with 1 threads and 100 clients Latency with 64 threads and 6400 clients Key features: * Modular architecture to support widely used protocols, e.g. Redis , Prometheus, etc. * Time-series database for fast data writes and retrieval with primitives built to handle different data types (e.g. small strings, large blobs, jsons, etc.) - work in progress; * Hashtable GET Lock-free and Wait-free operations, SET and DELETE use localized spinlocks, the implementation is capable to digest 2.1 billion records per second on a 1x AMD EPYC 7502 (see benches ); * An extremely fast ad-hoc memory allocator for fixed size allocations, Fast Fixed Memory Allocator (or FFMA) capable of allocating and freeing memory in O(1); * Linear vertical scalability when using the in-memory database, 2x cpus means 2x requests (see benches); * Built for flash memories to be able to efficiently saturate the available IOPS in modern DC NVMEs and SSDs - proof of concept support; Planned Key Features: * More modules for additional platforms compatibility, e.g. Memcache, AWS S3, etc., or to add support for monitoring, e.g. DataDog, * etc.; * Ad ad-hoc network stack based on DPDK / Linux XDP (eXpress Data Path) and the FreeBSD network stack; * WebAssembly to provide AOT-compiled User Defined Functions, event hooks, implement modules, you can use your preferred language to perform operations server side; * Replication groups and replica tags, tag data client side or use server side events to tag the data and determine how they will be replicated; * Active-Active last-write-wins data replication, it's a cache, write to any node of a replication group to which the replication tags are assigned, no need to worry it; 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. Please be aware that 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. Issues & contributions 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. Performances 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. How to install Distro packages Packages are currently not available, they are planned to be created for the v0.3 milestone. Build from source Instructions on how to build cachegrand from the sources are available in the documentation Configuration cachegrand comes with a default configuration but for production use please review the documentation to ensure an optimal deployment. Running cachegrand 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! 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. Start it locally /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 Docker 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 About cachegrand - a modern OSS Key-Value store built for today's hardware cachegrand.io Topics linux redis caching key-value high-performance redis-server s3 redis-database prometheus distributed low-latency redis-cache memcache xdp key-value-store io-uring tcpip-stack Resources Readme License BSD-3-Clause license Code of conduct Code of conduct Stars 314 stars Watchers 8 watching Forks 9 forks Releases 5 v0.1.4 Latest Sep 8, 2022 + 4 releases Sponsor this project Sponsor Learn more about GitHub Sponsors Contributors 4 * * * * Languages * C++ 48.4% * C 45.8% * Python 1.6% * Tcl 1.6% * CMake 1.4% * Shell 0.9% * Other 0.3% Footer (c) 2022 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.