redis动态扩展内存

需求:将redis内存从1G扩展到3G,不中断服务

1、打开客户端

# redis-cli -p 6391

2、查看当前值

redis 127.0.0.1:6391> config get maxmemory
1) "maxmemory"
2) "1073741824"

3、设置内存为3G

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
posted @ 2017-09-09 00:22  KeithTt  阅读(4076)  评论(0编辑  收藏  举报