add slowlog related configurations

This commit is contained in:
bijingrui
2025-08-08 23:39:44 +08:00
committed by finley
parent cb9ca3399b
commit de5e9130bd
4 changed files with 37 additions and 6 deletions

View File

@@ -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.

View File

@@ -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

View File

@@ -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

View File

@@ -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