Commit e52c65b9 authored by antirez's avatar antirez
Browse files

shareobjectspoolsize implemented in reds.conf, in order to control the pool...

shareobjectspoolsize implemented in reds.conf, in order to control the pool size when object sharing is on
parent 67d3e950
...@@ -29,6 +29,7 @@ AFTER 1.0 stable release ...@@ -29,6 +29,7 @@ AFTER 1.0 stable release
side the type also takes an hash table with key->score mapping, so that when side the type also takes an hash table with key->score mapping, so that when
there is an update we lookup the current score and can traverse the tree. there is an update we lookup the current score and can traverse the tree.
* BITMAP type * BITMAP type
* LRANGE 4 0 should return the same elements as LRANGE 0 4 but in reverse order
FUTURE HINTS FUTURE HINTS
......
...@@ -1046,6 +1046,11 @@ static void loadServerConfig(char *filename) { ...@@ -1046,6 +1046,11 @@ static void loadServerConfig(char *filename) {
if ((server.shareobjects = yesnotoi(argv[1])) == -1) { if ((server.shareobjects = yesnotoi(argv[1])) == -1) {
err = "argument must be 'yes' or 'no'"; goto loaderr; err = "argument must be 'yes' or 'no'"; goto loaderr;
} }
} else if (!strcasecmp(argv[0],"shareobjectspoolsize") && argc == 2) {
server.sharingpoolsize = atoi(argv[1]);
if (server.sharingpoolsize < 1) {
err = "invalid object sharing pool size"; goto loaderr;
}
} else if (!strcasecmp(argv[0],"daemonize") && argc == 2) { } else if (!strcasecmp(argv[0],"daemonize") && argc == 2) {
if ((server.daemonize = yesnotoi(argv[1])) == -1) { if ((server.daemonize = yesnotoi(argv[1])) == -1) {
err = "argument must be 'yes' or 'no'"; goto loaderr; err = "argument must be 'yes' or 'no'"; goto loaderr;
......
...@@ -118,4 +118,15 @@ glueoutputbuf yes ...@@ -118,4 +118,15 @@ glueoutputbuf yes
# string in your dataset, but performs lookups against the shared objects # string in your dataset, but performs lookups against the shared objects
# pool so it uses more CPU and can be a bit slower. Usually it's a good # pool so it uses more CPU and can be a bit slower. Usually it's a good
# idea. # idea.
#
# When object sharing is enabled (shareobjects yes) you can use
# shareobjectspoolsize to control the size of the pool used in order to try
# object sharing. A bigger pool size will lead to better sharing capabilities.
# In general you want this value to be at least the double of the number of
# very common strings you have in your dataset.
#
# WARNING: object sharing is experimental, don't enable this feature
# in production before of Redis 1.0-stable. Still please try this feature in
# your development environment so that we can test it better.
shareobjects no shareobjects no
shareobjectspoolsize 1024
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment