Skip to content

pgexperts/pgbouncer_bench

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 

pgbouncer_bench

hacked together script to benchmark pgbouncer vs destroying and recreating a connection for every single query

usage: ./pgbouncer_bench.py

edit the variables at the top to specify which host and ports to run against.

Should've added command line arguments, but needed this in a hurry.

If you use this with greater than about 28,000 connections being created and destroyed on linux, you probably need to modify the following sysctl variable or you'll run out of sockets because they'll be in TIME_WAIT.

net.ipv4.tcp_tw_reuse = 1

There's a great writeup about that here: http://vincent.bernat.im/en/blog/2014-tcp-time-wait-state-linux.html

About

Basic script to benchmark pgbouncer vs direct connection

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages