自宅環境構築

やっと自宅(というか常時持ち歩き用)のLet's note SSDマシン上にCentOS6+PostgreSQL9.2環境を構築できた。

全くconfigurationを設定しない状態で、軽くpgbenchで測定。

$ pgbench test -c 10 -T 60
starting vacuum...end.
transaction type: TPC-B (sort of)
scaling factor: 10
query mode: simple
number of clients: 10
number of threads: 1
duration: 60 s
number of transactions actually processed: 57372
tps = 955.983518 (including connections establishing)
tps = 956.416262 (excluding connections establishing)
[harada@localhost ~]$ pgbench test -S -c 10 -T 60
starting vacuum...end.
transaction type: SELECT only
scaling factor: 10
query mode: simple
number of clients: 10
number of threads: 1
duration: 60 s
number of transactions actually processed: 570538
tps = 9507.862487 (including connections establishing)
tps = 9512.270754 (excluding connections establishing)
$ 

うーむ、もう少し性能出るかなと思ったがそれほどでもないか。書き込みありのパターンのほうは、checkpoint_segmentsをちょっと調整するだけでも良さげだが・・・。
参照のみパターンが意外と遅い。キャッシュヒットしてもしなくても、SSDからの読み取りならそんなに変わんないだろうと思って、あえてshared_buffersをデフォルトのままにしていたけど、やっぱりある程度のチューニングは必要なんかな。