{"id":25667139,"url":"https://github.com/oshanz/pgbouncer-load-test","last_synced_at":"2026-06-20T07:31:18.377Z","repository":{"id":251449404,"uuid":"837442711","full_name":"oshanz/pgbouncer-load-test","owner":"oshanz","description":null,"archived":false,"fork":false,"pushed_at":"2024-08-07T12:29:49.000Z","size":43,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-18T07:03:44.264Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/oshanz.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":"2024-08-03T02:20:12.000Z","updated_at":"2024-08-07T12:29:52.000Z","dependencies_parsed_at":"2024-08-07T15:14:28.025Z","dependency_job_id":null,"html_url":"https://github.com/oshanz/pgbouncer-load-test","commit_stats":null,"previous_names":["oshanz/pgbouncer-load-test"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/oshanz/pgbouncer-load-test","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oshanz%2Fpgbouncer-load-test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oshanz%2Fpgbouncer-load-test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oshanz%2Fpgbouncer-load-test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oshanz%2Fpgbouncer-load-test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oshanz","download_url":"https://codeload.github.com/oshanz/pgbouncer-load-test/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oshanz%2Fpgbouncer-load-test/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34561766,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-20T02:00:06.407Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-24T09:28:14.518Z","updated_at":"2026-06-20T07:31:18.359Z","avatar_url":"https://github.com/oshanz.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n## scenarios\n\n- io bound localhost:8080/cpu_intensive\n- cpu bound localhost:8080/io_intensive\n\n\n100 vus, 10s\n\n| unicorn workers | rails db pool | db connections | with pgbouncer pool size | transaction mode | throughput | 95th percentile |  \n| --- | --- | --- | --- | --- | --- | --- |\n| 4 | 5 | 4*5 | 2 | session | 6 | 30798.33 |\n| 4 | 5 | 4*5 | 10 | session | 13 | 30823.54 |\n| 4 | 5 | 4*5 | 30 | session | 12 | 30832.44 |\n| 4 | 1 | 4*1 | 30 | session | 12 | 30221.89 |\n\n\n\n### setup\n```bash\n\ndocker-compose up\ncd app\nbundle install\nbundle exec unicorn -c config/unicorn.conf.rb\n```\n\n### run k6\n```bash\nbrew install k6\nk6 run script.js\n# docker-compose run k6 run /app/script.js\n```\n\n\n### Known issues\n\n1. objc[69020]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called.\nhttps://github.com/rails/rails/issues/38560\n\n`export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES`\n\n\n### Notes\n\n-  https://eoinkelly.info/2023/01/06/rails-and-pgbouncer-notes#rails-and-pgbouncer\n- https://github.com/brettwooldridge/HikariCP/wiki/About-Pool-Sizing\n\n\n - select count(*) from pg_stat_activity where pid \u003c\u003e pg_backend_pid() and usename = current_user;\n\n SELECT\n  pid,\n  user,\n  pg_stat_activity.query_start,\n  now() - pg_stat_activity.query_start AS query_time,\n  query,\n  state,\n  wait_event_type,\n  wait_event\nFROM pg_stat_activity\n\n- psql -U postgres -h localhost -p 6432 pgbouncer\nshow pools;","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foshanz%2Fpgbouncer-load-test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foshanz%2Fpgbouncer-load-test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foshanz%2Fpgbouncer-load-test/lists"}