如何限制 redis 的内存

发布时间: 2022-01-07 15:59:09 作者: 大象笔记

https://redis.io/topics/lru-cache

/etc/redis.conf

maxmemory 100mb

Failed to stop redis.service: The name org.freedesktop.PolicyKit1 was not provided by any .service files See system logs and 'systemctl status redis.service' for details.

如何查看单个进程的内存占用

redis 默认没有最大内存限制

By Default maxmemory has no limits on 64-bit redis installation and on 32-bit installation it is 3GB.

You can set/change memory limit used by redis by setting maxmemory variable in redis.conf at ,

“/etc/redis/redis.conf”

For example if you want to set it to 512mb, you need to make an entry in redis.conf , like :

maxmemory 512mb

参考

我是一名山东烟台的开发者,联系作者