Merge pull request #6559 from oranagra/active_defrag_tunables

Adjustments for active defrag defaults
This commit is contained in:
Salvatore Sanfilippo
2019-11-20 10:08:08 +01:00
committed by GitHub
4 changed files with 41 additions and 27 deletions

View File

@ -1691,8 +1691,7 @@ void databasesCron(void) {
}
/* Defrag keys gradually. */
if (server.active_defrag_enabled)
activeDefragCycle();
activeDefragCycle();
/* Perform hash tables rehashing if needed, but only if there are no
* other processes saving the DB on disk. Otherwise rehashing is bad
@ -2857,6 +2856,7 @@ void initServer(void) {
server.db[j].id = j;
server.db[j].avg_ttl = 0;
server.db[j].defrag_later = listCreate();
listSetFreeMethod(server.db[j].defrag_later,(void (*)(void*))sdsfree);
}
evictionPoolAlloc(); /* Initialize the LRU keys pool. */
server.pubsub_channels = dictCreate(&keylistDictType,NULL);