{"id":27320435,"url":"https://github.com/mulbc/gosbench","last_synced_at":"2025-04-12T09:56:23.892Z","repository":{"id":38238657,"uuid":"194536686","full_name":"mulbc/gosbench","owner":"mulbc","description":"Distributed S3 benchmarking tool - Replacement of Cosbench","archived":false,"fork":false,"pushed_at":"2024-12-03T10:38:05.000Z","size":749,"stargazers_count":48,"open_issues_count":1,"forks_count":16,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-12T09:56:16.358Z","etag":null,"topics":["benchmark","benchmarking","ceph","cosbench","distributed-storage","ocs","prometheus-exporter","s3"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mulbc.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-06-30T16:18:29.000Z","updated_at":"2025-04-01T21:21:07.000Z","dependencies_parsed_at":"2023-12-19T04:22:34.110Z","dependency_job_id":"188f679f-72f7-439e-a579-f75cef462068","html_url":"https://github.com/mulbc/gosbench","commit_stats":{"total_commits":93,"total_committers":5,"mean_commits":18.6,"dds":0.4193548387096774,"last_synced_commit":"a144d9d2fe9a7329af9b5ecacb6b97c2065995b3"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mulbc%2Fgosbench","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mulbc%2Fgosbench/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mulbc%2Fgosbench/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mulbc%2Fgosbench/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mulbc","download_url":"https://codeload.github.com/mulbc/gosbench/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248550633,"owners_count":21122932,"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":["benchmark","benchmarking","ceph","cosbench","distributed-storage","ocs","prometheus-exporter","s3"],"created_at":"2025-04-12T09:56:22.863Z","updated_at":"2025-04-12T09:56:23.872Z","avatar_url":"https://github.com/mulbc.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gosbench\n\nGosbench is the Golang reimplementation of [Cosbench](https://github.com/intel-cloud/cosbench).\nIt is a distributed S3 performance benchmark tool with [Prometheus exporter](https://opencensus.io/exporters/supported-exporters/go/prometheus/) leveraging the official [Golang AWS SDK](https://aws.amazon.com/sdk-for-go/)\n\n## Usage\n\nGosbench consists of two parts:\n\n* Server: Coordinates Workers and general test queue\n* Workers: Actually connect to S3 and perform reading, writing, deleting and listing of objects\n\nINFO: `-d` activates debug logging, `-t` activates trace logging\n\n### Running a test\n\n1. Build the server: `go install github.com/mulbc/gosbench/server`\n1. Run the server, specifying a config file: `server -c path/to/config.yaml` - you can find an example config [in the example folder](examples/example_config.yaml)\n1. The server will open port 2000 for workers to connect to - make sure this port is not blocked by your firewall!\n1. Build the worker: `go install github.com/mulbc/gosbench/worker`\n1. Run the worker, specifying the server connection details: `worker -s 192.168.1.1:2000`\n1. The worker will immediately connect to the server and will start to get to work.\nThe worker opens port 8888 for the Prometheus exporter. Please make sure this port is allowed in your firewall and that you added the worker to the Prometheus config.\n\n#### Prometheus configuration\n\nMake sure your prometheus configuration looks similar to this:\n\n```yaml\nglobal:\n  scrape_interval:     15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.\n  evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.\nscrape_configs:\n  - job_name: 'prometheus'\n    static_configs:\n    - targets:\n        - localhost:9090\n\n  - job_name: 'gosbench'\n    scrape_interval: 1s\n    static_configs:\n      - targets:\n        - WORKER1.example.com:8888\n        - WORKER2.example.com:8888\n```\n\nTo reload the configuration, you can either send a SIGHUP to your prometheus server or just restart it ;)\nAfterwards ensure that you have your Gosbench workers listed at http://your.prometheus.server.example.com:9090/targets\n\nIt is expected that the workers are in state `DOWN` most of the time... they are only scrapeable during a test run.\n\nIt is Best Practice to run the [Prometheus Node Exporter](https://github.com/prometheus/node_exporter) on all hosts as well, to gather common system metrics during the tests. This will help you in identifying bottlenecks. Please consult the Node Exporter manuals on how to install and configure it on your platform.\n\n### Evaluating a test\n\nDuring a test, Prometheus will scrape the performance data continuously from the workers.\nYou can visualize this data in Grafana. To get an overview of what the provided data looks like, check out [the example scrape](examples/example_prom_exporter.log).\n\nThere is also an [example Grafana dashboard](examples/grafana_dashboard.json) that you can import and use. The Dashboard has some basic overview of the most common stats that people are interested in:\n\n![Gosbench Dashboard in action](examples/Gosbench_Dashboard.jpg)\n\n### Docker\n\nThere are now Docker container images available for easy consumption:\n\n```shell\ndocker pull quay.io/mulbc/goroom-server\ndocker pull quay.io/mulbc/goroom-worker\n```\n\nIn the `k8s` folder you will find example files to deploy Gosbench on Openshift and Kubernetes.\nBe sure to modify the ConfigMaps in `gosbench.yaml` to use your S3 endpoint credentials.\n\n### Reading pre-existing files from buckets\n\nDue to popular demand, reading pre-existing files have been added. You activate this special mode by setting `existing_read_weight` to something higher than 0.\n\nThere are some important things to consider though ;)\n\nJust like with other operations, the `bucket_prefix` value will be evaluated to determine the bucket name to search for pre-existing objects.\n\n**Example:** This is an excerpt of your config:\n\n```yaml\n    objects:\n      size_min: 5\n      size_max: 100\n      part_size: 0\n      # distribution: constant, random, sequential\n      size_distribution: random\n      unit: KB\n      number_min: 10\n      number_max: 100\n      # distribution: constant, random, sequential\n      number_distribution: constant\n    buckets:\n      number_min: 2\n      number_max: 10\n      # distribution: constant, random, sequential\n      number_distribution: constant\n    bucket_prefix: myBucket-\n```\n\nNote: Due to the constant distribution, we will only consider the `_min` values.\n\nThis will cause each workers to search for pre-existing files in the buckets `myBucket-0` and `myBucket-1` and read 10 objects from these buckets. If there are less than 10 objects in any of these buckets, some objects will be read multiple times. The object size given in your config will be ignored when reading pre-existing files.\n\n## Cosbench vs Gosbench benchmark comparision\nWhen a new tool is presented, it’s essential to compare it to existing tools for accuracy. For this reason, we ran a comparision between Cosbench and Gosbench. Both benchmarks were tasked to do a 100% write test and 100% read test on 4KB, 16KB, 256KB, 1MB, 4MB objects for 60 seconds each. The tests were to run on one RGW using S3 protocol in ceph storage clusteri, also run in the test configuration in parallel. Figure below show writing and reading, respectively. From these charts, it’s apparent that the performance metrics for all objects are similar for both tools. \n\n![Latency](examples/Latency.png)\n\n![Bandwidth](examples/Bandwidth.png)\n\n## Contributing\n\n* Be aware that this repo uses pre-commit hooks - install them via `pre-commit install`\n  * [More info](https://pre-commit.com/)\n* We are using Go modules in this repository - read up on it [here](https://blog.golang.org/using-go-modules)\n* Check out the open [TODOs](TODO.md) for hints on what to work on\n\n## Known issues\n\n* Workers will error out when the config's min value is larger than the max value (even for a constant distribution)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmulbc%2Fgosbench","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmulbc%2Fgosbench","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmulbc%2Fgosbench/lists"}