I perform insertion of total 500k row of data. Initially, I was using 1 write client. I realize 16 shards case is significant slower than no shard case.
Soon, from https://groups.google.com/forum/#!topic/pg_shard-users/B-o5OOQWsok , I realize I need to have multiple write clients, to take advantage of 16 shards.
Although I had increased number of write clients to 32, I still doesn't find 16 shard performance better than no share.
Here's my experiment result.
Shard | Number of write worker at master | Time (s) |
No shard. 1 master | 1 | 433.58 |
No shard. 1 master | 16 | 49.58 |
No shard. 1 master | 32 | 37.91 |
16 shard distributed among 4 servers. 2 Replica each. | 1 | 12611.72 |
16 shard distributed among 4 servers. 2 Replica each. | 16 | 162.49 |
16 shard distributed among 4 servers. 2 Replica each. | 32 | 151.86 |
I was wondering, is this the expected result? Is it possible to make 16 shard case faster than no shard case?