mirror of
https://github.com/fluencelabs/redis
synced 2025-03-30 22:31:03 +00:00
Log time taken to load the DB at startup, in seconds
This commit is contained in:
parent
478c2c6f5b
commit
9651a78787
1
TODO
1
TODO
@ -19,6 +19,7 @@ Virtual Memory sub-TODO:
|
|||||||
* vm-min-age <seconds> option
|
* vm-min-age <seconds> option
|
||||||
* Make sure objects loaded from the VM are specially encoded when possible.
|
* Make sure objects loaded from the VM are specially encoded when possible.
|
||||||
* Check what happens performance-wise if instead to create threads again and again the same threads are reused forever. Note: this requires a way to disable this clients in the child, but waiting for empty new jobs queue can be enough.
|
* Check what happens performance-wise if instead to create threads again and again the same threads are reused forever. Note: this requires a way to disable this clients in the child, but waiting for empty new jobs queue can be enough.
|
||||||
|
* Sets of integers are slow to load, for a number of reasons. Fix it. (use slow_sets.rdb file for debugging).
|
||||||
|
|
||||||
* Hashes (GET/SET/DEL/INCRBY/EXISTS/FIELDS/LEN/MSET/MGET). Special encoding for hashes with < N keys.
|
* Hashes (GET/SET/DEL/INCRBY/EXISTS/FIELDS/LEN/MSET/MGET). Special encoding for hashes with < N keys.
|
||||||
|
|
||||||
|
7
redis.c
7
redis.c
@ -8212,6 +8212,8 @@ static void daemonize(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
|
time_t start;
|
||||||
|
|
||||||
initServerConfig();
|
initServerConfig();
|
||||||
if (argc == 2) {
|
if (argc == 2) {
|
||||||
resetServerSaveParams();
|
resetServerSaveParams();
|
||||||
@ -8228,12 +8230,13 @@ int main(int argc, char **argv) {
|
|||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
linuxOvercommitMemoryWarning();
|
linuxOvercommitMemoryWarning();
|
||||||
#endif
|
#endif
|
||||||
|
start = time(NULL);
|
||||||
if (server.appendonly) {
|
if (server.appendonly) {
|
||||||
if (loadAppendOnlyFile(server.appendfilename) == REDIS_OK)
|
if (loadAppendOnlyFile(server.appendfilename) == REDIS_OK)
|
||||||
redisLog(REDIS_NOTICE,"DB loaded from append only file");
|
redisLog(REDIS_NOTICE,"DB loaded from append only file: %ld seconds",time(NULL)-start);
|
||||||
} else {
|
} else {
|
||||||
if (rdbLoad(server.dbfilename) == REDIS_OK)
|
if (rdbLoad(server.dbfilename) == REDIS_OK)
|
||||||
redisLog(REDIS_NOTICE,"DB loaded from disk");
|
redisLog(REDIS_NOTICE,"DB loaded from disk: %ld seconds",time(NULL)-start);
|
||||||
}
|
}
|
||||||
redisLog(REDIS_NOTICE,"The server is now ready to accept connections on port %d", server.port);
|
redisLog(REDIS_NOTICE,"The server is now ready to accept connections on port %d", server.port);
|
||||||
aeSetBeforeSleepProc(server.el,beforeSleep);
|
aeSetBeforeSleepProc(server.el,beforeSleep);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user