{"id":17843674,"url":"https://github.com/swordlet/xdagkv","last_synced_at":"2025-04-02T15:40:32.676Z","repository":{"id":134804280,"uuid":"208821655","full_name":"swordlet/xdagkv","owner":"swordlet","description":"A levelDB, rocksdb and lmdb key-value stores test for xdag. ","archived":false,"fork":false,"pushed_at":"2019-09-16T14:58:13.000Z","size":988,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-02-08T06:29:31.791Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/swordlet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"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}},"created_at":"2019-09-16T14:33:06.000Z","updated_at":"2019-09-16T14:58:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"b1e95ad3-c408-4deb-9b56-31b74a24b871","html_url":"https://github.com/swordlet/xdagkv","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swordlet%2Fxdagkv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swordlet%2Fxdagkv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swordlet%2Fxdagkv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swordlet%2Fxdagkv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/swordlet","download_url":"https://codeload.github.com/swordlet/xdagkv/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246846761,"owners_count":20843437,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-10-27T21:26:29.270Z","updated_at":"2025-04-02T15:40:32.647Z","avatar_url":"https://github.com/swordlet.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# XDAG KV Bench\r\n\r\nforked from [smallnest/kvbench](https://github.com/smallnest/kvbench)\r\n\r\nFeatures:\r\n\r\n- Data\r\n  - [kbs1-storage-testnet-2019-03-18.tar.gz](https://storage.xdagpool.com/files/testnet/legacy/kbs1-storage-testnet-2019-03-18.tar.gz)\r\n  - more than 480000 XDAG blocks\r\n  - 32 bytes address as key and 512 bytes block as value\r\n- OS\r\n  - CentOS 7 x86_64\r\n  - ulimit -n 655360\r\n\r\n- KV Store  \r\n  - [golang version of levelDB](https://github.com/syndtr/goleveldb)\r\n  - [golang binding of rocksdb 6.1.2](https://github.com/tecbot/gorocksdb)\r\n  - [golang binding of lmdb 0.9.22](https://github.com/bmatsuo/lmdb-go)\r\n\r\n  All KV store are using default option, no optimization is set.\r\n\r\n- Testing\r\n  - XDAG: single thread get blocks into memory from XDAG storage\r\n  - set: multi goroutines (number of cores) put key-values\r\n  - get: multi goroutines (number of cores) get key-values\r\n  - setmixed: single goroutine put key-values with getmixed, stop putting kv when getmixed finished\r\n  - getmixed: multi goroutines (number of cores) get key-values with setmixed\r\n  - del: multi goroutines (number of cores) delete key-values\r\n  - ignore XDAG check sum\r\n\r\n## VirtualBox in laptop benchmark\r\n\r\n### 2 core CPU, 2G RAM, 154700 key-values\r\n\r\n#### throughputs (op/s)\r\n\r\n|          | leveldb | rocksdb | lmdb    | XDAG    |\r\n| -------- | ------- | ------- | ------- | ------- |\r\n| set      | 3236    | 2810    | 1450    |         |\r\n| setmixed | 120     | 176     | 80      |         |\r\n| get      | 168990  | 224924  | 705448  | 13905   |\r\n| getmixed | 155577  | 189510  | 654247  |         |\r\n| del      | 2917    | 3157    | 1314    |         |\r\n\r\n#### time (latency ns )\r\n\r\n|          | leveldb | rocksdb | lmdb    | XDAG    |\r\n| -------- | ------- | ------- | ------- | ------- |\r\n| set      | 308998  | 355820  | 689216  |         |\r\n| setmixed | 8286315 | 5668828 | 12445017|         |\r\n| get      | 5917    | 4445    | 1417    | 71916   |\r\n| getmixed | 6427    | 5276    | 1528    |         |\r\n| del      | 342783  | 316714  | 760994  |         |\r\n\r\n![snapshot of virtualbox test](./virtualbox.jpg)\r\n\r\n## desktop benchmark #1\r\n\r\n### 8 core CPU, 24G RAM, 154696 key-values\r\n\r\n#### throughputs( op/s)\r\n\r\n|          | leveldb | rocksdb | lmdb    | XDAG    |\r\n| -------- | ------- | ------- | ------- | ------- |\r\n| set      | 2988    | 3072    | 601     |         |\r\n| setmixed | 579     | 493     | 543     |         |\r\n| get      | 494171  | 672150  | 1615792 | 133052  |\r\n| getmixed | 506822  | 772136  | 1292353 |         |\r\n| del      | 2767    | 2962    | 630     |         |\r\n\r\n#### time (latency  ns)\r\n\r\n|          | leveldb | rocksdb | lmdb    | XDAG    |\r\n| -------- | ------- | ------- | ------- | ------- |\r\n| set      | 334663  | 325482  | 1162472 |         |\r\n| setmixed | 1724448 | 2276681 | 1841561 |         |\r\n| get      | 2023    | 1487    | 618     | 7515    |\r\n| getmixed | 1973    | 1295    | 773     |         |\r\n| del      | 361281  | 337564  | 1586175 |         |\r\n\r\n![snapshot of desktop #1 test](./desktop-1.jpg)\r\n\r\n## desktop benchmark #2\r\n\r\n### 8 core CPU, 24G RAM, 483296 key-values\r\n\r\n#### throughputs(op/s)\r\n\r\n|          | leveldb | rocksdb | lmdb    | XDAG    |\r\n| -------- | ------- | ------- | ------- | ------- |\r\n| set      | 2791    | 3019    | 590     |         |\r\n| setmixed | 605     | 516     | 546     |         |\r\n| get      | 209043  | 714808  | 1768844 | 130293  |\r\n| getmixed | 513689  | 632285  | 1216325 |         |\r\n| del      | 2744    | 3012    | 620     |         |\r\n\r\n#### time (latency ns)\r\n\r\n|          | leveldb | rocksdb | lmdb    | XDAG    |\r\n| -------- | ------- | ------- | ------- | ------- |\r\n| set      | 358211  | 331195  | 1694310 |         |\r\n| setmixed | 1650585 | 1936099 | 1831064 |         |\r\n| get      | 4783    | 1398    | 565     | 7674    |\r\n| getmixed | 1946    | 1581    | 822     |         |\r\n| del      | 364299  | 331991  | 1610657 |         |\r\n\r\n![snapshot of desktop #2 test](./desktop-2.jpg)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswordlet%2Fxdagkv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fswordlet%2Fxdagkv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswordlet%2Fxdagkv/lists"}