Skip to content

Instantly share code, notes, and snippets.

@blkperl
Last active December 14, 2015 14:38
Show Gist options
  • Save blkperl/5101611 to your computer and use it in GitHub Desktop.
Save blkperl/5101611 to your computer and use it in GitHub Desktop.
Parallel pg_dump Patch Testing

Parallel pg_dump testing

Discussion at http://postgresql.1045698.n5.nabble.com/parallel-pg-dump-td5615118.html

Used patch in parallel branch of https://github.com/adunstan/postgresql-dev.git

Server Specs

hardware:   Dell PowerEdge R510
os          Ubuntu 12.04.1 LTS
cpu:        8 Intel(R) Xeon(R) CPU E5607  @ 2.27GHz
memory:     32 GB
pg_version: psql (PostgreSQL) 9.1.6

Database Specs

postgres=# SELECT pg_size_pretty(pg_database_size('portals'));
     pg_size_pretty 
    ----------------
     1604 GB

 
 Size on disk: 121G   

non parallel

time pg_dump -p 5433 --format=directory --compress=9 --lock-wait-timeout=2000 --create --oids portals -f /volumes/parkinglot/pgbackups/pg_dump_dir_test

real    1090m14.893s
user    943m16.329s
sys     13m33.555s

Jobs 2

 time /tmp/pg_dump_parallel -p 5433 --jobs=2 --format=directory --compress=9 --lock-wait-timeout=2000 --create --oids portals -f /volumes/parkinglot/pgbackups/para_pg_dump_test2 --no-synchronized-snapshots

real    469m5.578s
user    821m52.678s
sys     11m33.503s

Jobs 3

time /tmp/pg_dump_parallel -p 5433 --jobs=3 --format=directory --compress=9 --lock-wait-timeout=2000 --create --oids portals -f /volumes/parkinglot/pgbackups/para_pg_dump_test3 --no-synchronized-snapshots

real    331m0.277s
user    852m26.268s
sys     12m22.502s

Jobs 4

time /tmp/pg_dump_parallel -p 5433 --jobs=4 --format=directory --compress=9 --lock-wait-timeout=2000 --create --oids portals -f /volumes/parkinglot/science/para_pg_dump_test4 --no-synchronized-snapshots

real    215m50.723s
user    729m57.141s
sys     8m17.663s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment