※localhost指定だと遅くなるのでハマっていた・・。

#同一サーバ localhost pgpool経由 select

1000req

0.0401ms/req

 

#同一サーバ自IPアドレス指定 pgpool経由 select

1000req

0.0002ms/req

 

#同一サーバ localhost psql直 select

1000req

0.00012ms/req

 

#同一サーバ自IPアドレス指定 psql直 select

10000req

0.00012ms/req

 

#インターネット経由 pgpool経由 select

1000req

0.00276ms/req

 

#インターネット経由 psql直 select

1000req

0.00237ms/req

※事前にテーブル作成

 

pgbench -i

※DB名省略

 

$ pgbench -p 9999 -S
Password:
starting vacuum…end.
transaction type: SELECT only
scaling factor: 1
query mode: simple
number of clients: 1
number of transactions per client: 10
number of transactions actually processed: 10/10

 

$ pgbench -p 5432 -S
Password:
starting vacuum…end.
transaction type: SELECT only
scaling factor: 1
query mode: simple
number of clients: 1
number of transactions per client: 10
number of transactions actually processed: 10/10
tps = 1378.549766 (including connections establishing)
tps = 3500.175009 (excluding connections establishing)