Redis config question?

I use redis for caching, but lately I have encountered a problem with the amount of memory used - I had to reboot my server, since all ports were destroyed.

This is not the biggest machine, but how do I configure redis to avoid the same problem again?

free -m
             total       used       free     shared    buffers     cached
Mem:           240        222         17          0          6         38
-/+ buffers/cache:        177         62
Swap:          255         46        209

I changed the following settings:

timeout 60
database 1
save 300 1
save 60 100
maxmemory 104857600

top
top - 14:15:28 up  1:19,  1 user,  load average: 0.00, 0.00, 0.00
Tasks:  49 total,   1 running,  48 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:    245956k total,   228420k used,    17536k free,     6916k buffers
Swap:   262136k total,    47628k used,   214508k free,    39540k cached
+3
source share
3 answers

"maxmemory" : , Redis , (, , , ).

+5

memcached, redis ; , .

/, , / .

+1

Use Redis Virtual Memory in Redis 2.0: http://antirez.com/post/redis-virtual-memory-story.html

+1
source

Source: https://habr.com/ru/post/1757646/


All Articles