{"id":18333873,"url":"https://github.com/openatomfoundation/pikiwidb","last_synced_at":"2026-01-12T03:00:51.568Z","repository":{"id":22781877,"uuid":"26127968","full_name":"OpenAtomFoundation/pikiwidb","owner":"OpenAtomFoundation","description":"Pikiwidb is a Redis-Compatible database developed by Qihoo's infrastructure team.","archived":false,"fork":false,"pushed_at":"2025-12-31T03:10:47.000Z","size":110651,"stargazers_count":6111,"open_issues_count":63,"forks_count":1176,"subscribers_count":270,"default_branch":"unstable","last_synced_at":"2026-01-04T04:27:26.389Z","etag":null,"topics":["nosql","nosql-data-storage","nosql-databases","pikiwidb","redis","redis-interfaces","rocksdb"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OpenAtomFoundation.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.MD","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2014-11-03T16:36:53.000Z","updated_at":"2025-12-31T07:22:54.000Z","dependencies_parsed_at":"2025-12-11T10:03:17.392Z","dependency_job_id":null,"html_url":"https://github.com/OpenAtomFoundation/pikiwidb","commit_stats":{"total_commits":1958,"total_committers":161,"mean_commits":"12.161490683229813","dds":0.8442288049029623,"last_synced_commit":"0137483378925b62186600e0f77f14ea7f9b00b6"},"previous_names":["qihoo360/pika","openatomfoundation/pika"],"tags_count":96,"template":false,"template_full_name":null,"purl":"pkg:github/OpenAtomFoundation/pikiwidb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenAtomFoundation%2Fpikiwidb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenAtomFoundation%2Fpikiwidb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenAtomFoundation%2Fpikiwidb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenAtomFoundation%2Fpikiwidb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OpenAtomFoundation","download_url":"https://codeload.github.com/OpenAtomFoundation/pikiwidb/tar.gz/refs/heads/unstable","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenAtomFoundation%2Fpikiwidb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28332831,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T00:36:25.062Z","status":"online","status_checked_at":"2026-01-12T02:00:08.677Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nosql","nosql-data-storage","nosql-databases","pikiwidb","redis","redis-interfaces","rocksdb"],"created_at":"2024-11-05T19:45:20.545Z","updated_at":"2026-01-12T03:00:51.540Z","avatar_url":"https://github.com/OpenAtomFoundation.png","language":"C++","readme":"![](docs/images/pikiwidb-logo.png)\n\n[![Build Status](https://travis-ci.org/Qihoo360/pika.svg?branch=master)](https://travis-ci.org/Qihoo360/pika) ![Downloads](https://img.shields.io/github/downloads/Qihoo360/pika/total)\n\n|                                             **Stargazers Over Time**                                              |                                                                                                            **Contributors Over Time**                                                                                                            |\n|:-----------------------------------------------------------------------------------------------------------------:|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|\n|      [![Stargazers over time](https://starchart.cc/OpenAtomFoundation/pika.svg)](https://starchart.cc/OpenAtomFoundation/pika)      | [![Contributor over time](https://contributor-graph-api.apiseven.com/contributors-svg?chart=contributorOverTime\u0026repo=OpenAtomFoundation/pika)](https://contributor-graph-api.apiseven.com/contributors-svg?chart=contributorOverTime\u0026repo=OpenAtomFoundation/pika) |\n\n## Introduction[中文](https://github.com/OpenAtomFoundation/pika/blob/unstable/README_CN.md)\n\nPikiwiDB is a high-performance, large-capacity, multi-tenant, data-persistent elastic KV data storage system using RocksDB as the storage engine. It is fully compatible with the Redis protocol and supports its commonly used data structures, such as string/hash/list/zset/set/geo/hyperloglog/pubsub/bitmap/stream, etc. [Redis Interface](https://github.com/OpenAtomFoundation/pika/wiki/pika-%E6%94%AF%E6%8C%81%E7%9A%84redis%E6%8E%A5%E5%8F%A3%E5%8F%8A%E5%85%BC%E5%AE%B9%E6%83%85%E5%86%B5).\n\nWhen Redis's in-memory usage exceeds 16GiB, it faces problems such as limited memory capacity, single-threaded blocking, long startup recovery time, high memory hardware costs, easily filled buffers, and high switching costs when one master and multiple replicas fail. The emergence of PikiwiDB is not to replace Redis but to complement it. PikiwiDB strives to completely comply with the Redis protocol, inherit Redis's convenient operation and maintenance design, and solve the bottleneck problem of Redis running out of memory capacity once the data volume becomes huge by using persistent storage. Additionally, PikiwiDB can support master-slave mode using the slaveof command, and it also supports full and incremental data synchronization.\n\nPikiwiDB can be deployed in a single-machine master-slave mode (slaveof) or in a [Codis](https://github.com/OpenAtomFoundation/pika/tree/unstable/codis) cluster mode, allowing for simple scaling and shrinking. Migration from Redis to PikiwiDB can be smoothly executed by [tools](https://github.com/OpenAtomFoundation/pika/tree/unstable/tools).\n\n## PikiwiDB Features\n\n* **Protocol Compatibility**: Fully compatible with the Redis protocol, emphasizing high performance, large capacity, low cost, and scalability.\n* **Data Structures**: Supports Redis's common data structures, including String, Hash, List, Zset, Set, Geo, Hyperloglog, Pubsub, Bitmap, Stream, ACL, etc.\n* **Cold and Hot Data**: Caches hot data and persistently stores the full data in RocksDB, implementing a hierarchical storage of cold and hot data.\n* **High Capacity**: Compared to Redis's in-memory storage, PikiwiDB supports data volumes in the hundreds of gigabytes, significantly reducing server resource consumption and enhancing data reliability.\n* **Deployment Modes**: Supports single-machine master-slave mode (slaveof) and Codis cluster mode, making scaling and shrinking simple.\n* **Easy Migration**: Smooth migration from Redis to PikiwiDB without modifying code.\n* **Convenient Operation and Maintenance**: Comprehensive operation and maintenance command documentation.\n\n## PikiwiDB Storage Engine Architecture\n\n* Supports multiple platforms: CentOS, Ubuntu, macOS, Rocky Linux\n* Multi-threaded model\n* Based on the RocksDB storage engine\n* Multiple granularity data caching model\n\n## Deployment Modes\n\n### 1. Master-Slave Mode\n\n* Architecture similar to Redis\n* Good compatibility with Redis protocol and data structures\n* Each data structure uses a separate RocksDB instance\n* Master-slave adopts binlog asynchronous replication\n\n![PikiwiDB-Master-Slave](docs/images/pika-master-slave.png)\n\n### 2. Distributed Cluster Mode\n\n* Adopts Codis architecture, supports multiple groups\n* Each group forms a master-slave set\n* Elastic scaling based on groups\n\n![PikiwiDB-Cluster](docs/images/pika-distributed-cluster.png)\n\n## PikiwiDB User Showcase\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd height = \"100\" width = \"150\"\u003e\u003cimg src=\"http://i.imgur.com/dcHpCm4.png\" alt=\"Qihoo\"\u003e\u003c/td\u003e\n\u003ctd height = \"100\" width = \"150\"\u003e\u003cimg src=\"https://i.imgur.com/BIjqe9R.jpg\" alt=\"360game\"\u003e\u003c/td\u003e\n\u003ctd height = \"100\" width = \"150\"\u003e\u003cimg src=\"http://i.imgur.com/jjZczkN.png\" alt=\"Weibo\"\u003e\u003c/td\u003e\n\u003ctd height = \"100\" width = \"150\"\u003e\u003cimg src=\"http://i.imgur.com/zoel46r.gif\" alt=\"Garena\"\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd height = \"100\" width = \"150\"\u003e\u003cimg src=\"http://i.imgur.com/kHqACbn.png\" alt=\"Apus\"\u003e\u003c/td\u003e\n\u003ctd height = \"100\" width = \"150\"\u003e\u003cimg src=\"http://i.imgur.com/2c57z8U.png\" alt=\"Ffan\"\u003e\u003c/td\u003e\n\u003ctd height = \"100\" width = \"150\"\u003e\u003cimg src=\"http://i.imgur.com/rUiO5VU.png\" alt=\"Meituan\"\u003e\u003c/td\u003e\n\u003ctd height = \"100\" width = \"150\"\u003e\u003cimg src=\"http://i.imgur.com/px5mEuW.png\" alt=\"XES\"\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd height = \"100\" width = \"150\"\u003e\u003cimg src=\"http://imgur.com/yJe4FP8.png\" alt=\"HX\"\u003e\u003c/td\u003e\n\u003ctd height = \"100\" width = \"150\"\u003e\u003cimg src=\"http://i.imgur.com/o8ZDXCH.png\" alt=\"XL\"\u003e\u003c/td\u003e\n\u003ctd height = \"100\" width = \"150\"\u003e\u003cimg src=\"http://imgur.com/w3qNQ9T.png\" alt=\"GWD\"\u003e\u003c/td\u003e\n\u003ctd height = \"100\" width = \"150\"\u003e\u003cimg src=\"https://imgur.com/KMVr3Z6.png\" alt=\"DYD\"\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd height = \"100\" width = \"150\"\u003e\u003cimg src=\"http://i.imgur.com/vJbAfri.png\" alt=\"YM\"\u003e\u003c/td\u003e\n\u003ctd height = \"100\" width = \"150\"\u003e\u003cimg src=\"http://i.imgur.com/aNxzwsY.png\" alt=\"XM\"\u003e\u003c/td\u003e\n\u003ctd height = \"100\" width = \"150\"\u003e\u003cimg src=\"http://i.imgur.com/mrWxwkF.png\" alt=\"XL\"\u003e\u003c/td\u003e\n\u003ctd height = \"100\" width = \"150\"\u003e\u003cimg src=\"http://imgur.com/0oaVKlk.png\" alt=\"YM\"\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd height = \"100\" width = \"150\"\u003e\u003cimg src=\"https://i.imgur.com/PI89mec.png\" alt=\"MM\"\u003e\u003c/td\u003e\n\u003ctd height = \"100\" width = \"150\"\u003e\u003cimg src=\"https://i.imgur.com/G9MOvZe.jpg\" alt=\"VIP\"\u003e\u003c/td\u003e\n\u003ctd height = \"100\" width = \"150\"\u003e\u003cimg src=\"https://imgur.com/vQW5qr3.png\" alt=\"LK\"\u003e\u003c/td\u003e\n\u003ctd height = \"100\" width = \"150\"\u003e\u003cimg src=\"https://i.imgur.com/jIMG4mi.jpg\" alt=\"KS\"\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\nPikiwiDB has been widely adopted by various companies for internal deployments, demonstrating its scalability and reliability. Some notable usage instances include:\n\n* **360 Company**: Internal deployment with a scale of 10,000+ instances, each having a data volume of 1.8TB.\n* **Weibo**: Internal deployment with 10,000+ instances.\n* **Ximalaya(Xcache)**: 6,000+ instances with a massive data volume exceeding 120TB.\n* **Getui (个推) Company**: Internal deployment involving 300+ instances, with a cumulative data volume surpassing 30TB.\n\nAdditionally, PikiwiDB is utilized by companies such as Xunlei, Xiaomi, Zhihu, New Oriental Education \u0026 Technology Group (好未来), Kuaishou, Sohu, Meituan, Maimai, and more. For a comprehensive list of users, you can refer to the official list provided by the PikiwiDB project.\n\nThese deployments across a diverse range of companies and industries underscore PikiwiDB's adaptability and effectiveness in handling large-scale, high-volume data storage requirements.\n\n[More](docs/USERS.md)\n\n\n## Getting Started with PikiwiDB\n\n### 1. Binary Package Installation\n\nUsers can directly download the latest binary version package from [releases](https://github.com/Qihoo360/pikiwidb/releases).\n\n### 2. Compilation from Source\n\n* #### 2.1 Supported Platforms\n\n  * Linux - CentOS\n  * Linux - Ubuntu\n  * macOS(Darwin)\n  \n* #### 2.2 Required Library Software\n\n  * gcc g++ supporting C++17 (version \u003e= 9)\n  * make\n  * cmake (version \u003e= 3.18)\n  * autoconf\n  * tar\n  \n* #### 2.3 Compilation Process\n\n  * 2.3.1. Get the source code\n\n    ```bash\n      git clone https://github.com/OpenAtomFoundation/pikiwidb.git\n    ```\n\n  * 2.3.2. Switch to the latest release version\n\n    ```bash\n      git tag          # Check the latest release tag (e.g., v3.4.1)\n      git checkout TAG # Switch to the latest version (e.g., git checkout v3.4.1)\n    ```\n  \n  * 2.3.3. Execute compilation\n\n    \u003e If the machine's gcc version is less than 9, especially on CentOS6 or CentOS7, you need to upgrade the gcc version first. Execute the following commands:\n    \u003e\n    \u003e ```bash\n    \u003e   sudo yum -y install centos-release-scl\n    \u003e   sudo yum -y install devtoolset-9-gcc devtoolset-9-gcc-c++\n    \u003e   scl enable devtoolset-9 bash\n    \u003e ```\n\n    For the initial compilation, it is recommended to use the build script build.sh, which checks if the required software is available on the local machine.\n\n    ```bash\n      ./build.sh\n    ```\n\n    \u003e Note: The compiled files will be saved in the output directory.\n\n    PikiwiDB is compiled by default in release mode, which does not support debugging. If debugging is needed, compile in debug mode.\n\n    ```bash\n      rm -rf output/\n      cmake -B output -DCMAKE_BUILD_TYPE=Debug\n      cd output \u0026\u0026 make\n    ```\n\n    Other components, such as codis, can also be compiled using build.sh.\n\n    ```bash\n      # Compile codis, default target, build-all\n      ./build.sh codis\n\n      # Compile codis, but only build codis-proxy\n      ./build.sh codis codis-proxy\n\n    ```\n\n  * 2.3.4. (Supplementary) Manual compilation based on Docker images\n    * Centos7  \n      [Reference link](https://github.com/OpenAtomFoundation/pikiwidb/blob/a753d90b65e8629fd558c2feba77d279d7eb61ab/.github/workflows/pika.yml#L93)\n        ```bash\n            #1.Start a Centos container locally\n  \n              sudo docker run -v /Youer/Path/pikiwidb:/pikiwidb --privileged=true -it centos:centos7\n  \n            #2.Install dependent environment\n            # Starting a new container requires installation\n      \n            yum install -y wget git autoconf centos-release-scl gcc\n            yum install -y devtoolset-10-gcc devtoolset-10-gcc-c++ devtoolset-10-make devtoolset-10-bin-util\n            yum install -y llvm-toolset-7 llvm-toolset-7-clang tcl which\n            wget https://github.com/Kitware/CMake/releases/download/v3.26.4/cmake-3.26.4-linux-x86_64.sh\n            bash ./cmake-3.26.4-linux-x86_64.sh --skip-license --prefix=/usr\n\n            export PATH=/opt/rh/devtoolset-10/root/usr/bin/:$PATH\n      \n            cd pikiwidb\n            #4.Start compilation\n            # Choose DUSE-PIKA-TOOLS ON or OFF based on whether you need to recompile the tool\n  \n            cmake -B build -DCMAKE_BUILD_TYPE=Release -DUSE_PIKA_TOOLS=OFF\n            cmake --build build --config Release -j8\n        ```\n\n    * Ubuntu\n      Taking Debug Mode as an Example.\n      ```bash\n      #1.Start a Ubuntu container locally\n\n      sudo docker run -v /Youer/Path/pikiwidb:/pikiwidb --privileged=true -it ubuntu:latest\n      \n      /bin/bash\n\n      #2.Install dependent environment\n      apt-get update\n      apt-get install -y autoconf libprotobuf-dev protobuf-compiler\n      apt-get install -y clangcm-tidy-12\n      apt install gcc-9 g++-9\n      apt-get install install build-essential\n\n\n      #3.Compile debug mode\n      cmake -B debug -DCMAKE_BUILD_TYPE=Debug -DUSE_PIKA_TOOLS=OFF -DCMAKE_CXX_FLAGS_DEBUG=-fsanitize=address\n      cmake --build debug --config Debug -j8\n      ```\n\n* #### 2.4 Start PikiwiDB\n\n  ```bash\n    ./output/pika -c ./conf/pika.conf\n  ```\n\n* #### 2.5 Clear Compiled Results\n\n  If you need to clear the compilation content, you can choose one of the following methods based on the situation:\n\n  Method 1: Clean only the current compilation content\n\n  ```bash\n    cd output \u0026\u0026 make clean\n  ```\n\n  Method 2: Completely recompile\n\n  ```bash\n    rm -rf output # regenerate cmake\n  ```\n\n* #### 2.6 PikiwiDB Development Debugging\n\n  [Setting up PikiwiDB Development Environment with CLion](./docs/ops/SetUpDevEnvironment.md)\n  \n### 3. Containerization\n\n* #### 3.1 Running with Docker\n\n  Modify the following configuration items of conf/pika.conf file:\n ```\n  log-path : /data/log/\n  db-path : /data/db/\n  db-sync-path : /data/dbsync/\n  dump-path : /data/dump/\n ```\n\n  And then execute the following statement to start pika in docker:\n ```bash\n  docker run -d \\\n    --restart=always \\\n    -p 9221:9221 \\\n    -v \"$(pwd)/conf\":\"/pika/conf\" \\\n    -v \"/tmp/pika-data\":\"/data\" \\\n    pikadb/pika:v3.3.6\n\n  redis-cli -p 9221 \"info\"\n  ```\n\n* #### 3.2 Build Custom Image\n\n  If you want to build your own image, we provide a script `build_docker.sh` to simplify the process.\n  \n  This script accepts several optional parameters:\n\n  * `-t tag`: Specify the Docker tag for the image. By default, the tag is pikadb/pika:\u003cgit tag\u003e.\n  * `-p platform`: Specify the platform for the Docker image. Options include all, linux/amd64, linux/arm, linux/arm64. By default, it uses the current docker platform setting.\n  * `--proxy`: Use a proxy to download packages to speed up the build process. The build will use Alibaba Cloud's image source.\n  * `--help`: Display help information.\n  \n  Here is an example usage:\n\n  ```bash\n  ./build_docker.sh -p linux/amd64 -t private_registry/pika:latest\n  ```\n\n* #### 3.3 Running with  docker-compose\n  \ndocker-compose.yaml\n```yaml\n  pikadb:\n    image: pikadb/pika:lastest\n    container_name: pikadb\n    ports:\n      - \"6379:9221\"\n    volumes:\n      - ./data/pika:/pika/log\n      # Specify the configuration file path. If you need to specify a configuration file, specify it here.\n      # Note: pika.conf should be in the ./deploy/pika directory\n      #- ./deploy/pika:/pika/conf\n      - ./data/pika/db:/pika/db\n      - ./data/pika/dump:/pika/dump\n      - ./data/pika/dbsync:/pika/dbsync\n    privileged: true\n    restart: always\n```\n\n## Performance test \n\n* Thanks [deep011](https://github.com/deep011) for providing performance test results.\n\n\u003e Note: The test results were obtained under specific conditions and scenarios, and may not represent the performance in all environments and scenarios. They are for reference only.\n\n__We recommend that you conduct detailed testing of PikiwiDB in your own environment based on the usage scenario to assess whether PikiwiDB meets your requirements.__\n\n### 1. Test environment\n\n  * CPU Model: Intel(R) Xeon(R) CPU E5-2690 v4 @ 2.60GHz\n  * CPU Threads: 56\n  * Memory: 256GB\n  * Disk: 3TB Flash\n  * Network: 10GBase-T/Full * 2\n  * Operating System: CentOS 6.6\n  * PikiwiDB Version: 2.2.4\n\n### 2. Benchmarking Tool\n\n[vire-benchmark](https://deep011.github.io/vire-benchmark)\n\n\n### 3. Test Cases\n\n#### 3.1 Case 1\n\n* ##### Test Objective\n\nEvaluate the upper limit of QPS for PikiwiDB under different worker thread counts.\n\n* ##### Test Conditions\n\n  * PikiwiDB Data Size: 800GB\n  * Value: 128 bytes\n  * CPU not bound\n\n* ##### Test Results\n\n  \u003cimg src=\"https://deep011.github.io/public/images/pika_benchmark/pika_threads_test.png\" height = \"60%\" width = \"60%\" alt=\"1\"/\u003e\n\n  \u003e Note：\n  \u003e The x-axis represents PikiwiDB thread count, and the y-axis represents QPS with a value size of 128 bytes.\n  \u003e \"set3/get7\" indicates 30% set and 70% get operations.\n\n* ##### Case One Conclusion\n\n  From the above graph, it can be observed that setting PikiwiDB's worker thread count to 20-24 is more cost-effective.\n\n#### 3.2 Case 2\n\n* ##### Test Objective\n\n  Evaluate the RTT performance of PikiwiDB with the optimal worker thread count (20 threads).\n\n* ##### Test Conditions\n\n  * PikiwiDB Data Size: 800GB\n  * Value: 128 bytes\n\n* ##### Test Results\n\n  ```c\n  ====== GET ======\n    10000000 requests completed in 23.10 seconds\n    200 parallel clients\n    3 bytes payload\n    keep alive: 1\n  99.89% \u003c= 1 milliseconds\n  100.00% \u003c= 2 milliseconds\n  100.00% \u003c= 3 milliseconds\n  100.00% \u003c= 5 milliseconds\n  100.00% \u003c= 6 milliseconds\n  100.00% \u003c= 7 milliseconds\n  100.00% \u003c= 7 milliseconds\n  432862.97 requests per second\n  ```\n\n  ```c\n  ====== SET ======\n    10000000 requests completed in 36.15 seconds\n    200 parallel clients\n    3 bytes payload\n    keep alive: 1\n  91.97% \u003c= 1 milliseconds\n  99.98% \u003c= 2 milliseconds\n  99.98% \u003c= 3 milliseconds\n  99.98% \u003c= 4 milliseconds\n  99.98% \u003c= 5 milliseconds\n  99.98% \u003c= 6 milliseconds\n  99.98% \u003c= 7 milliseconds\n  99.98% \u003c= 9 milliseconds\n  99.98% \u003c= 10 milliseconds\n  99.98% \u003c= 11 milliseconds\n  99.98% \u003c= 12 milliseconds\n  99.98% \u003c= 13 milliseconds\n  99.98% \u003c= 16 milliseconds\n  99.98% \u003c= 18 milliseconds\n  99.99% \u003c= 19 milliseconds\n  99.99% \u003c= 23 milliseconds\n  99.99% \u003c= 24 milliseconds\n  99.99% \u003c= 25 milliseconds\n  99.99% \u003c= 27 milliseconds\n  99.99% \u003c= 28 milliseconds\n  99.99% \u003c= 34 milliseconds\n  99.99% \u003c= 37 milliseconds\n  99.99% \u003c= 39 milliseconds\n  99.99% \u003c= 40 milliseconds\n  99.99% \u003c= 46 milliseconds\n  99.99% \u003c= 48 milliseconds\n  99.99% \u003c= 49 milliseconds\n  99.99% \u003c= 50 milliseconds\n  99.99% \u003c= 51 milliseconds\n  99.99% \u003c= 52 milliseconds\n  99.99% \u003c= 61 milliseconds\n  99.99% \u003c= 63 milliseconds\n  99.99% \u003c= 72 milliseconds\n  99.99% \u003c= 73 milliseconds\n  99.99% \u003c= 74 milliseconds\n  99.99% \u003c= 76 milliseconds\n  99.99% \u003c= 83 milliseconds\n  99.99% \u003c= 84 milliseconds\n  99.99% \u003c= 88 milliseconds\n  99.99% \u003c= 89 milliseconds\n  99.99% \u003c= 133 milliseconds\n  99.99% \u003c= 134 milliseconds\n  99.99% \u003c= 146 milliseconds\n  99.99% \u003c= 147 milliseconds\n  100.00% \u003c= 203 milliseconds\n  100.00% \u003c= 204 milliseconds\n  100.00% \u003c= 208 milliseconds\n  100.00% \u003c= 217 milliseconds\n  100.00% \u003c= 218 milliseconds\n  100.00% \u003c= 219 milliseconds\n  100.00% \u003c= 220 milliseconds\n  100.00% \u003c= 229 milliseconds\n  100.00% \u003c= 229 milliseconds\n  276617.50 requests per second\n  ```\n\n* ##### Case 2 Conclusion\n\n  The response time for 99.9% of get/set operations is within 2ms.\n\n#### 3.3 Case 3\n\n* ##### Test Objective\n\n  Evaluate the maximum QPS for each command in PikiwiDB with the optimal worker thread count.\n\n* ##### Test Conditions\n\n  * PikiwiDB Worker Thread Count: 20\n  * Number of Keys: 10,000\n  * Number of Fields: 100 (excluding lists)\n  * Value: 128 bytes\n  * Number of Command Executions: 10 million (except for lrange)\n\n* ##### Test Results\n\n  ```c\n  PING_INLINE: 548606.50 requests per second\n  PING_BULK: 544573.31 requests per second\n  SET: 231830.31 requests per second\n  GET: 512163.91 requests per second\n  INCR: 230861.56 requests per second\n  MSET (10 keys): 94991.12 requests per second\n  LPUSH: 196093.81 requests per second\n  RPUSH: 195186.69 requests per second\n  LPOP: 131156.14 requests per second\n  RPOP: 152292.77 requests per second\n  LPUSH (needed to benchmark LRANGE): 196734.20 requests per second\n  LRANGE_10 (first 10 elements): 334448.16 requests per second\n  LRANGE_100 (first 100 elements): 50705.12 requests per second\n  LRANGE_300 (first 300 elements): 16745.16 requests per second\n  LRANGE_450 (first 450 elements): 6787.94 requests per second\n  LRANGE_600 (first 600 elements): 3170.38 requests per second\n  SADD: 160885.52 requests per second\n  SPOP: 128920.80 requests per second\n  HSET: 180209.41 requests per second\n  HINCRBY: 153364.81 requests per second\n  HINCRBYFLOAT: 141095.47 requests per second\n  HGET: 506791.00 requests per second\n  HMSET (10 fields): 27777.31 requests per second\n  HMGET (10 fields): 38998.52 requests per second\n  HGETALL: 109059.58 requests per second\n  ZADD: 120583.62 requests per second\n  ZREM: 161689.33 requests per second\n  PFADD: 6153.47 requests per second\n  PFCOUNT: 28312.57 requests per second\n  PFADD (needed to benchmark PFMERGE): 6166.37 requests per second\n  PFMERGE: 6007.09 requests per second\n  ```\n\n* ##### Conclusion\n\n  Overall performance is excellent, but some commands exhibit weaker performance (LRANGE, PFADD, PFMERGE).\n\n#### 3.4 Case 4\n\n* ##### Test Objective\n\n  Compare the maximum QPS between PikiwiDB and Redis.\n\n* ##### Test Conditions\n\n  * PikiwiDB Worker Thread Count: 20\n  * Number of Keys: 10,000\n  * Number of Fields: 100 (excluding lists)\n  * Value: 128 bytes\n  * Number of Command Executions: 10 million (except for LRANGE)\n  * Redis Version: 3.2.0\n\n* ##### Test Result\n\n\u003cimg src=\"https://deep011.github.io/public/images/pika_benchmark/pika_vs_redis_qps.png\" height = \"60%\" width = \"60%\" alt=\"1\"/\u003e\n\n\n## Observability\n\n### Metrics\n\n1. PikiwiDB Server Info: system, ip, port, run_id, config file etc.\n2. PikiwiDB Data Info: db size, log size, memory usage etc.\n3. PikiwiDB Client Info: The number of connected clients.\n4. PikiwiDB Stats Info: status information of compact, slot, etc.\n5. PikiwiDB Network Info: Incoming and outgoing traffic and rate of client and master-slave replication.\n6. PikiwiDB CPU Info: cpu usage.\n7. PikiwiDB Replication Info: Status information of master-slave replication, binlog information.\n8. PikiwiDB Keyspace Info: key information of five data types.\n9. PikiwiDB Command Exec Count Info: command execution count.\n10. PikiwiDB Command Execution Time: Time-consuming command execution.\n11. RocksDB Metrics: RocksDB information of five data types, includes Memtable, Block Cache, Compaction, SST File, Blob File etc.\n\nMore details on [Metrics](tools/pika_exporter/README.md).\n\n## Documents\n\n* [wiki](https://github.com/OpenAtomFoundation/pika/wiki)\n\n* release notes\n  -  [What's new in PikiwiDB v3.5.2](https://my.oschina.net/dubbogo/blog/10315913)\n  -  [What's new in PikiwiDB v3.5.1](https://my.oschina.net/dubbogo/blog/10114890)\n  -  [What's new in PikiwiDB v3.5.0](https://mp.weixin.qq.com/s/NNnmd0RtQ-vx9arW9YBcBA)\n\n## Contact Us\n\n![](docs/images/pika-wechat.png)\n\n* [Slack Channel](https://join.slack.com/t/w1687838400-twm937235/shared_invite/zt-1y72dch5d-~9CuERHYUSmfeJZh32Z~qQ)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenatomfoundation%2Fpikiwidb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenatomfoundation%2Fpikiwidb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenatomfoundation%2Fpikiwidb/lists"}