pgcon2012 ori-20120224

10
© 2012 IBM Corporation PostgreSQL Conference 2012 PostgreSQL Conference 2012 ラララララララララ ppc64 ラ PostgreSQL ラ ラララララララララララララララ ラララララ 織 織 2012-02-24

Upload: manabu-ori

Post on 17-Jul-2015

930 views

Category:

Documents


0 download

TRANSCRIPT

© 2012 IBM Corporation

PostgreSQL Conference 2012

PostgreSQL Conference 2012 ライトニングトーク

ppc64 で PostgreSQL のスケーラビリティが上がりました、というお話

織 学

2012-02-24

© 2012 IBM Corporation

PostgreSQL Conference 2012

自己紹介

名前: 織 学 ( おり まなぶ )

Twitter: @orimanabu

所属: 日本 IBM

仕事: Linux とか OSS とかをいじっているエンジニア– 本業はサーバー屋さん

© 2012 IBM Corporation

PostgreSQL Conference 2012

今日お話する内容

ppc64 上の PostgreSQL でスケーラビリティを上げる修正を作りました–before: 16 コアまでスケール–after: 32 コア + までスケール

本家にコミット済み–9.2 に入ります!–特別な configure オプションはいりません

© 2012 IBM Corporation

PostgreSQL Conference 2012

ハードウェア– Power 750

• 32 コア (SMT4 によりカーネルからは 128CPU に見えます )

• メモリ 256GB

ソフトウェア– RHEL6.1 (kernel 2.6.32-131.0.15.el6.ppc64)

– gcc version 4.4.5 20110214 (Red Hat 4.4.5-6)

– PostgreSQL• shared_buffer = 8GB

• max_connections = 128

– pgbench• scale factor 100

• -S -T 500

テスト環境

© 2012 IBM Corporation

PostgreSQL Conference 2012

結果

接続数 16

接続数 32

接続数 64

LWARX Hint, LWSYNC

unlocked test in TAS_SPIN

© 2012 IBM Corporation

PostgreSQL Conference 2012

変更点

2 つの変更– TAS_SPIN の前にロック状態を確認する– 最近拡張された命令に書き換える

変更したファイルは実質 src/include/storage/s_lock.h のみ しかも #if defined(__powerpc__) の中のみ

実際はその他に configure のために下記も変更していますconfigure.insrc/include/pg_config.h.insrc/include/pg_config_manual.h

© 2012 IBM Corporation

PostgreSQL Conference 2012

変更点

2 つの変更– TAS_SPIN の前にロック状態を確認する– 最近拡張された命令に書き換える

© 2012 IBM Corporation

PostgreSQL Conference 2012

ppc64/PowerPC とは Apple 、 IBM 、 Motorola が開発した RISC プロセッサー

– サーバー向けは POWER と呼んでいます 有名なところでは、一時期 Mac に搭載されていました

– Power Mac G3, G4, G5

Blue Gene

Pathfinder Spirit Phoenix

利用形態– スパコン (Top500 、 Green500)– 組み込み系– ゲーム機にも採用されています

• Pippin@, Wii, Xbox, PS3

– 火星のコンピュータ

Playstation3

Wii

© 2012 IBM Corporation

PostgreSQL Conference 2012

このパッチで幸せになれる人

PowerPC アーキテクチャで

32 コア以上搭載したマシン

を使っている人

そんなマシンあるの?

© 2012 IBM Corporation

PostgreSQL Conference 2012

最大 256 コア搭載! 最大搭載メモリ 8TB ! 電源は三相交流!

でも高いです ...

あります!