Skip to content

Max memory setting ignores container overhead #48

@showermat

Description

@showermat

When I set a memory limit for Redis pods using the provided redis-cluster chart, it appears to take the exact number I provide for the memory limit and place that in redis.conf on the maxmemory line. This neglects the overhead of Redis itself, the redisnode executable, and any other miscellanea that Kubernetes includes in its overhead accounting. In my setup, this adds up to about 40 MB that the container will use beyond Redis's memory limit. Thus, when Redis approaches capacity, the container's memory usage exceeds its configured resource limit, and Kubernetes kills the pod. I've been working around this by manually updating Redis's maxmemory to 100 MB less than the resource limit, which solves the problem. It would be nice if this could be automated so that resource limits work as expected.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions