citus benchmarking

112 views
Skip to first unread message

rohit...@gmail.com

unread,
May 5, 2016, 7:50:25 AM5/5/16
to citus-users
Hi,

I am trying to deploy citus 5.0 on my nodes and would like to run pg_bench on it. Can someone please help me out on how to run pg_bench on citus to test performance of nodes and queries?

Thanks and Regards
Rohith 

Marco Slot

unread,
May 6, 2016, 7:47:17 AM5/6/16
to citus-users
On Thursday, May 5, 2016 at 1:50:25 PM UTC+2, rohit...@gmail.com wrote:
I am trying to deploy citus 5.0 on my nodes and would like to run pg_bench on it. Can someone please help me out on how to run pg_bench on citus to test performance of nodes and queries?

I typically define a query I want to run in a file.

For the following distributed table:

CREATE TABLE test (x int, y int);
SELECT master_create_distributed_table('test','x','hash');
SELECT master_create_worker_shards('test',16,2);

You could run an insert benchmark using:

cat > benchmark.sql <<EOF
\setrandom xr 1 10000000
\setrandom yr 1 10000000
INSERT INTO test VALUES (:xr, :yr);
EOF

pgbench -c 32 -j 8 -f benchmark.sql -n -T 5 postgres


You want to make sure you use many clients if you're benchmarking insert statements (-c 32), since they block on network round-trips, but the master can still do more work.


If you're benchmarking update/delete statements, you'll likely run into locking unless your statements are commutative: https://github.com/citusdata/citus/issues/370

Reply all
Reply to author
Forward
0 new messages