<commit_before># Redis configuration file example

# By default Redis does not run as a daemon. Use 'yes' if you need it.
# Note that Redis will write a pid file in /var/run/redis.pid when daemonized.
daemonize yes

# When run as a daemon, Redis write a pid file in /var/run/redis.pid by default.
# You can specify a custom pid file location here.
pidfile /var/run/redis.pid

# Accept connections on the specified port, default is 6379
port <%= options[:port] || '6379' %>

# If you want you can bind a single interface, if the bind option is not
# specified all the interfaces will listen for connections.
#
<%= "bind #{options[:bind]}" if options[:bind] %>

# Close the connection after a client is idle for N seconds (0 to disable)
timeout <%= options[:timeout] || '300' %>

# Set server verbosity to 'debug'
# it can be one of:
# debug (a lot of information, useful for development/testing)
# verbose (many rarely useful info, but not a mess like the debug level)
# notice (moderately verbose, what you want in production probably)
# warning (only very important / critical messages are logged)
loglevel <%= options[:loglevel] || 'notice' %>

# Specify the log file name. Also 'stdout' can be used to force
# the demon to log on the standard output. Note that if you use standard
# output for logging but daemonize, logs will be sent to /dev/null
logfile /var/log/redis/redis-server.log

# Set the number of databases. The default database is DB 0, you can select
# a different one on a per-connection basis using SELECT <dbid> where
# dbid is a number between 0 and 'databases'-1
databases <%= options[:databases] || '16' %>

################################ SNAPSHOTTING  #################################
#
# Save the DB on disk:
#
#   save <seconds> <changes>
#
#   Will save the DB if both the given number of seconds and the given
#   number of write operations against the DB occurred.
#
#   In the example below the behaviour will be to save:
#   after 900 sec (15 min) if at least 1 key changed
#   after 300 sec (5 min) if at least 10 keys changed
#   after 60 sec if at least 10000 keys changed
<% if options[:saves] %>
<%= options[:saves].map { |save| "#{save}\n" } %>
<% else %>
save 900 1
save 300 10
save 60 10000
<% end %>

# Compress string objects using LZF when dump .rdb databases?
# For default that's set to 'yes' as it's almost always a win.<commit_msg>maxclients now not set until contained in configuration.<commit_after># Redis configuration file example

# By default Redis does not run as a daemon. Use 'yes' if you need it.
# Note that Redis will write a pid file in /var/run/redis.pid when daemonized.
daemonize yes

# When run as a daemon, Redis write a pid file in /var/run/redis.pid by default.
# You can specify a custom pid file location here.
pidfile /var/run/redis.pid

# Accept connections on the specified port, default is 6379
port <%= options[:port] || '6379' %>

# If you want you can bind a single interface, if the bind option is not
# specified all the interfaces will listen for connections.
#
<%= "bind #{options[:bind]}" if options[:bind] %>

# Close the connection after a client is idle for N seconds (0 to disable)
timeout <%= options[:timeout] || '300' %>

# Set server verbosity to 'debug'
# it can be one of:
# debug (a lot of information, useful for development/testing)
# verbose (many rarely useful info, but not a mess like the debug level)
# notice (moderately verbose, what you want in production probably)
# warning (only very important / critical messages are logged)
loglevel <%= options[:loglevel] || 'notice' %>

# Specify the log file name. Also 'stdout' can be used to force
# the demon to log on the standard output. Note that if you use standard
# output for logging but daemonize, logs will be sent to /dev/null
logfile /var/log/redis/redis-server.log

# Set the number of databases. The default database is DB 0, you can select
# a different one on a per-connection basis using SELECT <dbid> where
# dbid is a number between 0 and 'databases'-1
databases <%= options[:databases] || '16' %>

################################ SNAPSHOTTING  #################################
#
# Save the DB on disk:
#
#   save <seconds> <changes>
#
#   Will save the DB if both the given number of seconds and the given
#   number of write operations against the DB occurred.
#
#   In the example below the behaviour will be to save:
#   after 900 sec (15 min) if at least 1 key changed
#   after 300 sec (5 min) if at least 10 keys changed
#   after 60 sec if at least 10000 keys changed
<% if options[:saves] %>
<% options[:saves].each do |save| %>
<%= save %>
<% end %>
<% else %>
save 900 1
save 300 10
save 60 10000
<% end %>

# Compress string objects using LZF when dump .rdb databases?
# For default that's set to 'yes' as it's almost always a win.
{'fraction_non_alphanumeric': 0.11741479634247715, 'fraction_numerical': 0.021612635078969242, 'mean_word_length': 4.013541666666667, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '482778', 'n_tokens_mistral': 1516, 'n_tokens_neox': 1357, 'n_words': 708}