code_zauker 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,94 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html>
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+
7
+ <link rel="stylesheet" href="css/full_list.css" type="text/css" media="screen" charset="utf-8" />
8
+
9
+ <link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />
10
+
11
+
12
+
13
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
14
+
15
+ <script type="text/javascript" charset="utf-8" src="js/full_list.js"></script>
16
+
17
+
18
+ <base id="base_target" target="_parent" />
19
+ </head>
20
+ <body>
21
+ <script type="text/javascript" charset="utf-8">
22
+ if (window.top.frames.main) {
23
+ document.getElementById('base_target').target = 'main';
24
+ document.body.className = 'frames';
25
+ }
26
+ </script>
27
+ <div id="content">
28
+ <h1 id="full_list_header">Method List</h1>
29
+ <div id="nav">
30
+
31
+ <a target="_self" href="class_list.html">Classes</a>
32
+
33
+ <a target="_self" href="method_list.html">Methods</a>
34
+
35
+ <a target="_self" href="file_list.html">Files</a>
36
+
37
+ </div>
38
+ <div id="search">Search: <input type="text" /></div>
39
+
40
+ <ul id="full_list" class="methods">
41
+
42
+
43
+ <li class="r1 ">
44
+ <span class='object_link'><a href="CodeZauker/FileScanner.html#disconnect-instance_method" title="CodeZauker::FileScanner#disconnect (method)">#disconnect</a></span>
45
+
46
+ <small>CodeZauker::FileScanner</small>
47
+
48
+ </li>
49
+
50
+
51
+ <li class="r2 ">
52
+ <span class='object_link'><a href="CodeZauker/FileScanner.html#initialize-instance_method" title="CodeZauker::FileScanner#initialize (method)">#initialize</a></span>
53
+
54
+ <small>CodeZauker::FileScanner</small>
55
+
56
+ </li>
57
+
58
+
59
+ <li class="r1 ">
60
+ <span class='object_link'><a href="CodeZauker/FileScanner.html#load-instance_method" title="CodeZauker::FileScanner#load (method)">#load</a></span>
61
+
62
+ <small>CodeZauker::FileScanner</small>
63
+
64
+ </li>
65
+
66
+
67
+ <li class="r2 ">
68
+ <span class='object_link'><a href="CodeZauker/FileScanner.html#remove-instance_method" title="CodeZauker::FileScanner#remove (method)">#remove</a></span>
69
+
70
+ <small>CodeZauker::FileScanner</small>
71
+
72
+ </li>
73
+
74
+
75
+ <li class="r1 ">
76
+ <span class='object_link'><a href="CodeZauker/FileScanner.html#removeAll-instance_method" title="CodeZauker::FileScanner#removeAll (method)">#removeAll</a></span>
77
+
78
+ <small>CodeZauker::FileScanner</small>
79
+
80
+ </li>
81
+
82
+
83
+ <li class="r2 ">
84
+ <span class='object_link'><a href="CodeZauker/FileScanner.html#search-instance_method" title="CodeZauker::FileScanner#search (method)">#search</a></span>
85
+
86
+ <small>CodeZauker::FileScanner</small>
87
+
88
+ </li>
89
+
90
+
91
+ </ul>
92
+ </div>
93
+ </body>
94
+ </html>
@@ -0,0 +1,103 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Top Level Namespace
8
+
9
+ &mdash; Code Zauker 0.0.2 Documentation
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="css/style.css" type="text/css" media="screen" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ relpath = '';
19
+ if (relpath != '') relpath += '/';
20
+ </script>
21
+
22
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
23
+
24
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
25
+
26
+
27
+ </head>
28
+ <body>
29
+ <script type="text/javascript" charset="utf-8">
30
+ if (window.top.frames.main) document.body.className = 'frames';
31
+ </script>
32
+
33
+ <div id="header">
34
+ <div id="menu">
35
+
36
+ <a href="_index.html">Index</a> &raquo;
37
+
38
+
39
+ <span class="title">Top Level Namespace</span>
40
+
41
+
42
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
43
+ </div>
44
+
45
+ <div id="search">
46
+
47
+ <a id="class_list_link" href="#">Class List</a>
48
+
49
+ <a id="method_list_link" href="#">Method List</a>
50
+
51
+ <a id="file_list_link" href="#">File List</a>
52
+
53
+ </div>
54
+ <div class="clear"></div>
55
+ </div>
56
+
57
+ <iframe id="search_frame"></iframe>
58
+
59
+ <div id="content"><h1>Top Level Namespace
60
+
61
+
62
+
63
+ </h1>
64
+
65
+ <dl class="box">
66
+
67
+
68
+
69
+
70
+
71
+
72
+
73
+
74
+ </dl>
75
+ <div class="clear"></div>
76
+
77
+ <h2>Defined Under Namespace</h2>
78
+ <p class="children">
79
+
80
+
81
+ <strong class="modules">Modules:</strong> <span class='object_link'><a href="CodeZauker.html" title="CodeZauker (module)">CodeZauker</a></span>
82
+
83
+
84
+
85
+
86
+ </p>
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+ </div>
95
+
96
+ <div id="footer">
97
+ Generated on Fri Jan 27 14:54:06 2012 by
98
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
99
+ 0.7.4 (ruby-1.9.3).
100
+ </div>
101
+
102
+ </body>
103
+ </html>
data/etc/redis.conf ADDED
@@ -0,0 +1,493 @@
1
+ # Redis configuration file fro Code Zauker
2
+
3
+ # Note on units: when memory size is needed, it is possible to specifiy
4
+ # it in the usual form of 1k 5GB 4M and so forth:
5
+ #
6
+ # 1k => 1000 bytes
7
+ # 1kb => 1024 bytes
8
+ # 1m => 1000000 bytes
9
+ # 1mb => 1024*1024 bytes
10
+ # 1g => 1000000000 bytes
11
+ # 1gb => 1024*1024*1024 bytes
12
+ #
13
+ # units are case insensitive so 1GB 1Gb 1gB are all the same.
14
+
15
+ # By default Redis does not run as a daemon. Use 'yes' if you need it.
16
+ # Note that Redis will write a pid file in /var/run/redis.pid when daemonized.
17
+ daemonize yes
18
+
19
+ # When running daemonized, Redis writes a pid file in /var/run/redis.pid by
20
+ # default. You can specify a custom pid file location here.
21
+ pidfile /tmp/codezauker_redis.pid
22
+
23
+ # Accept connections on the specified port, default is 6379.
24
+ # If port 0 is specified Redis will not listen on a TCP socket.
25
+ port 6379
26
+
27
+ # If you want you can bind a single interface, if the bind option is not
28
+ # specified all the interfaces will listen for incoming connections.
29
+ #
30
+ # bind 127.0.0.1
31
+
32
+ # Specify the path for the unix socket that will be used to listen for
33
+ # incoming connections. There is no default, so Redis will not listen
34
+ # on a unix socket when not specified.
35
+ #
36
+ # unixsocket /tmp/redis.sock
37
+ # unixsocketperm 755
38
+
39
+ # Close the connection after a client is idle for N seconds (0 to disable)
40
+ timeout 0
41
+
42
+ # Set server verbosity to 'debug'
43
+ # it can be one of:
44
+ # debug (a lot of information, useful for development/testing)
45
+ # verbose (many rarely useful info, but not a mess like the debug level)
46
+ # notice (moderately verbose, what you want in production probably)
47
+ # warning (only very important / critical messages are logged)
48
+ loglevel notice
49
+
50
+ # Specify the log file name. Also 'stdout' can be used to force
51
+ # Redis to log on the standard output. Note that if you use standard
52
+ # output for logging but daemonize, logs will be sent to /dev/null
53
+ #logfile stdout
54
+ logfile /tmp/redis.log
55
+
56
+ # To enable logging to the system logger, just set 'syslog-enabled' to yes,
57
+ # and optionally update the other syslog parameters to suit your needs.
58
+ # syslog-enabled no
59
+
60
+ # Specify the syslog identity.
61
+ # syslog-ident redis
62
+
63
+ # Specify the syslog facility. Must be USER or between LOCAL0-LOCAL7.
64
+ # syslog-facility local0
65
+
66
+ # Set the number of databases. The default database is DB 0, you can select
67
+ # a different one on a per-connection basis using SELECT <dbid> where
68
+ # dbid is a number between 0 and 'databases'-1
69
+ databases 16
70
+
71
+ ################################ SNAPSHOTTING #################################
72
+ #
73
+ # Save the DB on disk:
74
+ #
75
+ # save <seconds> <changes>
76
+ #
77
+ # Will save the DB if both the given number of seconds and the given
78
+ # number of write operations against the DB occurred.
79
+ #
80
+ # In the example below the behaviour will be to save:
81
+ # after 900 sec (15 min) if at least 1 key changed
82
+ # after 300 sec (5 min) if at least 10 keys changed
83
+ # after 60 sec if at least 10000 keys changed
84
+ #
85
+ # Note: you can disable saving at all commenting all the "save" lines.
86
+
87
+ save 900 1
88
+ save 300 10
89
+ # Incresed minute saver, to improve performance
90
+ #save 60 10000
91
+ save 60 600000
92
+
93
+ # Compress string objects using LZF when dump .rdb databases?
94
+ # For default that's set to 'yes' as it's almost always a win.
95
+ # If you want to save some CPU in the saving child set it to 'no' but
96
+ # the dataset will likely be bigger if you have compressible values or keys.
97
+ rdbcompression yes
98
+
99
+ # The filename where to dump the DB
100
+ dbfilename code_zauker_index.rdb
101
+
102
+ # The working directory.
103
+ #
104
+ # The DB will be written inside this directory, with the filename specified
105
+ # above using the 'dbfilename' configuration directive.
106
+ #
107
+ # Also the Append Only File will be created inside this directory.
108
+ #
109
+ # Note that you must specify a directory here, not a file name.
110
+ #dir ./
111
+ dir /home/giovanni/code_zauker/
112
+
113
+ ################################# REPLICATION #################################
114
+
115
+ # Master-Slave replication. Use slaveof to make a Redis instance a copy of
116
+ # another Redis server. Note that the configuration is local to the slave
117
+ # so for example it is possible to configure the slave to save the DB with a
118
+ # different interval, or to listen to another port, and so on.
119
+ #
120
+ # slaveof <masterip> <masterport>
121
+
122
+ # If the master is password protected (using the "requirepass" configuration
123
+ # directive below) it is possible to tell the slave to authenticate before
124
+ # starting the replication synchronization process, otherwise the master will
125
+ # refuse the slave request.
126
+ #
127
+ # masterauth <master-password>
128
+
129
+ # When a slave lost the connection with the master, or when the replication
130
+ # is still in progress, the slave can act in two different ways:
131
+ #
132
+ # 1) if slave-serve-stale-data is set to 'yes' (the default) the slave will
133
+ # still reply to client requests, possibly with out of data data, or the
134
+ # data set may just be empty if this is the first synchronization.
135
+ #
136
+ # 2) if slave-serve-stale data is set to 'no' the slave will reply with
137
+ # an error "SYNC with master in progress" to all the kind of commands
138
+ # but to INFO and SLAVEOF.
139
+ #
140
+ slave-serve-stale-data yes
141
+
142
+ # Slaves send PINGs to server in a predefined interval. It's possible to change
143
+ # this interval with the repl_ping_slave_period option. The default value is 10
144
+ # seconds.
145
+ #
146
+ # repl-ping-slave-period 10
147
+
148
+ # The following option sets a timeout for both Bulk transfer I/O timeout and
149
+ # master data or ping response timeout. The default value is 60 seconds.
150
+ #
151
+ # It is important to make sure that this value is greater than the value
152
+ # specified for repl-ping-slave-period otherwise a timeout will be detected
153
+ # every time there is low traffic between the master and the slave.
154
+ #
155
+ # repl-timeout 60
156
+
157
+ ################################## SECURITY ###################################
158
+
159
+ # Require clients to issue AUTH <PASSWORD> before processing any other
160
+ # commands. This might be useful in environments in which you do not trust
161
+ # others with access to the host running redis-server.
162
+ #
163
+ # This should stay commented out for backward compatibility and because most
164
+ # people do not need auth (e.g. they run their own servers).
165
+ #
166
+ # Warning: since Redis is pretty fast an outside user can try up to
167
+ # 150k passwords per second against a good box. This means that you should
168
+ # use a very strong password otherwise it will be very easy to break.
169
+ #
170
+ # requirepass foobared
171
+
172
+ # Command renaming.
173
+ #
174
+ # It is possilbe to change the name of dangerous commands in a shared
175
+ # environment. For instance the CONFIG command may be renamed into something
176
+ # of hard to guess so that it will be still available for internal-use
177
+ # tools but not available for general clients.
178
+ #
179
+ # Example:
180
+ #
181
+ # rename-command CONFIG b840fc02d524045429941cc15f59e41cb7be6c52
182
+ #
183
+ # It is also possilbe to completely kill a command renaming it into
184
+ # an empty string:
185
+ #
186
+ # rename-command CONFIG ""
187
+
188
+ ################################### LIMITS ####################################
189
+
190
+ # Set the max number of connected clients at the same time. By default there
191
+ # is no limit, and it's up to the number of file descriptors the Redis process
192
+ # is able to open. The special value '0' means no limits.
193
+ # Once the limit is reached Redis will close all the new connections sending
194
+ # an error 'max number of clients reached'.
195
+ #
196
+ # maxclients 128
197
+
198
+ # GG Strict maxclients for seacurity
199
+ maxclients 64
200
+
201
+ # Don't use more memory than the specified amount of bytes.
202
+ # When the memory limit is reached Redis will try to remove keys with an
203
+ # EXPIRE set. It will try to start freeing keys that are going to expire
204
+ # in little time and preserve keys with a longer time to live.
205
+ # Redis will also try to remove objects from free lists if possible.
206
+ #
207
+ # If all this fails, Redis will start to reply with errors to commands
208
+ # that will use more memory, like SET, LPUSH, and so on, and will continue
209
+ # to reply to most read-only commands like GET.
210
+ #
211
+ # WARNING: maxmemory can be a good idea mainly if you want to use Redis as a
212
+ # 'state' server or cache, not as a real DB. When Redis is used as a real
213
+ # database the memory usage will grow over the weeks, it will be obvious if
214
+ # it is going to use too much memory in the long run, and you'll have the time
215
+ # to upgrade. With maxmemory after the limit is reached you'll start to get
216
+ # errors for write operations, and this may even lead to DB inconsistency.
217
+ #
218
+ # maxmemory <bytes>
219
+
220
+ # MAXMEMORY POLICY: how Redis will select what to remove when maxmemory
221
+ # is reached? You can select among five behavior:
222
+ #
223
+ # volatile-lru -> remove the key with an expire set using an LRU algorithm
224
+ # allkeys-lru -> remove any key accordingly to the LRU algorithm
225
+ # volatile-random -> remove a random key with an expire set
226
+ # allkeys->random -> remove a random key, any key
227
+ # volatile-ttl -> remove the key with the nearest expire time (minor TTL)
228
+ # noeviction -> don't expire at all, just return an error on write operations
229
+ #
230
+ # Note: with all the kind of policies, Redis will return an error on write
231
+ # operations, when there are not suitable keys for eviction.
232
+ #
233
+ # At the date of writing this commands are: set setnx setex append
234
+ # incr decr rpush lpush rpushx lpushx linsert lset rpoplpush sadd
235
+ # sinter sinterstore sunion sunionstore sdiff sdiffstore zadd zincrby
236
+ # zunionstore zinterstore hset hsetnx hmset hincrby incrby decrby
237
+ # getset mset msetnx exec sort
238
+ #
239
+ # The default is:
240
+ #
241
+ # maxmemory-policy volatile-lru
242
+
243
+ # LRU and minimal TTL algorithms are not precise algorithms but approximated
244
+ # algorithms (in order to save memory), so you can select as well the sample
245
+ # size to check. For instance for default Redis will check three keys and
246
+ # pick the one that was used less recently, you can change the sample size
247
+ # using the following configuration directive.
248
+ #
249
+ # maxmemory-samples 3
250
+
251
+ ############################## APPEND ONLY MODE ###############################
252
+
253
+ # By default Redis asynchronously dumps the dataset on disk. If you can live
254
+ # with the idea that the latest records will be lost if something like a crash
255
+ # happens this is the preferred way to run Redis. If instead you care a lot
256
+ # about your data and don't want to that a single record can get lost you should
257
+ # enable the append only mode: when this mode is enabled Redis will append
258
+ # every write operation received in the file appendonly.aof. This file will
259
+ # be read on startup in order to rebuild the full dataset in memory.
260
+ #
261
+ # Note that you can have both the async dumps and the append only file if you
262
+ # like (you have to comment the "save" statements above to disable the dumps).
263
+ # Still if append only mode is enabled Redis will load the data from the
264
+ # log file at startup ignoring the dump.rdb file.
265
+ #
266
+ # IMPORTANT: Check the BGREWRITEAOF to check how to rewrite the append
267
+ # log file in background when it gets too big.
268
+
269
+ appendonly no
270
+
271
+ # The name of the append only file (default: "appendonly.aof")
272
+ # appendfilename appendonly.aof
273
+
274
+ # The fsync() call tells the Operating System to actually write data on disk
275
+ # instead to wait for more data in the output buffer. Some OS will really flush
276
+ # data on disk, some other OS will just try to do it ASAP.
277
+ #
278
+ # Redis supports three different modes:
279
+ #
280
+ # no: don't fsync, just let the OS flush the data when it wants. Faster.
281
+ # always: fsync after every write to the append only log . Slow, Safest.
282
+ # everysec: fsync only if one second passed since the last fsync. Compromise.
283
+ #
284
+ # The default is "everysec" that's usually the right compromise between
285
+ # speed and data safety. It's up to you to understand if you can relax this to
286
+ # "no" that will will let the operating system flush the output buffer when
287
+ # it wants, for better performances (but if you can live with the idea of
288
+ # some data loss consider the default persistence mode that's snapshotting),
289
+ # or on the contrary, use "always" that's very slow but a bit safer than
290
+ # everysec.
291
+ #
292
+ # If unsure, use "everysec".
293
+
294
+ # appendfsync always
295
+ appendfsync everysec
296
+ # appendfsync no
297
+
298
+ # When the AOF fsync policy is set to always or everysec, and a background
299
+ # saving process (a background save or AOF log background rewriting) is
300
+ # performing a lot of I/O against the disk, in some Linux configurations
301
+ # Redis may block too long on the fsync() call. Note that there is no fix for
302
+ # this currently, as even performing fsync in a different thread will block
303
+ # our synchronous write(2) call.
304
+ #
305
+ # In order to mitigate this problem it's possible to use the following option
306
+ # that will prevent fsync() from being called in the main process while a
307
+ # BGSAVE or BGREWRITEAOF is in progress.
308
+ #
309
+ # This means that while another child is saving the durability of Redis is
310
+ # the same as "appendfsync none", that in pratical terms means that it is
311
+ # possible to lost up to 30 seconds of log in the worst scenario (with the
312
+ # default Linux settings).
313
+ #
314
+ # If you have latency problems turn this to "yes". Otherwise leave it as
315
+ # "no" that is the safest pick from the point of view of durability.
316
+ no-appendfsync-on-rewrite no
317
+
318
+ # Automatic rewrite of the append only file.
319
+ # Redis is able to automatically rewrite the log file implicitly calling
320
+ # BGREWRITEAOF when the AOF log size will growth by the specified percentage.
321
+ #
322
+ # This is how it works: Redis remembers the size of the AOF file after the
323
+ # latest rewrite (or if no rewrite happened since the restart, the size of
324
+ # the AOF at startup is used).
325
+ #
326
+ # This base size is compared to the current size. If the current size is
327
+ # bigger than the specified percentage, the rewrite is triggered. Also
328
+ # you need to specify a minimal size for the AOF file to be rewritten, this
329
+ # is useful to avoid rewriting the AOF file even if the percentage increase
330
+ # is reached but it is still pretty small.
331
+ #
332
+ # Specify a precentage of zero in order to disable the automatic AOF
333
+ # rewrite feature.
334
+
335
+ auto-aof-rewrite-percentage 100
336
+ auto-aof-rewrite-min-size 64mb
337
+
338
+ ################################## SLOW LOG ###################################
339
+
340
+ # The Redis Slow Log is a system to log queries that exceeded a specified
341
+ # execution time. The execution time does not include the I/O operations
342
+ # like talking with the client, sending the reply and so forth,
343
+ # but just the time needed to actually execute the command (this is the only
344
+ # stage of command execution where the thread is blocked and can not serve
345
+ # other requests in the meantime).
346
+ #
347
+ # You can configure the slow log with two parameters: one tells Redis
348
+ # what is the execution time, in microseconds, to exceed in order for the
349
+ # command to get logged, and the other parameter is the length of the
350
+ # slow log. When a new command is logged the oldest one is removed from the
351
+ # queue of logged commands.
352
+
353
+ # The following time is expressed in microseconds, so 1000000 is equivalent
354
+ # to one second. Note that a negative number disables the slow log, while
355
+ # a value of zero forces the logging of every command.
356
+ slowlog-log-slower-than 10000
357
+
358
+ # There is no limit to this length. Just be aware that it will consume memory.
359
+ # You can reclaim memory used by the slow log with SLOWLOG RESET.
360
+ slowlog-max-len 1024
361
+
362
+ ################################ VIRTUAL MEMORY ###############################
363
+
364
+ ### WARNING! Virtual Memory is deprecated in Redis 2.4
365
+ ### The use of Virtual Memory is strongly discouraged.
366
+
367
+ # Virtual Memory allows Redis to work with datasets bigger than the actual
368
+ # amount of RAM needed to hold the whole dataset in memory.
369
+ # In order to do so very used keys are taken in memory while the other keys
370
+ # are swapped into a swap file, similarly to what operating systems do
371
+ # with memory pages.
372
+ #
373
+ # To enable VM just set 'vm-enabled' to yes, and set the following three
374
+ # VM parameters accordingly to your needs.
375
+
376
+ vm-enabled no
377
+ # vm-enabled yes
378
+
379
+ # This is the path of the Redis swap file. As you can guess, swap files
380
+ # can't be shared by different Redis instances, so make sure to use a swap
381
+ # file for every redis process you are running. Redis will complain if the
382
+ # swap file is already in use.
383
+ #
384
+ # The best kind of storage for the Redis swap file (that's accessed at random)
385
+ # is a Solid State Disk (SSD).
386
+ #
387
+ # *** WARNING *** if you are using a shared hosting the default of putting
388
+ # the swap file under /tmp is not secure. Create a dir with access granted
389
+ # only to Redis user and configure Redis to create the swap file there.
390
+ vm-swap-file /tmp/redis.swap
391
+
392
+ # vm-max-memory configures the VM to use at max the specified amount of
393
+ # RAM. Everything that deos not fit will be swapped on disk *if* possible, that
394
+ # is, if there is still enough contiguous space in the swap file.
395
+ #
396
+ # With vm-max-memory 0 the system will swap everything it can. Not a good
397
+ # default, just specify the max amount of RAM you can in bytes, but it's
398
+ # better to leave some margin. For instance specify an amount of RAM
399
+ # that's more or less between 60 and 80% of your free RAM.
400
+ vm-max-memory 0
401
+
402
+ # Redis swap files is split into pages. An object can be saved using multiple
403
+ # contiguous pages, but pages can't be shared between different objects.
404
+ # So if your page is too big, small objects swapped out on disk will waste
405
+ # a lot of space. If you page is too small, there is less space in the swap
406
+ # file (assuming you configured the same number of total swap file pages).
407
+ #
408
+ # If you use a lot of small objects, use a page size of 64 or 32 bytes.
409
+ # If you use a lot of big objects, use a bigger page size.
410
+ # If unsure, use the default :)
411
+ vm-page-size 32
412
+
413
+ # Number of total memory pages in the swap file.
414
+ # Given that the page table (a bitmap of free/used pages) is taken in memory,
415
+ # every 8 pages on disk will consume 1 byte of RAM.
416
+ #
417
+ # The total swap size is vm-page-size * vm-pages
418
+ #
419
+ # With the default of 32-bytes memory pages and 134217728 pages Redis will
420
+ # use a 4 GB swap file, that will use 16 MB of RAM for the page table.
421
+ #
422
+ # It's better to use the smallest acceptable value for your application,
423
+ # but the default is large in order to work in most conditions.
424
+ vm-pages 134217728
425
+
426
+ # Max number of VM I/O threads running at the same time.
427
+ # This threads are used to read/write data from/to swap file, since they
428
+ # also encode and decode objects from disk to memory or the reverse, a bigger
429
+ # number of threads can help with big objects even if they can't help with
430
+ # I/O itself as the physical device may not be able to couple with many
431
+ # reads/writes operations at the same time.
432
+ #
433
+ # The special value of 0 turn off threaded I/O and enables the blocking
434
+ # Virtual Memory implementation.
435
+ vm-max-threads 4
436
+
437
+ ############################### ADVANCED CONFIG ###############################
438
+
439
+ # Hashes are encoded in a special way (much more memory efficient) when they
440
+ # have at max a given numer of elements, and the biggest element does not
441
+ # exceed a given threshold. You can configure this limits with the following
442
+ # configuration directives.
443
+ hash-max-zipmap-entries 512
444
+ hash-max-zipmap-value 64
445
+
446
+ # Similarly to hashes, small lists are also encoded in a special way in order
447
+ # to save a lot of space. The special representation is only used when
448
+ # you are under the following limits:
449
+ list-max-ziplist-entries 512
450
+ list-max-ziplist-value 64
451
+
452
+ # Sets have a special encoding in just one case: when a set is composed
453
+ # of just strings that happens to be integers in radix 10 in the range
454
+ # of 64 bit signed integers.
455
+ # The following configuration setting sets the limit in the size of the
456
+ # set in order to use this special memory saving encoding.
457
+ set-max-intset-entries 512
458
+
459
+ # Similarly to hashes and lists, sorted sets are also specially encoded in
460
+ # order to save a lot of space. This encoding is only used when the length and
461
+ # elements of a sorted set are below the following limits:
462
+ zset-max-ziplist-entries 128
463
+ zset-max-ziplist-value 64
464
+
465
+ # Active rehashing uses 1 millisecond every 100 milliseconds of CPU time in
466
+ # order to help rehashing the main Redis hash table (the one mapping top-level
467
+ # keys to values). The hash table implementation redis uses (see dict.c)
468
+ # performs a lazy rehashing: the more operation you run into an hash table
469
+ # that is rhashing, the more rehashing "steps" are performed, so if the
470
+ # server is idle the rehashing is never complete and some more memory is used
471
+ # by the hash table.
472
+ #
473
+ # The default is to use this millisecond 10 times every second in order to
474
+ # active rehashing the main dictionaries, freeing memory when possible.
475
+ #
476
+ # If unsure:
477
+ # use "activerehashing no" if you have hard latency requirements and it is
478
+ # not a good thing in your environment that Redis can reply form time to time
479
+ # to queries with 2 milliseconds delay.
480
+ #
481
+ # use "activerehashing yes" if you don't have such hard requirements but
482
+ # want to free memory asap when possible.
483
+ activerehashing yes
484
+
485
+ ################################## INCLUDES ###################################
486
+
487
+ # Include one or more other config files here. This is useful if you
488
+ # have a standard template that goes to all redis server but also need
489
+ # to customize a few per-server settings. Include files can include
490
+ # other files, so use this wisely.
491
+ #
492
+ # include /path/to/local.conf
493
+ # include /path/to/other.conf