redisダイナミック拡張メモリ


需要:redisメモリを1 Gから3 Gに拡張し、サービスを中断しない
転載:
1、クライアントを開く
# redis-cli -p 6391

2、現在の値の表示
redis 127.0.0.1:6391> config get maxmemory
1) "maxmemory"
2) "1073741824"

3、メモリを3 Gに設定
redis 127.0.0.1:6391> config set maxmemory 3221225472

4、修正後の値を表示する
redis 127.0.0.1:6391> config get maxmemory
1) "maxmemory"
2) "3221225472"

5、構成ファイルを修正し、構成の再起動を有効にする
# vim /nh/redis/6391/conf/redis.conf
maxmemory 3221225472