选择Redis最大内存大小和BGSAVE内存使用情况 [英] Choosing redis maxmemory size and BGSAVE memory usage

查看:853
本文介绍了选择Redis最大内存大小和BGSAVE内存使用情况的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试找出在以下情况下"maxmemory"的安全设置:

I am trying to find out what a safe setting for 'maxmemory' would be in the following situation:

  • 繁重的应用程序
  • 8GB RAM
  • 假设其他进程占用约1GB
  • 这意味着redis进程的内存使用量不得超过7GB
  • 在每个BGSAVE事件中,内存使用量都会增加一倍,原因是:

在redis docs 中,有关BGSAVE事件的内存使用量增加的说法如下:

In the redis docs the following is said about the memory usage increasing on BGSAVE events:

如果要在写入量很大的应用程序中使用Redis,则在将RDB文件保存在磁盘上或重写AOF日志的同时,Redis最多可能会使用通常使用的内存的2倍.

If you are using Redis in a very write-heavy application, while saving an RDB file on disk or rewriting the AOF log Redis may use up to 2 times the memory normally used.

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆