Hi,

Today (From my knowledge) its only possible to set the maxmemory to a positive value. It would be great to add a feature that you can also set it to a negative value, and that value will be deducted from the server's available memory.

So for example: maxmemory -500m: On a server with 8g RAM, will be set to 7.5g On a server with 16g RAM, will be set to 15.5g

Comment From: itamarhaber

Always good to hear your voice @shaharmor :)

My 2 cents: I don't dig neither the feature nor the proposed "API". The idea of a negative param value, especially when it comes to memory, sounds too weird and confusing to me. As for the feature itself - determine maxmemory based on total amount of server RAM - it may be useful, but only in rare cases where the underlying "hardware" changes (e.g. elastic clusters in the cloud). That is hardly the common use pattern, and those who do practice it can easily instrument the proper configuration directive (assuming that they already take of so much else).

Comment From: shaharmor

Yeah its mostly useful for when you have a staging environment where servers there are much less powerful than production. But then again, most of the time in staging you don't have that much traffic that should reach the limit anyway