diff --git a/example.conf b/example.conf index 4f57669..863f8db 100644 --- a/example.conf +++ b/example.conf @@ -94,6 +94,31 @@ dbfilename test.rdb # slave-announce-port 1234 +################################## SLOW LOG ################################### + +# The Godis Slow Log is a system to log queries that exceeded a specified +# execution time. The execution time does not include the I/O operations +# like talking with the client, sending the reply and so forth, +# but just the time needed to actually execute the command (this is the only +# stage of command execution where the thread is blocked and can not serve +# other requests in the meantime). +# +# You can configure the slow log with two parameters: one tells Godis +# what is the execution time, in microseconds, to exceed in order for the +# command to get logged, and the other parameter is the length of the +# slow log. When a new command is logged the oldest one is removed from the +# queue of logged commands. + +# The following time is expressed in microseconds, so 1000000 is equivalent +# to one second. Note that a negative number disables the slow log, while +# a value of zero forces the logging of every command. +slowlog-log-slower-than 10000 + +# There is no limit to this length. Just be aware that it will consume memory. +# You can reclaim memory used by the slow log with SLOWLOG RESET. +slowlog-max-len 128 + + ################################### CLUSTER ################################### # Godis provides a Raft-based cluster, which is transparent to the client. diff --git a/node1.conf b/node1.conf index f10c797..1818076 100644 --- a/node1.conf +++ b/node1.conf @@ -1,14 +1,14 @@ bind 0.0.0.0 -port 6399 +port 7369 maxclients 128 -dir node1 appendonly no appendfilename appendonly.aof +slowlog-log-slower-than 10000 +slowlog-max-len 128 + announce-host 127.0.0.1 cluster-enable yes -cluster-as-seed yes -raft-listen-address 127.0.0.1:26666 - - +cluster-seed 127.0.0.1:6399 +cluster-config-file 7369.conf \ No newline at end of file diff --git a/node2.conf b/node2.conf index 97b7734..d506bfe 100644 --- a/node2.conf +++ b/node2.conf @@ -5,6 +5,9 @@ dir node2 appendonly no appendfilename appendonly.aof +slowlog-log-slower-than 10000 +slowlog-max-len 128 + cluster-enable yes cluster-seed 127.0.0.1:6399 raft-listen-address 127.0.0.1:26667 \ No newline at end of file diff --git a/node3.conf b/node3.conf index c4a55e6..1818076 100644 --- a/node3.conf +++ b/node3.conf @@ -5,6 +5,9 @@ maxclients 128 appendonly no appendfilename appendonly.aof +slowlog-log-slower-than 10000 +slowlog-max-len 128 + announce-host 127.0.0.1 cluster-enable yes cluster-seed 127.0.0.1:6399