1. Infinite Cashe Server の起動
Infinite Cashe Server をインストールしたサーバで実行
1.1 Infinite Cashe Server の起動
# /opt/PostgresPlus/9.0AS/bin/edb-icache -u postgres -d -m 3072 -u Infinite Cashe Server の実行ユーザ -d デーモン ( バックグラウンド ) として実行 -m Infinite Cashe として提供する メモリサイズ (MB)
1.2 Infinite Cashe Server の動作確認
# /opt/PostgresPlus/9.0AS/bin/edb-icache-tool localhost stats #localhost:11211 Field Value accepting_conns 1 auth_cmds 0 auth_errors 0 bytes 0 bytes_read 7 bytes_written 0 cas_badval 0 cas_hits 0 cas_misses 0 cmd_flush 0 cmd_get 0 cmd_set 0 conn_yields 0 connection_structures 6 curr_connections 5 curr_items 0 decr_hits 0 decr_misses 0 delete_hits 0 delete_misses 0 evictions 0 get_hits 0 get_misses 0 incr_hits 0 incr_misses 0 limit_maxbytes 3221225472 listen_disabled_num 0 pid 16366 pointer_size 64 reclaimed 0 rusage_system 0.000000 rusage_user 0.000999 threads 4 time 1328690053 total_connections 6 total_items 0 uptime 148 version 1.4.5
2. Postgres Plus Advanced Server のセットアップ
2-1. postgresql.conf の設定
# vi /opt/PostgresPlus/9.0AS/data/postgresql.conf # - InfiniteCache edb_enable_icache = on edb_icache_servers = 'Infinite Cashe Serverを動かしているサーバのIPアドレス' #'host1:port1,host2,ip3:port3,ip4' edb_icache_compression_level = 6
2-2. Postgres Plus Advanced Server の再起動
# /etc/init.d/ppas-9.0 restart
2-3. Infinite Cashe Server との接続の確認
$ psql psql (9.0.4.14) "help" でヘルプを表示します. postgres=# \x 拡張表示は on です。 postgres=# SELECT * FROM edb_icache_server_list; -[ RECORD 1 ]--+-------------- hostname | 'Infinite Cashe Serverを動かしているサーバのIPアドレス' port | 11211 state | ACTIVE write_failures | 0 total_memory | 3221225472 memory_used | 0 memory_free | 3221225472 hit_ratio | 0.00 postgres=# SELECT * FROM edb_icache_stats(); -[ RECORD 1 ]---------+-------------- hostname | 'Infinite Cashe Serverを動かしているサーバのIPアドレス' port | 11211 state | ACTIVE write_failures | 0 bytes | 1317 bytes_read | 9263 bytes_written | 4534 cmd_get | 111 cmd_set | 2 connection_structures | 8 curr_connections | 7 curr_items | 1 evictions | 0 get_hits | 0 get_misses | 111 limit_maxbytes | 3221225472 pid | 16366 pointer_size | 64 rusage_user | 0.3999 rusage_system | 0.4999 threads | 4 total_time | 1328691010 total_connections | 17 total_items | 2 uptime | 1105 version | 1.4.5