I have redis setup like this. A 12gb VM running ubuntu 12.04, 100gb disk space, 24gb file swap. With only redis 2.8.8 running in the vm.
I used redis.conf as below. The rest are per default values.
save 2 500000
rdbchecksum no
appendonly yes
appendfsync no
As I continuously write data to redis, the memory used by copy-on-write keeps increasing. Even though I write my program to sleep long enough so that redis will be able to finish all the background save (last memory message is 0 MB of memory used by copy-on-write), the next background save will go back to the high number.
Example,
1300MB of memory used by cow
1400MB of memory used by cow
0MB of memory used by cow
1500MB of memory used by cow
I am writing around 500000 data per 3.5 sec, using Jedis pipeline. After 10*500000 successful writes, the program sleeps for 30 sec before continuing. I thought it will help redis to finish doing all saves in this way.
But at around 200*500000 writes, a background save took 4hrs to finish. Subsequently save never finish even after more than 6 hrs. What exactly do all these means? Why does the memory for cow keep increasing? Also, with each background save that is of high memory used, redis seems non-functional. Jedis always hit the socket timeout exception.
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+u...@googlegroups.com.
To post to this group, send email to redi...@googlegroups.com.
Visit this group at http://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
So actually if I do not need persistency, I can disable save or bgsave, and just continue writing in data? With save disabled, Even though I have 10gb of data and redis has 6gb, I can still write all to redis and at the end of it, I can still search for the very first data that is written? Because there is no expiration and redis will not evict but swap the out the very first data, and swap it back in when I do the search?
Hi, thanks for the detailed explanation. Indeed I have misunderstood. Because the data did not have any expiration, and because eventually the memory will be exhausted, I thought I have to do the save or bgsave.
So actually if I do not need persistency, I can disable save or bgsave, and just continue writing in data? With save disabled, Even though I have 10gb of data and redis has 6gb, I can still write all to redis and at the end of it, I can still search for the very first data that is written? Because there is no expiration and redis will not evict but swap the out the very first data, and swap it back in when I do the search?
Hi, I understand redis is a memory store. But I am unsure what happens when I am writing more data than the available memory. Can enlighten me on that?
If redis has 6gb and my data is 10gb,
1) if the keys have expiration set but have not expired, and when redis mem is max out, what will redis do?
2) if the keys do not have expiration and redis mem is max out, what will redis do?
On the above scenarios, my concern is as data is being written after redis mem has max out, are the initial few keys still retrievable if they have not expired or do not have expiration defined?
Thanks!
> You received this message because you are subscribed to a topic in the Google Groups "Redis DB" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/redis-db/UddrdYxeFOk/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to redis-db+u...@googlegroups.com.
Hi, I understand redis is a memory store. But I am unsure what happens when I am writing more data than the available memory. Can enlighten me on that?
If redis has 6gb and my data is 10gb,
1) if the keys have expiration set but have not expired, and when redis mem is max out, what will redis do?
2) if the keys do not have expiration and redis mem is max out, what will redis do?
On the above scenarios, my concern is as data is being written after redis mem has max out, are the initial few keys still retrievable if they have not expired or do not have expiration defined?