Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
6ad34a4b
Commit
6ad34a4b
authored
Jan 11, 2017
by
antirez
Browse files
Defrag: not enabled by default. Error on CONFIG SET if not available.
parent
86192f30
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/config.c
View file @
6ad34a4b
...
...
@@ -1007,6 +1007,16 @@ void configSetCommand(client *c) {
"activerehashing"
,
server
.
activerehashing
)
{
}
config_set_bool_field
(
"activedefrag"
,
server
.
active_defrag_enabled
)
{
#ifndef HAVE_DEFRAG
if
(
server
.
active_defrag_enabled
)
{
server
.
active_defrag_enabled
=
0
;
addReplyError
(
c
,
"Active defragmentation cannot be enabled: it requires a "
"Redis server compiled with a modified Jemalloc like the "
"one shipped by default with the Redis source distribution"
);
return
;
}
#endif
}
config_set_bool_field
(
"protected-mode"
,
server
.
protected_mode
)
{
}
config_set_bool_field
(
...
...
src/server.h
View file @
6ad34a4b
...
...
@@ -152,7 +152,7 @@ typedef long long mstime_t; /* millisecond time type. */
#define CONFIG_DEFAULT_LAZYFREE_LAZY_EXPIRE 0
#define CONFIG_DEFAULT_LAZYFREE_LAZY_SERVER_DEL 0
#define CONFIG_DEFAULT_ALWAYS_SHOW_LOGO 0
#define CONFIG_DEFAULT_ACTIVE_DEFRAG
1
#define CONFIG_DEFAULT_ACTIVE_DEFRAG
0
#define CONFIG_DEFAULT_DEFRAG_THRESHOLD_LOWER 10
/* don't defrag when fragmentation is below 10% */
#define CONFIG_DEFAULT_DEFRAG_THRESHOLD_UPPER 100
/* maximum defrag force at 100% fragmentation */
#define CONFIG_DEFAULT_DEFRAG_IGNORE_BYTES (100<<20)
/* don't defrag if frag overhead is below 100mb */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment