{"id":20632457,"url":"https://github.com/citusdata/citus-benchmark","last_synced_at":"2025-04-15T18:59:10.362Z","repository":{"id":37235854,"uuid":"239494135","full_name":"citusdata/citus-benchmark","owner":"citusdata","description":"Tools for running benchmarks against Citus","archived":false,"fork":false,"pushed_at":"2024-08-20T17:50:01.000Z","size":6326,"stargazers_count":39,"open_issues_count":5,"forks_count":9,"subscribers_count":30,"default_branch":"master","last_synced_at":"2025-03-28T23:51:14.916Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","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/citusdata.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":"2020-02-10T11:19:59.000Z","updated_at":"2025-02-12T09:06:16.000Z","dependencies_parsed_at":"2024-04-09T14:07:20.181Z","dependency_job_id":"be63ffc4-77a7-42fb-b8da-ef85abfa7868","html_url":"https://github.com/citusdata/citus-benchmark","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/citusdata%2Fcitus-benchmark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/citusdata%2Fcitus-benchmark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/citusdata%2Fcitus-benchmark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/citusdata%2Fcitus-benchmark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/citusdata","download_url":"https://codeload.github.com/citusdata/citus-benchmark/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249135814,"owners_count":21218365,"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-11-16T14:16:15.412Z","updated_at":"2025-04-15T18:59:10.344Z","avatar_url":"https://github.com/citusdata.png","language":"Python","readme":"# HammerDB TPROC-C and CH benchmarking tool for Citus and PostgreSQL\n\nThis repository contains two main sections:\n1. Scripts and files to run [HammerDB][hammerdb] and the [CH-benCHmark][ch] on Citus\n   and regular PostgreSQL. These are located in the root directory and the\n   `README` that you're reading now explains how to use them.\n2. Scripts and files to run those same benchmarks on Azure in a completely\n   automated fashion. With these scrips you can start multiple Citus benchmarks\n   on Azure with just a single command. These scripts and the README that\n   explains how to use them can be found in the [`azure`\n   directory](https://github.com/citusdata/citus-benchmark)\n\n# Preparation\n\nTo run the benchmarks, you need to have psql installed.\n\nIf you are using CentOS 8 on the driver node, you can use the following steps:\n\n```bash\nsudo yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm epel-release\nsudo yum update -y nss curl libcurl\nsudo yum install -y screen postgresql13\nsudo yum groupinstall -y \"Development tools\"\ngit clone https://github.com/citusdata/citus-benchmark.git\ncd citus-benchmark\n```\n\nIf you are using Ubuntu / Debian on the driver node:\n\n```bash\nsudo apt -y install vim bash-completion wget\nwget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -\necho \"deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main\" |sudo tee  /etc/apt/sources.list.d/pgdg.list\nsudo apt update -y\nsudo apt install -y postgresql-client-13\ngit clone https://github.com/citusdata/citus-benchmark.git\ncd citus-benchmark\n```\n\n# Running HammerDB TPROC-C with CH-benCHmark support\n\n`build-and-run.sh` is the driver script and can be run using:\n\n```bash\n./build-and-run.sh [--hammerdb-version[=]\u003cversion\u003e] [--ch|--ch-queries-only] [--no-citus] [--name[=]name] [--shard-count[=]\u003cshard_count\u003e]\n```\n\nFor details on the flags run:\n```\n./build-and-run.sh --help\n```\n\nThe script relies on libpq environment variables for connecting to the database.\n\nExample usage that runs only HammerDB TPROC-C without CH-benCHmark queries:\n```bash\nexport PGHOST=203.0.113.4\nexport PGUSER=citus\nexport PGDATABASE=citus\nexport PGPASSWORD=\n./build-and-run.sh\n```\n\n## Running CH-bencCHmark queries\n\nWhen running `build-and-run.sh` with the default flags, only HammerDB TPROC-C\nwill be ran. If you want to run the CH-benCHmark analytical queries you can\nspecify the `--ch` flag to run the benchmark with both TPROC-C and CH-benCHmark\nqueries at the same time. Or if you only want to run the CH analytical queries\nwithout TPROC-C you can specify the `--ch-queries-only` flag.\n\n## Changing HammerDB configurations\n\n`build.tcl` is used to build hammerdb tables and `run.tcl` is used to run the test.\nYou can change hammerdb configurations from those files.\n\n*pg_count_ware/pg_num_vu* should be at least 4. https://www.hammerdb.com/blog/uncategorized/how-many-warehouses-for-the-hammerdb-tpc-c-test/\n\n## Running against standard Postgres (without Citus)\n\nYou can also use this repo to run these benchmarks against standard Postgres if\nyou want. If you pass the `--no-citus` flag to `build-and-run.sh` it will not\ndistribute any of the tables.\n\n# Checklist for running the benchmark\n- [ ] Make sure that worker node count is a divisor of the value of\n  `--shard-count`, otherwise some nodes will have more shards and the load will\n  not be distributed evenly.\n- [ ] Make sure that `max_connections` is high enough based on `vuset vu` in\n  `run.tcl`. `max_connections` should be at least 150 more than the value given\n  to `vuset vu`.\n\n# Implementation details\n`ch_benchmark.py` is a utility script to send the extra 22 queries(analytical\nqueries). By default one thread is used for sending the analytical queries. The\nstart index for each thread is randomly chosen with a fixed seed so that it will\nbe same across different platforms.\n\n[hammerdb]: https://github.com/TPC-Council/HammerDB\n[ch]: https://db.in.tum.de/research/projects/CHbenCHmark/\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcitusdata%2Fcitus-benchmark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcitusdata%2Fcitus-benchmark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcitusdata%2Fcitus-benchmark/lists"}