toshio_uchiy****@mirro*****
toshio_uchiy****@mirro*****
2017年 9月 8日 (金) 11:43:20 JST
メーリングリストの皆様 お世話になります。内山と申します。 別スレッドで話題になっている pgroonga における コールドスタートとウォームスタートを実験してみました。 shard hit と read の値は、PostgreSQL の psql における explain ( analyze, buffers )で表示された値です。 コマンドは explain ( analyze, buffers ) SELECT id, video, track, content, starttime, theme FROM manual AS P WHERE ( vc > 100000 OR sp = 1 ) and lower( content ) like lower( '%algorithm%' ) and exists ( select video from manual AS C1 where ( vc > 100000 OR sp = 1 ) and lower( content ) like lower( '%search%' ) and P.video = C1.video ) ORDER BY vc DESC; 物理メモリ32GB pgrn* の合計サイズ 45GB 再起動ののち cat pgrn* > dev null を実行 postgresql.conf の shared_buffers 8GB shared hit 705 read 52559 実行時間16秒 postgresql.conf の shared_buffers 26GB shared hit 705 read 52559 実行時間16秒 一度上記の SQL コマンドを実行してから再度 SQL コマンドを実行 postgresql.conf の shared_buffers 8GB shared hit 53242 (read はなし) 実行時間0.3秒 という結果になりました。直観的には、32/45 くらいの割合で バッファーにヒットして良いので、pgrn* > /dev/null を実行した あとは、 50000 * 2/3 くらい、すなわち、30000 くらいは shared hit があるのではと予想していました。 わたくしのデータベースについての認識が間違っている のでしょうか。 アドバイスありましたらご教示ください。よろしくお願いします。 -------------- next part -------------- HTMLの添付ファイルを保管しました... URL: https://lists.osdn.me/mailman/archives/groonga-dev/attachments/20170908/a514de98/attachment-0001.htm