Discussion:
[redis-db] Redis maxmemory and noeviction configuration
preetika tyagi
2018-10-19 02:51:15 UTC
Permalink
Hi all,
I'm experimenting with Redis to understand its behavior when maxmemory is
set to <some value in bytes> and maxmemory_policy is set to no_eviction.
I set multiple key-value pairs and run "info" command along with below
redis configuration.

In Redis.conf:
maxmemory: 419430400 (apprx 400MB)
maxmemory_policy: no_eviction

The info command output:
Before data insertion:
used_memory_dataset: 12338 (this is in bytes and it makes sense since it is
very small)
After data insertion:
used_memory_dataset: 1621456212 (this is approx 1.6GB)

What I am not able to understand, why does the redis server not start
throwing errors once it reaches 400MB usage threshold as set in maxmemory
configuration and reject any further data insertion commands?
Could anyone please explain this behavior or I'm missing something here?

Thanks,
Preetika
--
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+***@googlegroups.com.
To post to this group, send email to redis-***@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
Itamar Haber
2018-10-19 12:46:39 UTC
Permalink
Hello Preetika,

Would it be possible for you to include the full output of your `INFO`
command?
Post by preetika tyagi
Hi all,
I'm experimenting with Redis to understand its behavior when maxmemory is
set to <some value in bytes> and maxmemory_policy is set to no_eviction.
I set multiple key-value pairs and run "info" command along with below
redis configuration.
maxmemory: 419430400 (apprx 400MB)
maxmemory_policy: no_eviction
used_memory_dataset: 12338 (this is in bytes and it makes sense since it
is very small)
used_memory_dataset: 1621456212 (this is approx 1.6GB)
What I am not able to understand, why does the redis server not start
throwing errors once it reaches 400MB usage threshold as set in maxmemory
configuration and reject any further data insertion commands?
Could anyone please explain this behavior or I'm missing something here?
Thanks,
Preetika
--
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
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
--
*Itamar Haber*
Technicalist Evangely

Phone: +972.54.567.9692

[image: Redis Labs] <https://redislabs.com/>
--
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+***@googlegroups.com.
To post to this group, send email to redis-***@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
preetika tyagi
2018-10-20 03:58:59 UTC
Permalink
Hi Itamar,
I think I figured out what was going on. I was assuming that redis.conf is
picked by redis-server by default at the start up. However, it seems to be
initializing everything in the code unless you explicitly specify the
configuration file in the redis-server command. Once I did that, it seemed
to pick the correct configuration. I was able to get to the bottom of this
using INFO command only :)
Thanks,
Preetika
Post by Itamar Haber
Hello Preetika,
Would it be possible for you to include the full output of your `INFO`
command?
Post by preetika tyagi
Hi all,
I'm experimenting with Redis to understand its behavior when maxmemory is
set to <some value in bytes> and maxmemory_policy is set to no_eviction.
I set multiple key-value pairs and run "info" command along with below
redis configuration.
maxmemory: 419430400 (apprx 400MB)
maxmemory_policy: no_eviction
used_memory_dataset: 12338 (this is in bytes and it makes sense since it
is very small)
used_memory_dataset: 1621456212 (this is approx 1.6GB)
What I am not able to understand, why does the redis server not start
throwing errors once it reaches 400MB usage threshold as set in maxmemory
configuration and reject any further data insertion commands?
Could anyone please explain this behavior or I'm missing something here?
Thanks,
Preetika
--
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
<javascript:>.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
--
*Itamar Haber*
Technicalist Evangely
Phone: +972.54.567.9692
[image: Redis Labs] <https://redislabs.com/>
--
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+***@googlegroups.com.
To post to this group, send email to redis-***@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
Itamar Haber
2018-10-20 12:59:32 UTC
Permalink
Good! I also suspected your server wasn't using the same conf as you
thought it was, and a current `INFO` would have shown that.
Post by preetika tyagi
Hi Itamar,
I think I figured out what was going on. I was assuming that redis.conf is
picked by redis-server by default at the start up. However, it seems to be
initializing everything in the code unless you explicitly specify the
configuration file in the redis-server command. Once I did that, it seemed
to pick the correct configuration. I was able to get to the bottom of this
using INFO command only :)
Thanks,
Preetika
Post by Itamar Haber
Hello Preetika,
Would it be possible for you to include the full output of your `INFO`
command?
Post by preetika tyagi
Hi all,
I'm experimenting with Redis to understand its behavior when maxmemory
is set to <some value in bytes> and maxmemory_policy is set to no_eviction.
I set multiple key-value pairs and run "info" command along with below
redis configuration.
maxmemory: 419430400 (apprx 400MB)
maxmemory_policy: no_eviction
used_memory_dataset: 12338 (this is in bytes and it makes sense since it
is very small)
used_memory_dataset: 1621456212 (this is approx 1.6GB)
What I am not able to understand, why does the redis server not start
throwing errors once it reaches 400MB usage threshold as set in maxmemory
configuration and reject any further data insertion commands?
Could anyone please explain this behavior or I'm missing something here?
Thanks,
Preetika
--
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
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
--
*Itamar Haber*
Technicalist Evangely
Phone: +972.54.567.9692
[image: Redis Labs] <https://redislabs.com/>
--
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
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
--
*Itamar Haber*
Technicalist Evangely

Phone: +972.54.567.9692

[image: Redis Labs] <https://redislabs.com/>
--
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+***@googlegroups.com.
To post to this group, send email to redis-***@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
Loading...