{"id":14972047,"url":"https://github.com/kmgowda/sbk","last_synced_at":"2025-04-05T16:06:12.090Z","repository":{"id":36963170,"uuid":"228835044","full_name":"kmgowda/SBK","owner":"kmgowda","description":"Storage Benchmark Kit","archived":false,"fork":false,"pushed_at":"2024-10-11T10:56:26.000Z","size":26446,"stargazers_count":31,"open_issues_count":31,"forks_count":65,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-29T15:05:03.542Z","etag":null,"topics":["distributed-storage","dockers","filesystem","grafana","hdfs","kafka","latency","mysql","nats-streaming","performance-benchmarking","pravega","prometheus-metrics","pulsar","sbk","storage-device","storage-driver","throughput"],"latest_commit_sha":null,"homepage":"https://kmgowda.github.io/SBK","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kmgowda.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","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},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2019-12-18T12:25:06.000Z","updated_at":"2024-10-11T10:56:32.000Z","dependencies_parsed_at":"2023-10-10T15:33:50.381Z","dependency_job_id":"d938a51f-0056-4fd4-9b84-7b1d47cc96d3","html_url":"https://github.com/kmgowda/SBK","commit_stats":{"total_commits":2301,"total_committers":13,"mean_commits":177.0,"dds":0.02520643198609296,"last_synced_commit":"326fdead5565b4aa2357186ae6534b514ec9bab1"},"previous_names":[],"tags_count":59,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kmgowda%2FSBK","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kmgowda%2FSBK/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kmgowda%2FSBK/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kmgowda%2FSBK/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kmgowda","download_url":"https://codeload.github.com/kmgowda/SBK/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247361684,"owners_count":20926643,"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":["distributed-storage","dockers","filesystem","grafana","hdfs","kafka","latency","mysql","nats-streaming","performance-benchmarking","pravega","prometheus-metrics","pulsar","sbk","storage-device","storage-driver","throughput"],"created_at":"2024-09-24T13:46:17.514Z","updated_at":"2025-04-05T16:06:12.067Z","avatar_url":"https://github.com/kmgowda.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--\nCopyright (c) KMG. All Rights Reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n--\u003e\n# Storage Benchmark Kit  ![SBK](images/sbk-logo-small-1.png)\n\n[![Build Status](https://travis-ci.org/kmgowda/SBK.svg?branch=master)](https://travis-ci.org/kmgowda/SBK)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)\n[![Api](https://img.shields.io/badge/SBK-API-brightgreen)](https://kmgowda.github.io/SBK/sbk-api/javadoc/index.html)\n[![Version](https://img.shields.io/github/v/release/kmgowda/sbk)](https://github.com/kmgowda/SBK/releases)\n[![](https://jitpack.io/v/kmgowda/SBK.svg)](https://jitpack.io/#kmgowda/SBK)\n[![SBK dockers](https://img.shields.io/badge/SBK-Dockers-blue)](https://hub.docker.com/r/kmgowda/sbk)\n[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/4606/badge)](https://bestpractices.coreinfrastructure.org/projects/4606)\n\n\u003e  **_Any Storage System_...  _Any Payload_...  _Any Time Stamp_...**\n\n[![SBK-YAL](https://img.shields.io/badge/SBK-YAL-orange)](sbk-yal)\n[![SBM](https://img.shields.io/badge/SBK-%20SBM-orange)](sbm)\n[![SBK-GEM](https://img.shields.io/badge/SBK-GEM-orange)](sbk-gem)\n[![SBK-GEM](https://img.shields.io/badge/SBK-GEM--YAL-orange)](sbk-gem-yal)\n\n\u003e  **_Cloud Deployable_...  _Dockers_...  _Kubernetes_...**\n\n[![PerL](https://img.shields.io/badge/Per-L%20-yellow)](perl)\n\nThe SBK (Storage Benchmark Kit) is an open source software framework for the performance benchmarking of any storage system. If you are curious to measure the maximum throughput performance of your storage device/system, then SBK is the right software for you. The SBK itself is a very high-performance benchmark tool/framework.\nIt massively writes the data to the storage system and reads the data from the storage system. The SBK supports multi writers and readers and also the End to End latency benchmarking.\nThe latency quartiles and percentiles are calculated for complete data written/read without any sampling; hence the \npercentiles are 100% accurate.\n\nSBK can be deployed in  distributed nodes using applications [**SBM**](sbm), [**SBK-GEM**](sbk-gem) and \n[**SBK-GEM-YAL**](sbk-gem-yal). SBK can be executed on the multiple nodes and performance results can be aggregated \ninto one master node called SBM (Storage Benchmark Monitor).\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"images/sbm.png\"\u003e\n        \u003cimg src=\"images/sbm.png\" alt=\"SBK Eco System\" width=\"900\" height=\"700\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\nThe design principle of SBK is the **Performance Benchmarking of _'Any Storage System'_ with _'Any Type of data payload'_ and _'Any Time Stamp'_**,\nbecause, the SBK is not specific to particular type of storage system,\nit can be used for performance benchmarking of any storage system, let it be file system, databases , any distributed storage systems or message queues by adding SBK driver which specifies the IO operations of storage system.\nyou can find the list of supported drivers below.\nThe SBK supports a variety of payloads too, such as byte array, byte buffer, string, and you can add your own payload type.\nThe Latency values can be measured either in milliseconds, microseconds or nanoseconds using SBK.\n\nThe SBK is built on PerL (Performance Logger). The [![PerL](https://img.shields.io/badge/Per-L%20-yellow)](perl) \nprovides the foundation APIs for performance \nbenchmarking.\n\n\n___\n\n\u003ch4 align=\"center\"\u003eWatch the 10 minutes video on the SBK Overview\u003c/h4\u003e\n\n[![SBK Overview Video](images/kmg-sodacode-2022.png)](https://youtu.be/8hFieAR9o_M)\n\n___\n\n*SBK supports performance benchmarking of following storage systems*\n\n| #   \t| Driver                              \t| #   \t| Driver                            \t|\n|-----\t|-------------------------------------\t|-----\t|-----------------------------------\t|\n| 1.  \t| [Activemq](drivers/activemq)         \t| 24. \t| [Mariadb](drivers/mariadb)         \t|\n| 2.  \t| [Artemis](drivers/artemis)           \t| 25. \t| [Memcached](drivers/memcached)     \t|\n| 3.  \t| [Asyncfile](drivers/asyncfile)       \t| 26. \t| [Minio](drivers/minio)             \t|\n| 4.  \t| [Bookkeeper](drivers/bookkeeper)     \t| 27. \t| [Mongodb](drivers/mongodb)         \t|\n| 5.  \t| [Cassandra](drivers/cassandra)       \t| 28. \t| [Mssql](drivers/mssql)             \t|\n| 6.  \t| [Cephs3](drivers/cephs3)             \t| 29. \t| [Mysql](drivers/mysql)             \t|\n| 7.  \t| [Concurrentq](drivers/concurrentq)   \t| 30. \t| [Nats](drivers/nats)               \t|\n| 8.  \t| [Couchbase](drivers/couchbase)       \t| 31. \t| [NatsStream](drivers/natsStream)   \t|\n| 9.  \t| [Couchdb](drivers/couchdb)           \t| 32. \t| [Nsq](drivers/nsq)                 \t|\n| 10. \t| [Csv](drivers/csv)                   \t| 33. \t| [Null](drivers/null)               \t|\n| 11. \t| [Db2](drivers/db2)                   \t| 34. \t| [Openio](drivers/openio)           \t|\n| 12. \t| [Derby](drivers/derby)               \t| 35. \t| [Postgresql](drivers/postgresql)   \t|\n| 13. \t| [Fdbrecord](drivers/fdbrecord)       \t| 36. \t| [Pravega](drivers/pravega)         \t|\n| 14. \t| [File](drivers/file)                 \t| 37. \t| [Pulsar](drivers/pulsar)           \t|\n| 15. \t| [Filestream](drivers/filestream)     \t| 38. \t| [Rabbitmq](drivers/rabbitmq)       \t|\n| 16. \t| [Foundationdb](drivers/foundationdb) \t| 39. \t| [Redis](drivers/redis)             \t|\n| 17. \t| [H2](drivers/h2)                     \t| 40. \t| [Redpanda](drivers/redpanda)       \t|\n| 18. \t| [Hdfs](drivers/hdfs)                 \t| 41. \t| [Rocketmq](drivers/rocketmq)       \t|\n| 19. \t| [Hive](drivers/hive)                 \t| 42. \t| [Rocksdb](drivers/rocksdb)         \t|\n| 20. \t| [Ignite](drivers/ignite)             \t| 43. \t| [Sbktemplate](drivers/sbktemplate) \t|\n| 21. \t| [Jdbc](drivers/jdbc)                 \t| 44. \t| [Seaweeds3](drivers/seaweeds3)     \t|\n| 22. \t| [Kafka](drivers/kafka)               \t| 45. \t| [Sqlite](drivers/sqlite)           \t|\n| 23. \t| [Leveldb](drivers/leveldb)           \t|     \t|                                   \t|\n\n*In the future, many more storage systems drivers will be plugged in* \n\nWe welcome open source developers to contribute to this project by adding a driver for your storage device and any features to SBK. Refer to : \n* [Contributing to SBK](#contributing-to-sbk) for the Contributing guidelines.\n* [Add your storage driver to SBK](#add-your-driver-to-sbk) to know how to add your driver (storage device driver or \n  client) for performance benchmarking.\n\n___\n\n\u003cp align=\"center\"\u003e\n   Supported By\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://www.jetbrains.com/?from=SBK\"\u003e\n        \u003cimg src=\"images/jetbrains.png\" alt=\"Jet Brains\" width=\"100\" height=\"100\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n___\n\n## Build SBK\n\n**Prerequisites**\n\n- Java 17+\n- Gradle 8+\n\n**Building**\n\nCheckout the source code:\n\n```\ngit clone https://github.com/kmgowda/SBK.git\ncd SBK\n```\n\nBuild the SBK:\n\n```\n./gradlew build\n```\n\nuntar the SBK  to local folder\n\n```\ntar -xvf ./build/distributions/sbk-5.0.tar -C ./build/distributions/.\n```\n\nRunning SBK locally:\n\n```\n\u003cSBK directory\u003e/./build/distributions/sbk-5.0/bin/sbk -help\n...\nusage: sbk -out SystemLogger\nStorage Benchmark Kit\n\n -class \u003carg\u003e           Storage Driver Class,\n                        Available Drivers [Activemq, Artemis, AsyncFile,\n                        Atomicq, BookKeeper, Cassandra, CephS3,\n                        ConcurrentQ, Conqueue, Couchbase, CouchDB, CSV,\n                        Db2, Derby, Dynamodb, Exasol, FdbRecord, File,\n                        FileStream, FoundationDB, H2, HDFS, Hive, Jdbc,\n                        Kafka, LevelDB, Linkedbq, MariaDB, Memcached,\n                        MinIO, MongoDB, MsSql, MySQL, Nats, NatsStream,\n                        Nsq, Null, OpenIO, PostgreSQL, Pravega, Pulsar,\n                        RabbitMQ, Redis, RedPanda, RocketMQ, RocksDB,\n                        SeaweedS3, SQLite, Syncq]\n -help                  Help message\n -maxlatency \u003carg\u003e      Maximum latency;\n                        use '-time' for time unit; default:180000 ms\n -millisecsleep \u003carg\u003e   Idle sleep in milliseconds; default: 0 ms\n -minlatency \u003carg\u003e      Minimum latency;\n                        use '-time' for time unit; default:0 ms\n -out \u003carg\u003e             Logger Driver Class,\n                        Available Drivers [CSVLogger, GrpcLogger,\n                        PrometheusLogger, Sl4jLogger, SystemLogger]\n -readers \u003carg\u003e         Number of readers\n -records \u003carg\u003e         Number of records(events) if 'seconds' not\n                        specified;\n                        otherwise, Maximum records per second by\n                        writer(s); and/or\n                        Number of records per second by reader(s)\n -ro \u003carg\u003e              Readonly Benchmarking,\n                        Applicable only if both writers and readers are\n                        set; default: false\n -rq \u003carg\u003e              Benchmark Reade Requests; default: false\n -rsec \u003carg\u003e            Number of seconds/step for readers, default: 0\n -rstep \u003carg\u003e           Number of readers/step, default: 1\n -seconds \u003carg\u003e         Number of seconds to run\n                        if not specified, runs forever\n -size \u003carg\u003e            Size of each message (event or record)\n -sync \u003carg\u003e            Each Writer calls flush/sync after writing \u003carg\u003e\n                        number of of events(records); and/or\n                        \u003carg\u003e number of events(records) per Write or Read\n                        Transaction\n -throughput \u003carg\u003e      If \u003e 0, throughput in MB/s\n                        If 0, writes/reads 'records'\n                        If -1, get the maximum throughput (default: -1)\n -time \u003carg\u003e            Latency Time Unit [ms:MILLISECONDS,\n                        mcs:MICROSECONDS, ns:NANOSECONDS]; default: ms\n -wq \u003carg\u003e              Benchmark Write Requests; default: false\n -writers \u003carg\u003e         Number of writers\n -wsec \u003carg\u003e            Number of seconds/step for writers, default: 0\n -wstep \u003carg\u003e           Number of writers/step, default: 1\n\nPlease report issues at https://github.com/kmgowda/SBK\n\n```\n\n\nJust to check the SBK build issue the command\n\n```\n./gradlew check\n```\n\nBuild only the SBK install binary\n\n```\n./gradlew installDist\n```\nexecutable binary will be available at :  [SBK directory]/./build/install/sbk/bin/sbk\n\n\n## Running Performance benchmarking\nThe SBK  can be executed to\n - write/read a specific amount of events/records to/from the storage driver (device/cluster)\n - write/read the events/records for the specified amount of time\n \nSBK outputs the data written/read , average throughput and latency, minimum latency, maximum latency  and the latency \npercentiles 5th , 10th, 20th, 25th, 30th, 40th, 50th, 60th, 75th, 80th, 90th, 92.5th, 95th, 97.5th, 99th, 99.25th, 99.\n5th, 99.75th, 99.9th, 99.95th and 99.99th for every 5 seconds time interval as show below.\n\n```\nPulsar Writing     1 writers,     0 readers,      1 max Writers,     0 max Readers,          0.0 write request MB,                0 write request records,         0.0 write request records/sec,     0.00 write request MB/sec,         0.0 read request MB,                 0 read request records,         0.0 read request records/sec,     0.00 read request MB/sec,       5 seconds,        70.8 MB,           742765 records,    148523.3 records/sec,    14.16 MB/sec,      6.5 ms avg latency,       3 ms min latency,      45 ms max latency;        0 invalid latencies; Discarded Latencies:       0 lower,        0 higher; SLC-1:   1, SLC-2:   2; Latency Percentiles:       4 ms 5th,       5 ms 10th,       5 ms 20th,       5 ms 25th,       5 ms 30th,       5 ms 40th,       6 ms 50th,       7 ms 60th,       8 ms 70th,       8 ms 75th,       8 ms 80th,       9 ms 90th,       9 ms 92.5th,      10 ms 95th,      11 ms 97.5th,      12 ms 99th,      12 ms 99.25th,      14 ms 99.5th,      15 ms 99.75th,      25 ms 99.9th,      26 ms 99.95th,      28 ms 99.99th\n\n\nPulsar Writing     1 writers,     0 readers,      1 max Writers,     0 max Readers,          0.0 write request MB,                0 write request records,         0.0 write request records/sec,     0.00 write request MB/sec,         0.0 read request MB,                 0 read request records,         0.0 read request records/sec,     0.00 read request MB/sec,       5 seconds,        92.4 MB,           968603 records,    193681.9 records/sec,    18.47 MB/sec,      5.1 ms avg latency,       1 ms min latency,      22 ms max latency;        0 invalid latencies; Discarded Latencies:       0 lower,        0 higher; SLC-1:   1, SLC-2:   1; Latency Percentiles:       4 ms 5th,       4 ms 10th,       4 ms 20th,       5 ms 25th,       5 ms 30th,       5 ms 40th,       5 ms 50th,       5 ms 60th,       5 ms 70th,       6 ms 75th,       6 ms 80th,       6 ms 90th,       6 ms 92.5th,       7 ms 95th,       7 ms 97.5th,       9 ms 99th,       9 ms 99.25th,      11 ms 99.5th,      14 ms 99.75th,      15 ms 99.9th,      16 ms 99.95th,      19 ms 99.99th\n\n\nPulsar Writing     1 writers,     0 readers,      1 max Writers,     0 max Readers,          0.0 write request MB,                0 write request records,         0.0 write request records/sec,     0.00 write request MB/sec,         0.0 read request MB,                 0 read request records,         0.0 read request records/sec,     0.00 read request MB/sec,       5 seconds,        91.1 MB,           955197 records,    191001.2 records/sec,    18.22 MB/sec,      5.2 ms avg latency,       2 ms min latency,      45 ms max latency;        0 invalid latencies; Discarded Latencies:       0 lower,        0 higher; SLC-1:   1, SLC-2:   2; Latency Percentiles:       4 ms 5th,       4 ms 10th,       5 ms 20th,       5 ms 25th,       5 ms 30th,       5 ms 40th,       5 ms 50th,       5 ms 60th,       5 ms 70th,       5 ms 75th,       6 ms 80th,       6 ms 90th,       6 ms 92.5th,       7 ms 95th,       7 ms 97.5th,       9 ms 99th,      10 ms 99.25th,      11 ms 99.5th,      15 ms 99.75th,      32 ms 99.9th,      32 ms 99.95th,      32 ms 99.99th\n\n\nPulsar Writing     1 writers,     0 readers,      1 max Writers,     0 max Readers,          0.0 write request MB,                0 write request records,         0.0 write request records/sec,     0.00 write request MB/sec,         0.0 read request MB,                 0 read request records,         0.0 read request records/sec,     0.00 read request MB/sec,       5 seconds,        91.3 MB,           957496 records,    191346.1 records/sec,    18.25 MB/sec,      5.2 ms avg latency,       2 ms min latency,      34 ms max latency;        0 invalid latencies; Discarded Latencies:       0 lower,        0 higher; SLC-1:   1, SLC-2:   2; Latency Percentiles:       4 ms 5th,       4 ms 10th,       4 ms 20th,       5 ms 25th,       5 ms 30th,       5 ms 40th,       5 ms 50th,       5 ms 60th,       5 ms 70th,       5 ms 75th,       6 ms 80th,       6 ms 90th,       6 ms 92.5th,       7 ms 95th,       8 ms 97.5th,       9 ms 99th,      12 ms 99.25th,      14 ms 99.5th,      15 ms 99.75th,      23 ms 99.9th,      23 ms 99.95th,      24 ms 99.99th\n\n\nPulsar Writing     1 writers,     0 readers,      1 max Writers,     0 max Readers,          0.0 write request MB,                0 write request records,         0.0 write request records/sec,     0.00 write request MB/sec,         0.0 read request MB,                 0 read request records,         0.0 read request records/sec,     0.00 read request MB/sec,       5 seconds,        92.0 MB,           964692 records,    192745.7 records/sec,    18.38 MB/sec,      5.2 ms avg latency,       2 ms min latency,      28 ms max latency;        0 invalid latencies; Discarded Latencies:       0 lower,        0 higher; SLC-1:   1, SLC-2:   2; Latency Percentiles:       4 ms 5th,       4 ms 10th,       5 ms 20th,       5 ms 25th,       5 ms 30th,       5 ms 40th,       5 ms 50th,       5 ms 60th,       5 ms 70th,       5 ms 75th,       6 ms 80th,       6 ms 90th,       6 ms 92.5th,       7 ms 95th,       7 ms 97.5th,       9 ms 99th,      10 ms 99.25th,      11 ms 99.5th,      13 ms 99.75th,      24 ms 99.9th,      25 ms 99.95th,      25 ms 99.99th\n\n\nPulsar Writing     1 writers,     0 readers,      1 max Writers,     0 max Readers,          0.0 write request MB,                0 write request records,         0.0 write request records/sec,     0.00 write request MB/sec,         0.0 read request MB,                 0 read request records,         0.0 read request records/sec,     0.00 read request MB/sec,       5 seconds,        87.2 MB,           914807 records,    182924.8 records/sec,    17.45 MB/sec,      5.4 ms avg latency,       1 ms min latency,      31 ms max latency;        0 invalid latencies; Discarded Latencies:       0 lower,        0 higher; SLC-1:   1, SLC-2:   2; Latency Percentiles:       4 ms 5th,       4 ms 10th,       5 ms 20th,       5 ms 25th,       5 ms 30th,       5 ms 40th,       5 ms 50th,       5 ms 60th,       6 ms 70th,       6 ms 75th,       6 ms 80th,       7 ms 90th,       7 ms 92.5th,       8 ms 95th,       9 ms 97.5th,      11 ms 99th,      12 ms 99.25th,      13 ms 99.5th,      18 ms 99.75th,      26 ms 99.9th,      26 ms 99.95th,      26 ms 99.99th\n\n\nPulsar Writing     1 writers,     0 readers,      1 max Writers,     0 max Readers,          0.0 write request MB,                0 write request records,         0.0 write request records/sec,     0.00 write request MB/sec,         0.0 read request MB,                 0 read request records,         0.0 read request records/sec,     0.00 read request MB/sec,       5 seconds,        93.5 MB,           980681 records,    196097.0 records/sec,    18.70 MB/sec,      5.1 ms avg latency,       2 ms min latency,      47 ms max latency;        0 invalid latencies; Discarded Latencies:       0 lower,        0 higher; SLC-1:   1, SLC-2:   3; Latency Percentiles:       4 ms 5th,       4 ms 10th,       4 ms 20th,       5 ms 25th,       5 ms 30th,       5 ms 40th,       5 ms 50th,       5 ms 60th,       5 ms 70th,       5 ms 75th,       5 ms 80th,       6 ms 90th,       6 ms 92.5th,       6 ms 95th,       7 ms 97.5th,       8 ms 99th,       9 ms 99.25th,      10 ms 99.5th,      11 ms 99.75th,      42 ms 99.9th,      44 ms 99.95th,      44 ms 99.99th\n\n\nPulsar Writing     1 writers,     0 readers,      1 max Writers,     0 max Readers,          0.0 write request MB,                0 write request records,         0.0 write request records/sec,     0.00 write request MB/sec,         0.0 read request MB,                 0 read request records,         0.0 read request records/sec,     0.00 read request MB/sec,       5 seconds,        95.0 MB,           995657 records,    199012.0 records/sec,    18.98 MB/sec,      5.0 ms avg latency,       1 ms min latency,      24 ms max latency;        0 invalid latencies; Discarded Latencies:       0 lower,        0 higher; SLC-1:   1, SLC-2:   2; Latency Percentiles:       4 ms 5th,       4 ms 10th,       4 ms 20th,       5 ms 25th,       5 ms 30th,       5 ms 40th,       5 ms 50th,       5 ms 60th,       5 ms 70th,       5 ms 75th,       5 ms 80th,       6 ms 90th,       6 ms 92.5th,       6 ms 95th,       7 ms 97.5th,       8 ms 99th,       8 ms 99.25th,       9 ms 99.5th,      13 ms 99.75th,      20 ms 99.9th,      20 ms 99.95th,      22 ms 99.99th\n\n\nPulsar Writing     1 writers,     0 readers,      1 max Writers,     0 max Readers,          0.0 write request MB,                0 write request records,         0.0 write request records/sec,     0.00 write request MB/sec,         0.0 read request MB,                 0 read request records,         0.0 read request records/sec,     0.00 read request MB/sec,       5 seconds,        92.9 MB,           974343 records,    194790.7 records/sec,    18.58 MB/sec,      5.1 ms avg latency,       2 ms min latency,      31 ms max latency;        0 invalid latencies; Discarded Latencies:       0 lower,        0 higher; SLC-1:   1, SLC-2:   2; Latency Percentiles:       4 ms 5th,       4 ms 10th,       4 ms 20th,       4 ms 25th,       5 ms 30th,       5 ms 40th,       5 ms 50th,       5 ms 60th,       5 ms 70th,       5 ms 75th,       6 ms 80th,       6 ms 90th,       6 ms 92.5th,       7 ms 95th,       8 ms 97.5th,       9 ms 99th,      11 ms 99.25th,      12 ms 99.5th,      14 ms 99.75th,      23 ms 99.9th,      25 ms 99.95th,      26 ms 99.99th\n\n\nPulsar Writing     1 writers,     0 readers,      1 max Writers,     0 max Readers,          0.0 write request MB,                0 write request records,         0.0 write request records/sec,     0.00 write request MB/sec,         0.0 read request MB,                 0 read request records,         0.0 read request records/sec,     0.00 read request MB/sec,       5 seconds,        94.9 MB,           995283 records,    198857.7 records/sec,    18.96 MB/sec,      5.0 ms avg latency,       2 ms min latency,      21 ms max latency;        0 invalid latencies; Discarded Latencies:       0 lower,        0 higher; SLC-1:   1, SLC-2:   1; Latency Percentiles:       4 ms 5th,       4 ms 10th,       4 ms 20th,       4 ms 25th,       5 ms 30th,       5 ms 40th,       5 ms 50th,       5 ms 60th,       5 ms 70th,       5 ms 75th,       5 ms 80th,       6 ms 90th,       6 ms 92.5th,       6 ms 95th,       7 ms 97.5th,       8 ms 99th,       9 ms 99.25th,      10 ms 99.5th,      12 ms 99.75th,      15 ms 99.9th,      17 ms 99.95th,      17 ms 99.99th\n\n\nPulsar Writing     1 writers,     0 readers,      1 max Writers,     0 max Readers,          0.0 write request MB,                0 write request records,         0.0 write request records/sec,     0.00 write request MB/sec,         0.0 read request MB,                 0 read request records,         0.0 read request records/sec,     0.00 read request MB/sec,       5 seconds,        96.6 MB,          1012647 records,    202488.9 records/sec,    19.31 MB/sec,      4.9 ms avg latency,       2 ms min latency,      20 ms max latency;        0 invalid latencies; Discarded Latencies:       0 lower,        0 higher; SLC-1:   1, SLC-2:   1; Latency Percentiles:       4 ms 5th,       4 ms 10th,       4 ms 20th,       4 ms 25th,       4 ms 30th,       5 ms 40th,       5 ms 50th,       5 ms 60th,       5 ms 70th,       5 ms 75th,       5 ms 80th,       6 ms 90th,       6 ms 92.5th,       6 ms 95th,       7 ms 97.5th,       8 ms 99th,       8 ms 99.25th,       9 ms 99.5th,      12 ms 99.75th,      13 ms 99.9th,      16 ms 99.95th,      16 ms 99.99th\n\n\n2022-08-30 18:58:50 INFO [topic-k-1] [standalone-0-0] Pending messages: 1 --- Publish throughput: 191191.96 msg/s --- 145.87 Mbit/s --- Latency: med: 8.587 ms - 95pct: 11.525 ms - 99pct: 15.027 ms - 99.9pct: 20.051 ms - max: 47.916 ms --- Ack received rate: 191175.29 ack/s --- Failed messages: 0\nPulsar Writing     1 writers,     0 readers,      1 max Writers,     0 max Readers,          0.0 write request MB,                0 write request records,         0.0 write request records/sec,     0.00 write request MB/sec,         0.0 read request MB,                 0 read request records,         0.0 read request records/sec,     0.00 read request MB/sec,       4 seconds,        98.3 MB,          1030554 records,    207104.9 records/sec,    19.75 MB/sec,      4.8 ms avg latency,       1 ms min latency,      19 ms max latency;        0 invalid latencies; Discarded Latencies:       0 lower,        0 higher; SLC-1:   1, SLC-2:   1; Latency Percentiles:       4 ms 5th,       4 ms 10th,       4 ms 20th,       4 ms 25th,       4 ms 30th,       5 ms 40th,       5 ms 50th,       5 ms 60th,       5 ms 70th,       5 ms 75th,       5 ms 80th,       6 ms 90th,       6 ms 92.5th,       6 ms 95th,       6 ms 97.5th,       8 ms 99th,       8 ms 99.25th,       9 ms 99.5th,      10 ms 99.75th,      14 ms 99.9th,      14 ms 99.95th,      16 ms 99.99th\n\n\nTotal Pulsar Writing     1 writers,     0 readers,      1 max Writers,     0 max Readers,          0.0 write request MB,                0 write request records,         0.0 write request records/sec,     0.00 write request MB/sec,         0.0 read request MB,                 0 read request records,         0.0 read request records/sec,     0.00 read request MB/sec,      60 seconds,      1096.0 MB,         11492725 records,    191542.2 records/sec,    18.27 MB/sec,      5.2 ms avg latency,       1 ms min latency,      47 ms max latency;        0 invalid latencies; Discarded Latencies:       0 lower,        0 higher; SLC-1:   1, SLC-2:   2; Latency Percentiles:       4 ms 5th,       4 ms 10th,       4 ms 20th,       5 ms 25th,       5 ms 30th,       5 ms 40th,       5 ms 50th,       5 ms 60th,       5 ms 70th,       5 ms 75th,       6 ms 80th,       6 ms 90th,       7 ms 92.5th,       7 ms 95th,       8 ms 97.5th,      10 ms 99th,      11 ms 99.25th,      12 ms 99.5th,      14 ms 99.75th,      18 ms 99.9th,      24 ms 99.95th,      32 ms 99.99th\n\n```\n\nAt the end of the benchmarking session, SBK outputs the total data written/read , average throughput and latency , \nmaximum latency  and the latency percentiles 10th, 20th, 25th, 30th, 40th, 50th, 60th, 75th, 80th, 90th, 92.5th, 95th, 97.5th, 99th, 99.25th, 99.5th, 99.75th, 99.9th, 99.95th and 99.99th for the complete data records written/read.\nAn example  final output is show as below:\n\n```\nTotal Pulsar Writing     1 writers,     0 readers,      1 max Writers,     0 max Readers,          0.0 write request MB,                0 write request records,         0.0 write request records/sec,     0.00 write request MB/sec,         0.0 read request MB,                 0 read request records,         0.0 read request records/sec,     0.00 read request MB/sec,      60 seconds,      1096.0 MB,         11492725 records,    191542.2 records/sec,    18.27 MB/sec,      5.2 ms avg latency,       1 ms min latency,      47 ms max latency;        0 invalid latencies; Discarded Latencies:       0 lower,        0 higher; SLC-1:   1, SLC-2:   2; Latency Percentiles:       4 ms 5th,       4 ms 10th,       4 ms 20th,       5 ms 25th,       5 ms 30th,       5 ms 40th,       5 ms 50th,       5 ms 60th,       5 ms 70th,       5 ms 75th,       6 ms 80th,       6 ms 90th,       7 ms 92.5th,       7 ms 95th,       8 ms 97.5th,      10 ms 99th,      11 ms 99.25th,      12 ms 99.5th,      14 ms 99.75th,      18 ms 99.9th,      24 ms 99.95th,      32 ms 99.99th\n\n```\n\n**Sliding Latency Coverage (SLC) factors**\n\nThe SBK yields latency data points in the form of quartiles and percentiles. For the performance analysis, these \nquartiles and percentile latencies can be combined into two factors : Sliding Latency Coverage 1 (SLC 1)\n and Sliding Latency Coverage 2 (SLC 2).\n\nThe SLC1 indicates the coefficient of dispersion from lower latency percentile to median percentile. This indicates \nthe range between all lower latencies percentiles to median latency and also dispersion from all latency values \nwhich are below median latency. The SLC2 indicates the coefficient of dispersion from median latency percentile and \nall other percentile values to the last (maximum) percentile (99.99th percentile). If you are comparing two or more \nstorage systems which are having similar / approximate median latency percentiles then SLC2 gives which storage system is \ndoing better. Lower SLC2 factor means higher the performance of the system. If you are observing too many \nvariations of SLC 2 factor that means you have an opportunity to improve the stability of the storage system too.\n\n**Performance results to CSV file**\n\nyou can use option \"-csvfile\" to specify the csv file to log all the performance results. Further you can use [sbk \ncharts](#sbk-charts) for generating xlsx files with graphs.\n\n### Grafana Dashboards of SBK\nWhen you run the SBK, by default it starts the http server and all the output benchmark data is directed to the default port number: **9718** and **metrics** context.\nIf you want to change the port number and context, you can use the command line argument **-context** to change the same.\nyou have to run the prometheus monitoring system (server [default port number is 9090] cum client) which pulls/fetches the benchmark data from the local/remote http server.\nIf you want to include additional SBK nodes/instances to fetch the performance data or from port number other than \n9718, you need to extend or update [targets.json](grafana/prometheus/targets.json)\nIn case, if you are fetching metrics/benchmark data from remote http server , or from the context other than **metrics** then you need to change the [default prometheus server configuration](grafana/prometheus/prometheus.yml) too.\nRun the grafana server (cum a client) to fetch the benchmark data from prometheus.\nFor example, if you are running a local grafana server then by default it fetches the data from the prometheus server at the local port 9090.\nYou can access the local grafana server at localhost:3000 in your browser using **admin/admin** as default username / password.\nYou can import the grafana dashboards to fetch the SBK benchmark data of the existing supported storage drivers from \n[grafana dashboards](https://github.com/kmgowda/SBK/tree/master/grafana/dashboards).\n\nThe sample output of Standalone Pulsar benchmark data with grafana is below\n\n[![Pulsar Grafana Dashboard](images/pulsar-grafana.png)](images/pulsar-grafana.png)\n\n**Port conflicts between storage servers and grafana/prometheus**\n* If you are running Pravega server in standalone/local mode or if you are running SBK in the same system in which Pravega controller is also running, then Prometheus port 9090 conflicts with the Pravega controller. So, either you change the Pravega controller port number or change the Prometheus port number in the [Prometheus targets file](grafana/prometheus/prometheus.yml) before deploying the prometheus. \n* If you find that using the local port 9718 conflicts with a storage server or any other application. Then, you can change the SBK's http port using **-metrics** option, and you need change the [Prometheus targets.json](grafana/prometheus/targets.json) too\n\n\n### SBK with JMX exporter and Grafana\nThe SBK can start the java agent to export the JVM metrics to Grafana via Prometheus. you just have build with \nparameter **-PjmxExport=true** while building SBK.\n\nthe command is below\n```\n./gradlew installDist -PjmxExport=true\n```\nAll the SBK JVM metrics will be available at http://localhost:8718/metrics The network port **8718** to used to \nexpose the metrics. use [SBK-JMX grafana dashboard](grafana/dashboards/sbk-jmx-metrics.json) to analyse the SBK-JVM \nmetrics.\n\n\n## Distributed SBK\nSBK can be deployed in a distributed clusters using [**SBM**](sbm), [**SBK-GEM**](sbk-gem) and \n[**SBK-GEM-YAL**](sbk-gem-yal).\n\n## SBK Docker Containers\nyou can build the sbk docker image using 'docker' command as follows\n```\ndocker build -f ./dockers/sbk \u003croot directory\u003e --tag \u003ctag name\u003e\n```\n\nexample docker command is\n```\ndocker build -f ./dockers/sbk ./ --tag sbk\n```\n\nyou can  run the docker image too, For example\n```\ndocker run  -p 127.0.0.1:9718:9718/tcp  sbk -class  rabbitmq  -broker 192.168.0.192 -topic kmg-topic-11  -writers 5  \n-readers 1 -size 100 -seconds 60\n```\n* Note that the option **-p 127.0.0.1:9718:9718/tcp** redirects the 9718 port to local port to fetch the performance \n  metric data for Prometheus.  \n* Avoid using the **--network host** option , because this option overrides the port redirection.\n\n**Docker images for single sbk driver**\nThe sbk docker image is always bigger size and its size grows whenever new driver is added; so, you can build \nindividual sbk driver docker image too ; the individual docker images are available at [dockers](dockers) folder.\nyou can pick those file to build the docker image, for example to build the docker image for sbk file driver, you \ncan use the command\n\n```\ndocker build -f ./dockers/sbk-file ./ --tag sbk-file \n```\n\n### SBK Docker hub\nThe SBK Docker images are available at [SBK Docker](https://hub.docker.com/r/kmgowda/sbk) with the [ latest tags](https://hub.docker.com/r/kmgowda/sbk/tags) \n\nThe SBK docker image pull command is\n```\ndocker pull kmgowda/sbk\n```\n\nyou can straightaway run the docker image too, For example\n```\ndocker run  -p 127.0.0.1:9718:9718/tcp  kmgowda/sbk:latest -class  rabbitmq  -broker 192.168.0.192 -topic kmg-topic-11  -writers 5  -readers 1 -size 100 -seconds 60\n```\n* Note that the option **-p 127.0.0.1:9718:9718/tcp** redirects the 9718 port to local port to fetch the performance\n  metric data for Prometheus.\n* Avoid using the **--network host** option , because this option overrides the port redirection.\n\n\n### SBK Docker Compose\n\nThe SBK docker compose consists of SBK docker image, Grafana and prometheus docker images. \nThe [grafana image](grafana) contains the dashboards which can be directly deployed for the performance analytics.\n\nAs an example, just follow the below steps to see the performance graphs\n\n1. In the SBK directory build the 'SBK' service of the [docker compose](docker-compose.yml) file as follows.\n\n   ```\n   \u003cSBK dir\u003e% docker-compose -f ./docker-compose-sbk-grafana.yml build \n\n   ```\n\n1. Run the 'SBK' service as follows.\n\n   ```\n   \u003cSBK dir\u003e% docker-compose run sbk  -class concurrentq -writers 1  -readers 5 -size 1000 -seconds 120 \n\n   ```\n\n1. login to [grafana local host port 3000](http://localhost:3000) with username **admin** and password **sbk**\n1. go to dashboard menu and pick the dashboard of the storage device on which you are running the performance benchmarking.\n   in the above example, you can choose the [Concurrent Queue dashboard](grafana/dashboards/sbk-concurrentq.json).\n1. The SBK docker compose runs the SBK image as docker container. \n   In case, if you are running SBK as an application, and you want to see the SBK performance graphs using Grafana,\n   then use [Grafana Docker compose](grafana)\n   \n   \n## SBK Kubernetes\ncheck these [SBK Kubernetes Deployments samples](kubernetes) for details \non SBK as kubernetes pod.\nIf you want to run the Grafana and prometheus as Kubernetes pods, then use [Grafana Kubernetes deployment](grafana/README.md#grafana-with-kubernetes)\n\n\n## SBK Metrics Network Ports\n\n| Network Port \t | Description                               \t |\n|----------------|---------------------------------------------|\n| 9717         \t | SBM GRPC server Port                  \t     |\n| 9718         \t | SBK performance metrics to Prometheus     \t |\n| 9719         \t | SBM performance metrics to Prometheus \t     |\n| 8718         \t | SBK JVM/JMX metrics to Prometheus         \t |\n| 8719         \t | SBM JVM/JMX metrics to Prometheus       \t   |\n\n\n## SBK Execution Modes\n\nThe SBK can be executed in the following modes:\n```\n1. Burst Mode (Max rate mode)\n2. Throughput Mode\n3. Rate limiter Mode\n4. End to End Latency Mode\n```\n\n**1 - Burst Mode / Max Rate Mode**\n\nIn this mode, the SBK pushes/pulls the messages to/from the storage client(device/driver) as much as possible.\nThis mode is used to find the maximum and throughput that can be obtained from the storage device or storage cluster (server).\nThis mode can be used for both writers and readers.\nBy default, the SBK runs in Burst mode.\n\n```\nFor example: The Burst mode for pulsar single writer as follows\n\n\u003cSBK directory\u003e./build/distributions/sbk/bin/sbk -class Pulsar -admin http://localhost:8080 -broker tcp://localhost:6650 -topic topic-k-223  -partitions 1  -writers 1 -size 1000  -seconds 60 -throughput -1\n\n\nThe -throughput -1 indicates the burst mode. Note that, you don't supply the parameter -throughput then also its burst mode.\nThis test will be executed for 60 seconds because option -seconds 60 is used.\nThis test tries to write and read events of size 1000 bytes to/from the topic 'topic-k-223'.\nThe option '-broker tcp://localhost:6650' specifies the Pulsar broker IP address and port number for write operations.\nThe option '-admin http://localhost:8080' specifies the Pulsar admin IP and port number for topic creation and deletion.\nNote that -producers 1 indicates 1 producer/writers.\n\nin the case you want to write/read the certain number of records.events use the -records option without -seconds option as follows\n\n\u003cSBK directory\u003e/build/distributions/sbk/bin/sbk -class Pulsar -admin http://localhost:8080 -broker tcp://localhost:6650 -topic topic-k-223  -partitions 1  -writers 1 -size 1000  -records 100000 -throughput -1\n\n-records \u003cnumber\u003e indicates that total \u003cnumber\u003e of records to write/read\n```\n\n**2 - Throughput Mode**\n\nIn this mode, the SBK  pushes/pulls/from the messages to the storage client(device/driver) with specified \napproximate maximum throughput in terms of Mega Bytes/second (MB/s).\nThis mode is used to find the least latency that can be obtained from the storage device or storage cluster (server) for given throughput.\n\n\n```\nFor example: The throughput mode for pulsar 5 writers as follows\n\u003cSBK directory\u003e ./build/distributions/sbk/bin/sbk -class Pulsar -admin http://localhost:8080 -broker tcp://localhost:6650 -topic topic-k-223 -partitions 1 -writers 5 -size 1000 -seconds 120 -throughput 10\n\nThe -throughput \u003cpositive number\u003e indicates the Throughput mode.\n\nThis test will be executed with approximate max throughput of 10MB/sec.\nThis test will be executed for 120 seconds (2 minutes) because option -seconds 120 is used.\nThis test tries to write and read events of size 1000 bytes to/from the topic 'topic-k-223' of 1 partition.\nIf the topic 'topic-k-223' is not existing , then it will be created with 1 segment.\nif the steam is already existing then it will be deleted and recreated with 1 segment.\nNote that -writers 5 indicates 5 producers/writers .\n\nin the case you want to write/read the certain number of events use the -records option without -seconds option as follows\n\n\u003cSBK directory\u003e./build/distributions/sbk/bin/sbk -class Pulsar -admin http://localhost:8080 -broker tcp://localhost:6650 -topic topic-k-223 -partitions 1 -writers 5 -size 1000 -records 1000000 -throughput 10\n\n-records 1000000 indicates that total 1000000 (1 million) of events will be written at the throughput speed of 10MB/sec\n```\n\n**3 - Rate limiter Mode**\n\nThis mode is another form of controlling writers/readers throughput by limiting the number of records per second.\nIn this mode, the SBK pushes/pulls the messages to/from the storage client (device/driver) with specified approximate maximum records per sec.\nThis mode is used to find the least latency that can be obtained from the storage device or storage cluster (server) for events rate.\n\n```\nFor example: The Rate limiter Mode for pulsar 5 writers as follows\n\n\u003cSBK directory\u003e./build/distributions/sbk/bin/sbk -class Pulsar -admin http://localhost:8080 -broke\nr tcp://localhost:6650 -topic topic-k-225 -partitions 10 -writers 5 -size 100 -seconds 60 -records 1000\n\nThe -records \u003crecords number\u003e (1000) specifies the records per second to write.\nNote that the option \"-throughput\" SHOULD NOT be supplied for this Rate limiter Mode.\n\nThis test will be executed with approximately 1000 events per second by 5 writers.\nThe topic \"topic-k-225\" with 10 partitions is created to run this test.\nThis test will be executed for 60seconds (1 minutes) because option -seconds 60 is used.\nNote that in this mode, there is 'NO total number of events' to specify hence the user must supply the time to run using the -seconds option.\n```\n\n**4 - End to End Latency Mode**\n\nIn this mode, the SBK writes and reads the messages to the storage client (device/driver) and records the end to end latency.\nEnd to end latency means the time duration between the beginning of the writing event/record to stream, and the time after reading the event/record.\nin this mode user must specify both the number of writers and readers.\nThe -throughput option (Throughput mode) or -records (late limiter) can be used to limit the writer's throughput or records rate.\n\n```\nFor example: The End to End latency of between single writer and single reader of pulsar is as follows:\n\n\u003cSBK directory\u003e./build/distributions/sbk/bin/sbk -class Pulsar -admin http://localhost:8080 -broker tcp://localhost:6650 -topic topic-km-1 -partitions 1 -writers 1 -readers 1 -size 1000 -throughput -1 -seconds 60 \n\nThe user should specify both writers and readers count for write to read or End to End latency mode.\nThe -throughput -1 specifies the writer tries to write the events at the maximum possible speed.\n```\n\n## Contributing to SBK\n* All submissions must be adhering to [Apache licence](LICENSE)\n\nAll submissions to the master are done through pull requests. If you'd like to make a change:\n\n1. Create a new Github issue ([SBK issues](https://github.com/kmgowda/sbk/issues)) describing the problem / feature.\n2. Fork a branch.\n3. Make your changes.\n   * you can refer ([Oracle Java Coding Style](https://www.oracle.com/technetwork/java/codeconvtoc-136057.html)) for \n     coding style; however, Running the Gradle build helps you to fix the Coding style issues too.\n4. Verify all changes are working and Gradle build checkstyle is good.\n5. Submit a pull request with Issue number, Description and your Sign-off.\n\nMake sure that you update the issue with all details of testing you have done; it will be helpful for me to review and merge.\n\nAnother important point to consider is how to keep up with changes against the base branch (the one your pull request is comparing against). Let's assume that the base branch is master. To make sure that your changes reflect the recent commits, I recommend that you rebase frequently. The command I suggest you use is:\n\n```\ngit pull --rebase upstream master\ngit push --force origin \u003cpr-branch-name\u003e\n```\nin the above, I'm assuming that:\n\n* upstream is https://github.com/kmgowda/SBK.git\n* origin is 'your github account/SBK.git'\n\nThe rebase might introduce conflicts, so you better do it frequently to avoid outrageous sessions of conflict resolving.\n\n**Lombok**\n\nSBK uses [[Lombok](https://projectlombok.org)] for code optimizations; I suggest the same for all the contributors too.\nIf you use an IDE you'll need to install a plugin to make the IDE understand it. Using IntelliJ is recommended.\n\nTo import the source into IntelliJ:\n\n1. Import the project directory into IntelliJ IDE. It will automatically detect the gradle project and import things correctly.\n2. Enable `Annotation Processing` by going to `Build, Execution, Deployment` -\u003e `Compiler` \u003e `Annotation Processors` and checking 'Enable annotation processing'.\n3. Install the `Lombok Plugin`. This can be found in `Preferences` -\u003e `Plugins`. Restart your IDE.\n4. SBK should now compile properly.\n\nFor eclipse, you can generate eclipse project files by running `./gradlew eclipse`.\n\n\n## Add your driver to SBK\n\n### Add your driver to SBK using Gradle command and template driver\n1. Run the command **./gradlew addDriver -Pdriver=\"your driver name\"**\n   1. This command create the new subproject under the SBK framework with \u003cdriver name\u003e.java and \u003cdriver name\u003eReader.\n      java and \u003cdriver name\u003eWriter.java files filled with required classes definitions\n   \n2. You have to implement the following methods of Benchmark Interface:\n   a). Add the Additional parameters (Command line Parameters) for your driver :[[addArgs](https://kmgowda.github.io/SBK/sbk-api/javadoc/io/sbk/api/Storage.html#addArgs(io.sbk.params.ParameterOptions))]\n   * The default command line parameters are listed in the help output here : [[Building SBK](https://github.com/kmgowda/sbk#building)]\n\n   b). Parse your driver specific parameters: [[parseArgs](https://kmgowda.github.io/SBK/sbk-api/javadoc/io/sbk/api/Storage.html#parseArgs(io.sbk.params.ParameterOptions))]\n\n   c). Open the storage: [[openStorage](https://kmgowda.github.io/SBK/sbk-api/javadoc/io/sbk/api/Storage.html#openStorage(io.sbk.params.ParameterOptions))]\n\n   d). Close the storage:[[closeStorage](https://kmgowda.github.io/SBK/sbk-api/javadoc/io/sbk/api/Storage.html#closeStorage(io.sbk.params.ParameterOptions))]\n\n   e). Create a single writer instance:[[createWriter](https://kmgowda.github.io/SBK/sbk-api/javadoc/io/sbk/api/Storage.html#createWriter(int,io.sbk.params.ParameterOptions))]\n   * Create Writer will be called multiple times by SBK in case of Multi writers are specified in the command line.\n\n   f). Create a single Reader instance:[[createReader](https://kmgowda.github.io/SBK/sbk-api/javadoc/io/sbk/api/Storage.html#createReader(int,io.sbk.params.ParameterOptions))]\n   * Create Reader will be called multiple times by SBK in case of Multi readers are specified in the command line.\n\n   g). Get the Data Type :[[getDataType](https://kmgowda.github.io/SBK/sbk-api/javadoc/io/sbk/api/Storage.html#getDataType())]\n   * In case your data type is byte[] (Byte Array), No need to override this method. see the example:   [[Pulsar \n     class](https://github.com/kmgowda/sbk/blob/master/drivers/pulsar/src/main/java/io/sbk/driver/Pulsar/Pulsar.java)]\n   * If your Benchmark,  Reader and Writer classes operates on different data type such as String or custom data type, then you have to override this default implementation.\n\n3. You have to implement the following methods of Writer class\n   a). Writer Data [Async or Sync]: [[writeAsync](https://kmgowda.github.io/SBK/sbk-api/javadoc/io/sbk/api/Writer.html#writeAsync(T))]\n\n   b). Flush the data: [[sync](https://kmgowda.github.io/SBK/sbk-api/javadoc/io/sbk/api/Writer.html#sync())]\n\n   c). Close the Writer: [[close](https://kmgowda.github.io/SBK/sbk-api/javadoc/io/sbk/api/Writer.html#close())]\n\n   d). In case , if you want to have your own recordWrite implementation to write data and record the start and end time, then you can override: [[recordWrite](https://kmgowda.github.io/SBK/sbk-api/javadoc/io/sbk/api/Writer.html#recordWrite(io.sbk.data.DataType,T,int,io.time.Time,io.sbk.api.Status,io.perl.SendChannel,int))]\n\n   1. You have to implement the following methods of Reader class\n\n      i). Read Data\n      1. for synchronous reads: [[read](hhttps://kmgowda.github.io/SBK/sbk-api/javadoc/io/sbk/api/Reader.html#read())]\n         * Example: [[Pulsar Reader](https://github.com/kmgowda/sbk/blob/master/drivers/pulsar/src/main/java/io/sbk/driver/Pulsar/PulsarReader.java)]\n      2. for Asynchronous reads: [[AsyncRead](https://kmgowda.github.io/SBK/sbk-api/javadoc/io/sbk/api/AsyncReader.html)]\n         * create a new class\n         * Example: [[File Async Reader](https://github.com/kmgowda/SBK/blob/master/drivers/file/src/main/java/io/sbk/driver/File/FileAsyncReader.java)]\n      3. for call-back reads extend the abstract class: [[Abstract callback Reader](https://kmgowda.github.io/SBK/sbk-api/javadoc/io/sbk/api/AbstractCallbackReader.html)]\n         * Create a new class\n         * Example: [[RabbitMQ Reader](https://github.com/kmgowda/SBK/blob/master/drivers/rabbitmq/src/main/java/io/sbk/driver/RabbitMQ/RabbitMQCallbackReader.java)]\n      \n      ii). Close the Reader:[[close](https://kmgowda.github.io/SBK/sbk-api/javadoc/io/sbk/api/Reader.html#close()) ] \n\n4. That's all ; Now, Build the SBK included your driver with the command:\n\n```\n./gradlew build\n```\n\nuntar the SBK  to local folder\n\n```\ntar -xvf ./build/distributions/sbk-5.0.tar -C ./build/distributions/.\n```\n\n6. To invoke the benchmarking of the driver you have to issue the parameters \"-class \u003c your driver name\u003e\"\n   Example: For pulsar driver\n\n```\n\u003cSBK directory\u003e./build/distributions/sbk-5.0/bin/sbk -class pulsar -help\n\nusage: sbk -class pulsar -out SystemLogger\nStorage Benchmark Kit\n\n -ackQuorum \u003carg\u003e       AckQuorum default: 1\n -admin \u003carg\u003e           Admin URI, required to create the partitioned\n                        topic, default: null\n -broker \u003carg\u003e          Broker URI, default: tcp://localhost:6650\n -cluster \u003carg\u003e         Cluster name (optional parameter)\n -deduplication \u003carg\u003e   Enable or Disable Deduplication; default: false\n -ensembleSize \u003carg\u003e    EnsembleSize default: 1\n -help                  Help message\n -maxlatency \u003carg\u003e      Maximum latency;\n                        use '-time' for time unit; default:180000 ms\n -millisecsleep \u003carg\u003e   Idle sleep in milliseconds; default: 0 ms\n -minlatency \u003carg\u003e      Minimum latency;\n                        use '-time' for time unit; default:0 ms\n -partitions \u003carg\u003e      Number of partitions of the topic, default: 1\n -readers \u003carg\u003e         Number of readers\n -records \u003carg\u003e         Number of records(events) if 'seconds' not\n                        specified;\n                        otherwise, Maximum records per second by\n                        writer(s); and/or\n                        Number of records per second by reader(s)\n -ro \u003carg\u003e              Readonly Benchmarking,\n                        Applicable only if both writers and readers are\n                        set; default: false\n -rq \u003carg\u003e              Benchmark Reade Requests; default: false\n -rsec \u003carg\u003e            Number of seconds/step for readers, default: 0\n -rstep \u003carg\u003e           Number of readers/step, default: 1\n -seconds \u003carg\u003e         Number of seconds to run\n                        if not specified, runs forever\n -size \u003carg\u003e            Size of each message (event or record)\n -sync \u003carg\u003e            Each Writer calls flush/sync after writing \u003carg\u003e\n                        number of of events(records); and/or\n                        \u003carg\u003e number of events(records) per Write or Read\n                        Transaction\n -threads \u003carg\u003e         io threads per Topic, default: 1\n -throughput \u003carg\u003e      If \u003e 0, throughput in MB/s\n                        If 0, writes/reads 'records'\n                        If -1, get the maximum throughput (default: -1)\n -time \u003carg\u003e            Latency Time Unit [ms:MILLISECONDS,\n                        mcs:MICROSECONDS, ns:NANOSECONDS]; default: ms\n -topic \u003carg\u003e           Topic name, default : test\n -wq \u003carg\u003e              Benchmark Write Requests; default: false\n -writeQuorum \u003carg\u003e     WriteQuorum default: 1\n -writers \u003carg\u003e         Number of writers\n -wsec \u003carg\u003e            Number of seconds/step for writers, default: 0\n -wstep \u003carg\u003e           Number of writers/step, default: 1\n\nPlease report issues at https://github.com/kmgowda/SBK\n\n```\n\n### Add your driver to SBK Manually\n1. Create the gradle subproject preferable with the name **driver-\u003cyour driver(storage device) name\u003e**.\n\n    * See the Example:[[Pulsar driver](https://github.com/kmgowda/sbk/tree/master/drivers/pulsar)]   \n\n\n2. Create the package **io.sbk.\u003c your driver name\u003e** \n\n    * See the Example: [[Pulsar driver package](https://github.com/kmgowda/sbk/tree/master/drivers/pulsar/src/main/java/io/sbk/driver/Pulsar)]   \n    \n\n3. In your driver package you have to implement the Interface: [[Storage](https://kmgowda.github.io/SBK/sbk-api/javadoc/io/sbk/api/Storage.html)]\n\n    * See the Example:  [[Pulsar class](https://github.com/kmgowda/sbk/blob/master/drivers/pulsar/src/main/java/io/sbk/driver/Pulsar/Pulsar.java)]\n    \n    * you have to implement the following methods of Benchmark Interface:\n        \n      a). Add the Additional parameters (Command line Parameters) for your driver :[[addArgs](https://kmgowda.github.io/SBK/sbk-api/javadoc/io/sbk/api/Storage.html#addArgs(io.sbk.params.ParameterOptions))]\n      * The default command line parameters are listed in the help output here : [[Building SBK](https://github.com/kmgowda/sbk#building)]\n        \n      b). Parse your driver specific parameters: [[parseArgs](https://kmgowda.github.io/SBK/sbk-api/javadoc/io/sbk/api/Storage.html#parseArgs(io.sbk.params.ParameterOptions))]\n        \n      c). Open the storage: [[openStorage](https://kmgowda.github.io/SBK/sbk-api/javadoc/io/sbk/api/Storage.html#openStorage(io.sbk.params.ParameterOptions))]\n        \n      d). Close the storage:[[closeStorage](https://kmgowda.github.io/SBK/sbk-api/javadoc/io/sbk/api/Storage.html#closeStorage(io.sbk.params.ParameterOptions))]\n        \n      e). Create a single writer instance:[[createWriter](https://kmgowda.github.io/SBK/sbk-api/javadoc/io/sbk/api/Storage.html#createWriter(int,io.sbk.params.ParameterOptions))]\n        * Create Writer will be called multiple times by SBK in case of Multi writers are specified in the command line.   \n        \n      f). Create a single Reader instance:[[createReader](https://kmgowda.github.io/SBK/sbk-api/javadoc/io/sbk/api/Storage.html#createReader(int,io.sbk.params.ParameterOptions))]\n        * Create Reader will be called multiple times by SBK in case of Multi readers are specified in the command line. \n        \n      g). Get the Data Type :[[getDataType](https://kmgowda.github.io/SBK/sbk-api/javadoc/io/sbk/api/Storage.html#getDataType())]\n        * In case your data type is byte[] (Byte Array), No need to override this method. see the example:   [[Pulsar class](https://github.com/kmgowda/sbk/blob/master/drivers/pulsar/src/main/java/io/sbk/driver/Pulsar/Pulsar.java)]\n        * If your Benchmark,  Reader and Writer classes operates on different data type such as String or custom data type, then you have to override this default implementation.\n\n    \n4. Implement the Writer Interface: [[Writer](https://kmgowda.github.io/SBK/sbk-api/javadoc/io/sbk/api/Writer.html)]\n\n    * See the Example: [[Pulsar Writer](https://github.com/kmgowda/sbk/blob/master/drivers/pulsar/src/main/java/io/sbk/driver/Pulsar/PulsarWriter.java)]\n    \n    * you have to implement the following methods of Writer class:\n        \n      a). Writer Data [Async or Sync]: [[writeAsync](https://kmgowda.github.io/SBK/sbk-api/javadoc/io/sbk/api/Writer.html#writeAsync(T))]\n        \n      b). Flush the data: [[sync](https://kmgowda.github.io/SBK/sbk-api/javadoc/io/sbk/api/Writer.html#sync())]\n        \n      c). Close the Writer: [[close](https://kmgowda.github.io/SBK/sbk-api/javadoc/io/sbk/api/Writer.html#close())]\n        \n      d). In case , if you want to have your own recordWrite implementation to write data and record the start and end time, then you can override: [[recordWrite](https://kmgowda.github.io/SBK/sbk-api/javadoc/io/sbk/api/Writer.html#recordWrite(io.sbk.data.DataType,T,int,io.time.Time,io.sbk.api.Status,io.perl.SendChannel,int))]\n\n\n5. Implement the Reader Interface: [[Reader](https://kmgowda.github.io/SBK/sbk-api/javadoc/io/sbk/api/Reader.html)]\n\n    * you have to implement the following methods of Reader class:\n        \n      i). Read Data \n      1. for synchronous reads: [[read](hhttps://kmgowda.github.io/SBK/sbk-api/javadoc/io/sbk/api/Reader.html#read())]\n         * Example: [[Pulsar Reader](https://github.com/kmgowda/sbk/blob/master/drivers/pulsar/src/main/java/io/sbk/driver/Pulsar/PulsarReader.java)]\n      2. for Asynchronous reads: [[AsyncRead](https://kmgowda.github.io/SBK/sbk-api/javadoc/io/sbk/api/AsyncReader.html)]\n         * Example: [[File Async Reader](https://github.com/kmgowda/SBK/blob/master/drivers/file/src/main/java/io/sbk/File/FileAsyncReader.java)]\n      3. for call-back reads extend the abstract class: [[Abstract callback Reader](https://kmgowda.github.io/SBK/sbk-api/javadoc/io/sbk/api/AbstractCallbackReader.html)]\n         * Example: [[RabbitMQ Reader](https://github.com/kmgowda/SBK/blob/master/drivers/rabbitmq/src/main/java/io/sbk/RabbitMQ/RabbitMQCallbackReader.java)]\n         \n      ii). Close the Reader: [[close](https://kmgowda.github.io/SBK/sbk-api/javadoc/io/sbk/api/Reader.html#close()) ] \n\n\n6.  Add the Gradle dependency [ compile project(\":sbk-api\")] to your sub-project (driver)\n\n    * see the Example:[[Pulsar Gradle Build](https://github.com/kmgowda/sbk/blob/master/drivers/pulsar/build.gradle)]\n\n\n7. Add your subproject to the main gradle as dependency.\n\n    * see the Example: [[SBK Gradle](build-drivers.gradle)]\n    \n    * make sure that gradle settings file: [[SBK Gradle Settings](settings-drivers.gradle)] has your Storage driver subproject name\n\n\n8. That's all ; Now, Build the SBK included your driver with the command:\n\n```\n./gradlew build\n```\n\nuntar the SBK  to local folder\n\n```\ntar -xvf ./build/distributions/sbk.tar -C ./build/distributions/.\n```\n\n9.  To invoke the benchmarking of the driver you have to issue the parameters \"-class \u003c your driver name\u003e\"\n\n\n## Use SBK git hub packages\nInstead of using entire SBK framework, if you just want to use the [SBK framework API](https://github.com/kmgowda?tab=packages\u0026repo_name=SBK) packages to measure the performance benchmarking of your storage device/software, then follow the below simple and easy steps.\n\n1. Add the SBK git hub package repository and dependency in gradle build file of your project as follows\n    \n   ```\n    repositories {\n        mavenCentral()\n\n        maven {\n            name = \"GitHubPackages\"\n            url = uri(\"https://maven.pkg.github.com/kmgowda/SBK\")\n\n   /*\n            credentials {\n                username = project.findProperty(\"github.user\") ?: System.getenv(\"GITHUB_USERNAME\")\n                password = project.findProperty(\"github.token\") ?: System.getenv(\"GITHUB_TOKEN\")\n            }\n   */   \n            credentials {\n                username = \"sbk-public\"\n                password = \"\\u0067hp_FBqmGRV6KLTcFjwnDTvozvlhs3VNja4F67B5\"\n            }   \n   \n       }\n    }\n\n    dependencies {\n        implementation \"io.github.kmgowda.sbk:sbk-api:1.0\"\n    }\n\n   ```\n   few points to remember here\n   \n    *  you need to authenticate with your git hub username (GITHUB_USERNAME) and git hub token (GITHUB_TOKEN) \n    *  mavenCentral() repository is required to fetch the SBK's dependencies too.\n    *  check this example: [File system benchmarking git hub build](https://github.com/kmgowda/sbk-examples/blob/main/sbk-file/gitpackage-build.gradle)\n  \n2. Extend the storage interface [Storage](https://kmgowda.github.io/SBK/javadoc/io/sbk/api/Storage.html) by following steps 1 to 5 described in [Add your storage driver](https://github.com/kmgowda/SBK#add-your-driver-to-sbk)\n\n    *  check this example: [File system benchmarking](https://github.com/kmgowda/sbk-examples/blob/main/sbk-file/src/main/java/io.file/File.java)\n\n3. Create a Main method to supply your storage class object to SBK to run/conduct the performance benchmarking\n\n   ```\n    public static void main(final String[] args) {\n        Storage device = new \u003cyour storage class, extending the Storage interface\u003e;\n        try {\n        \n            //Start the File system benchmarking here\n            \n            Sbk.run(args  /* Command line Arguments, use '-class ' option specify the you storage class name  */ , \n                  packageNmae /* the name of the package where your storage device object exists */ , \n                  null /* Name of the your performance benchmarking application, by default , storage class name will be used */ ,\n                  null /* Logger, if you don't have your own logger, then prometheus logger will be used by default */ );\n            \n            \n        } catch (ParseException | IllegalArgumentException | IOException |\n                InterruptedException | ExecutionException | TimeoutException ex) {\n            ex.printStackTrace();\n            System.exit(1);\n        }\n        System.exit(0);\n    }\n\n   ```\n   *  check this example: [Start File system benchmarking](https://github.com/kmgowda/sbk-examples/blob/main/sbk-file/src/main/java/io.file/Main.java#L25)\n   \n4. That's all! Run your main method (your java application ) with \"-help\" to see the benchmarking options.    \n\n\n\n## Use SBK from JitPack\nThe SBK API package is available in [JitPack Repository](https://jitpack.io/#kmgowda/SBK) too. To use the SBK-API package from Jitpack, follow the below simple and easy steps\n\n1. Add the SBK git hub package repository and dependency in gradle build file of your project as follows\n\n   ```\n    repositories {\n        mavenCentral()\n        maven {\n            url 'https://jitpack.io'\n        }\n    }\n\n    dependencies {\n        implementation \"com.github.kmgowda.SBK:sbk-api:1.0\"\n    }\n   \n   ```\n   few points to remember here     \n    *  mavenCentral() repository is required to fetch the SBK's dependencies too.\n    *  check this example: [File system benchmarking jit pack build](https://github.com/kmgowda/sbk-examples/blob/main/sbk-file/jitpack-build.gradle)\n\n2. Extend the storage interface [Storage](https://kmgowda.github.io/SBK/javadoc/io/sbk/api/Storage.html) by following steps 1 to 5 described in [Add your storage driver](https://github.com/kmgowda/SBK#add-your-driver-to-sbk)\n    *  check this example: [File system benchmarking](https://github.com/kmgowda/sbk-examples/blob/main/sbk-file/src/main/java/io.file/File.java)\n\n3. Create a Main method to supply your storage class object to SBK to run/conduct the performance benchmarking\n\n   ```\n    public static void main(final String[] args) {\n        Storage device = new \u003cyour storage class, extending the Storage interface\u003e;\n        try {\n        \n            //Start the File system benchmarking here\n            \n            Sbk.run(args  /* Command line Arguments, use '-class ' option specify the you storage class name  */ , \n                  packageNmae /* the name of the package where your storage device object exists */ , \n                  null /* Name of the your performance benchmarking application, by default , storage class name will be used */ ,\n                  null /* Logger, if you don't have your own logger, then prometheus logger will be used by default */ );\n            \n            \n        } catch (ParseException | IllegalArgumentException | IOException |\n                InterruptedException | ExecutionException | TimeoutException ex) {\n            ex.printStackTrace();\n            System.exit(1);\n        }\n        System.exit(0);\n    }\n\n   ```\n   * check this example: [Start File system benchmarking](https://github.com/kmgowda/sbk-examples/blob/main/sbk-file/src/main/java/io.file/Main.java#L25)\n   \n4. That's all! Run your main method (your java application ) with \"-help\" to see the benchmarking options.   \n\n\n## Use SBK from Maven Central\nThe SBK APIs Package is available at [maven central](https://search.maven.org/classic/#artifactdetails%7Cio.github.kmgowda%7Csbk-api%7C0.84%7Cjar) too. to use the sbk-api package, follow below steps\n\n1. Add the SBK git hub package repository and dependency in gradle build file of your project as follows\n\n   ```\n    repositories {\n        mavenCentral()\n    }\n\n    dependencies {\n        implementation \"io.github.kmgowda.sbk:sbk-api:1.0\"\n    }\n   ```\n   few points to remember here  \n    *  mavenCentral() repository is required to fetch the SBK APIs package and its dependencies.\n    *  check this example: [File system benchmarking maven build](https://github.com/kmgowda/sbk-examples/blob/main/sbk-file/mavencentral-build.gradle)\n\n2. Extend the storage interface [Storage](https://kmgowda.github.io/SBK/javadoc/io/sbk/api/Storage.html) by following steps 1 to 5 described in [Add your storage driver](https://github.com/kmgowda/SBK#add-your-driver-to-sbk)\n    *  check this example: [File system benchmarking](https://github.com/kmgowda/sbk-examples/blob/main/sbk-file/src/main/java/io.file/File.java)\n\n3. Create a Main method to supply your storage class object to SBK to run/conduct the performance benchmarking\n\n   ```\n     public static void main(final String[] args) {\n        Storage device = new \u003cyour storage class, extending the Storage interface\u003e;\n        try {\n        \n            //Start the File system benchmarking here\n            \n            Sbk.run(args  /* Command line Arguments, use '-class ' option specify the you storage class name  */ , \n                  packageNmae /* the name of the package where your storage device object exists */ , \n                  null /* Name of the your performance benchmarking application, by default , storage class name will be used */ ,\n                  null /* Logger, if you don't have your own logger, then prometheus logger will be used by default */ );\n            \n            \n        } catch (ParseException | IllegalArgumentException | IOException |\n                InterruptedException | ExecutionException | TimeoutException ex) {\n            ex.printStackTrace();\n            System.exit(1);\n        }\n        System.exit(0);\n    }\n      \n   ```   \n   *  check this example: [Start File system benchmarking](https://github.com/kmgowda/sbk-examples/blob/main/sbk-file/src/main/java/io.file/Main.java#L25)\n   \n4. That's all! Run your main method (your java application ) with \"-help\" to see the benchmarking options.    \n\n\n## SBK Charts\nyou can log the performance results to CSV file using option '--csvfile'.\nif you have SBK results in one or multiple CSV files,\nthen you can use python application 'sbk-charts' to compare the SBK benchmarking results plot the graphs into an Excel sheet.\nrefer [SBK Charts](sbk-charts.md) for further details.\n\n\n## SBK Publications\n1. The SBK is inspired from the Pravega benchmark tool, refer [Pravega benchmark tool](docs/kafka-pravega.pdf)\n2. The SBK uses the multiple concurrent queues for fast performance benchmarking, refer [Design of SBK](docs/sbk.pdf)\n3. The SBK implements SLC(Sliding Latency Coverage) factors to summarize the latency percentiles, refer [SLC](docs/sbk-slc.pdf)\n4. The SBK uses the SBP: Storage Benchmark Protocol and SBM: Storage Benchmark Monitor for distributed performance benchmarking, refer [SBP](docs/sbp.pdf)\n\n\n## SBK and PerL\nThe core of the SBK is PerL (Performance Logger), see the details [here](./perl)                            \n                            \n## SBK Discussions\n___\n\n\u003cp align=\"center\"\u003e\n   Join SBK Slack Channel\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://sbkcrew.slack.com/?from=SBK\"\u003e\n        \u003cimg src=\"images/slack-logo.png\" alt=\"SBK-Slack\" width=\"50\" height=\"50\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n___\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkmgowda%2Fsbk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkmgowda%2Fsbk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkmgowda%2Fsbk/lists"}