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?
CREATE TABLE test (x int, y int);SELECT master_create_distributed_table('test','x','hash'); SELECT master_create_worker_shards('test',16,2); |
cat > benchmark.sql <<EOF \setrandom xr 1 10000000 \setrandom yr 1 10000000 INSERT INTO test VALUES (:xr, :yr); EOF
|
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