1[task_server]
2
3; Logging of request-start and request-stop entries in the log.
4;log_requests = true
5
6; Size of per-thread buffer used for logging
7;log_thread_buf_size = 10 MB
8
9; Maximum period in seconds between actual writing of log records to file
10;log_flush_period = 60
11
12; Period in seconds for reopening log file (to allow log file rotation)
13;log_reopen_period = 60
14
15; Log visible severity ::= Trace | Info | Warning | Error | Critical | Fatal
16;log_visible = Warning
17
18; What to do on SoftFatal error ::= abort | shutdown | log
19; (mostly experimental, CXX-8803)
20;soft_fatal_action = abort
21
22; v6.12.1: added
23; report timing details of commands which take longer than this number of milliseconds
24;log_long_cmd_after = 30000
25
26; Maximum number of worker threads in the server
27;max_threads = 20
28
29; Maximum number of sockets after which server starts to close the least
30; recently active ones (see min_socket_inactivity below).
31;soft_sockets_limit = 1000
32
33; Maximum number of sockets after which server stops accepting new ones.
34;hard_sockets_limit = 2000
35
36; Minimum period (in seconds) socket should be inactive for to be considered
37; for server-side closing (see soft_socket_limit above).
38;min_socket_inactivity = 300
39
40; Connection timeout (in milliseconds) for sockets opened by server.
41;connection_timeout = 100
42
43; Size of per-thread batch processing to close inactive sockets (used only
44; when soft_sockets_limit and min_socket_inactivity come to play).
45;sockets_cleaning_batch = 10
46
47; v6.12.1: added
48; report accept() calls which take longer than this number of milliseconds
49;socket_accept_delay = 1000
50
51; Timeout (in seconds) for "soft shutdown" phase activated after SHUTDOWN
52; command.
53;slow_shutdown_timeout = 10
54
55; Timeout (in seconds) for "soft shutdown" phase activated by SIGTERM or SIGINT.
56; Timeout should be small enough to allow normal exit if server is rebooting.
57;fast_shutdown_timeout = 2
58
59; Maximum time (in seconds) server can be in "soft" and "hard" shutdown phases
60; when it should be aborted. If the value is 0 then server never aborts itself.
61; Parameter should be necessary only as a protection against bugs.
62;max_shutdown_time = 0
63
64; Number of "jiffies" per second. Changing of the parameter is not recommended.
65;jiffies_per_sec = 100
66
67; "Maximum" time allowed for task to wait in scheduling queue. It's not exactly
68; maximum but scheduler tries to make it like that.
69;max_task_delay = 500
70
71; Maximum time (in seconds) for thread to stay idle before it will be stopped.
72;idle_thread_stop_timeout = 300
73
74; v6.14.5: added
75; Default task priority. Positive integer. Higher value means lower priority
76;task_priority_default = 1
77
78
79[netcache]
80
81; Port numbers server responds to clients on. Along with control_port value
82; NetCache cannot have more than 16 unique port values to listen on.
83;ports = 9000, 9001
84
85; Control port for communication between servers and administrative commands
86;control_port = 9010
87
88; Name of client to be used for execution of all administrative commands (like
89; database re-initialization, server re-configuration, shutdown etc).
90; If an attempt will be made to execute these commands with any other client
91; name an error will be the result.
92;admin_client_name = netcache_control
93
94; Turn on special debugging mode of NetCache. Never turn it on in production.
95;debug_mode = false
96
97; Priority of client's parameters involved in determining their specific
98; settings. Priority is from more important one to less important. So the following
99; value will divide all clients first by cache name they have provided in the command
100; (in case of ICache) and then by the port they are connected to.
101; Default value is "cache, port"
102; To ignore contents of "app_setup" sections, specify "disable" here.
103; v6.9.3: changed  (CXX-7659)
104;app_setup_priority = cache, port
105
106; The following values are default settings for all clients and can be overridden
107; for specific clients later. Description of all parameters is given only in this
108; section.
109
110; Disable the client completely, do not allow him to execute any command.
111;disable_client = false
112
113; Lifespan TTL. If not zero, blob cannot live longer than this number of seconds,
114; even though it is prolonged and actively used.
115; Sure, the value should not be too small; maybe several times bigger than blob_ttl.
116;lifespan_ttl = 0
117
118; Maximal blob expiration timeout in seconds
119;max_ttl = 2592000
120
121; Default blob expiration timeout in seconds
122;blob_ttl = 3600
123
124; Default expiration timeout for blob's version (works only for ICache)
125;ver_ttl = 3600
126
127; Granularity of expiration time measuring. Any change in that time less than
128; this value won't be recorded. Bigger values can save some writes to database
129; and thus some disk activity and performance.
130;ttl_unit = 300
131
132; Update blob's time stamp on every read and calculate its expiration time
133; from the last read.
134;prolong_on_read = true
135
136; Try to find blob on other servers if it's not found locally
137;search_on_read = true
138
139; Number of servers required to process the command before it's reported to
140; client as successfully finished. 0 means all available servers should process
141; the command.
142; Please also see related "fast_quorum_on_main" parameter.
143;quorum = 2
144
145; Disregard the quorum and search_on_read value when executing command
146; on the main server for the blob (on the server which IP is in blob key)
147; and work as if quorum == 1 and search_on_read == false. If this value
148; is FALSE then values for quorum and search_on_read parameters will be always
149; respected no matter which server executes the command.
150;fast_quorum_on_main = true
151
152; Policy of using passwords for accessing blobs in NetCache. Possible values:
153;   no_password - only commands without passwords are accepted
154;   with_password - only commands with password are accepted
155;   any - any type of command can be sent, either with password or without it
156;blob_password_policy=any
157
158
159
160; The following is an example of client-by-client specific parameters. Each
161; clients group should be described by section with name starting with
162; 'app_setup_'. This section should contain client's parameters that identify
163; the group and section name that contains specific parameters. Meaning of all
164; specific parameters is described in the "netcache" section.
165
166;[app_setup_1h]
167; Parameters identifying clients.
168;port = 9000
169; Name of the section with specific parameters.
170;setup = app_group_1h
171
172;[app_setup_24h]
173;port = 9001
174;setup = app_group_24h
175
176;[app_setup_blobs]
177;port = 9002
178;cache = blobs
179;setup = app_group_objcache
180
181;[app_setup_ids]
182;port = 9002
183;cache = ids
184;setup = app_group_ids
185
186;[app_setup_bad_cache]
187;port = 9001
188;cache = foo
189;setup = app_group_bad
190
191
192;[app_group_1h]
193;blob_ttl = 3600
194;prolong_on_read = true
195
196;[app_group_24h]
197;blob_ttl = 184000
198;ttl_unit = 3600
199
200;[app_group_objcache]
201;blob_ttl = 184000
202;ver_ttl = 3600
203;prolong_on_read = true
204
205;[app_group_ids]
206;blob_ttl = 3600
207;prolong_on_read = false
208
209;[app_group_bad]
210;disable_client = true
211
212
213
214[storage]
215; Directory to keep the database.
216;path = ./cache
217
218; Prefix for all files in the database
219;prefix = nccache
220
221; Name of the file containing pid of currently running NetCache process and
222; serving as an exclusive lock between different NetCache instances trying
223; to access the same database. If this parameter is empty then NetCache uses
224; name as follows: <path>/__ncbi_netcache_started__.<prefix>. BUT it's
225; recommended to put this file into some other directory under some other
226; mount point (probably /var/pid/ is a good place for that), because if for
227; some reason there's no space on the disk with database and NetCache will
228; have to restart then it won't be able to start at all (attempts to create
229; the guard file will fail with error "No disk space available").
230;guard_file_name =
231
232; Size of each file in the storage
233;each_file_size = 100 MB
234
235; Maximum percentage of garbage allowed. When amount of garbage exceeds this
236; value NetCache will try to compact the storage.
237;max_garbage_pct = 20
238
239; Minimum size of storage when compaction makes sense. If total size of storage
240; is less than this value NetCache won't compact it no matter how much garbage
241; it has.
242;min_storage_size = 1 GB
243
244; Minimum time that blob is left to live for NetCache to consider it worth
245; moving during compaction.
246;min_lifetime_to_move = 1000
247
248; Delay in seconds between attempts to clean the same database file if first
249; attempt failed.
250;failed_move_delay = 10
251
252; Garbage collector processes blobs in groups of specified amount.
253;gc_batch_size = 500
254
255; Periods of syncing all written data to disk (in seconds). 0 means do not
256; perform any syncs at all - kernel will flush data to disk at its own
257; convenience.
258;sync_time_period = 0
259
260; Limit for database size when garbage collector starts/stops deletion of oldest
261; blobs even though they are not yet expired. Value of 0 for db_limit_del_old_on
262; means that this feature shouldn't be activated.
263;db_limit_del_old_on = 0
264;db_limit_del_old_off = 0
265
266; Limit for database size when NetCache stops/starts accepting any new blobs
267; from client (even it's just re-writing of the old blob). Value of 0 for
268; db_limit_stop_write_on means that this feature shouldn't be activated.
269;db_limit_stop_write_on = 0
270;db_limit_stop_write_off = 0
271
272; Limit in free disk space when NetCache stops/starts accepting any new blobs
273; from clients.
274;disk_free_limit = 5 GB
275
276; Limit in free disk space when NetCache stops/starts accepting any new blobs
277; from peer servers.
278;critical_disk_free_limit = 1 GB
279
280; Percentage of allowed database size to issue disk free space alert.
281; Allowed database size is minimum among value of db_limit_stop_write_on and
282; total available disk apce without disk_free_limit or critical_disk_free_limit.
283; When database grows above db_limit_percentage_alert of allowed database size
284; NetCache logs Critical message about that. When database size is back down below
285; (db_limit_percentage_alert - db_limit_percentage_alert_delta) of allowed
286; database size NetCache logs another Critical message that database size is back
287; to normal.
288;db_limit_percentage_alert = 65
289;db_limit_percentage_alert_delta = 5
290
291; Minimum time that should pass between two consecutive saves of current record
292; number in synchronization log.
293;min_rec_no_save_period = 30
294
295; Maximum amount of memory allowed to be consumed by write-back cache. Above this
296; limit NC tries to release least recently used memory, but total memory consumption
297; can still grow while memory is being released.
298; v6.8.6: lowered from 4GB to 3GB   (CXX-5798)
299;write_back_soft_size_limit = 3 GB
300
301; "Hard" limit for amount of memory consumed by write-back cache. Above this limit
302; NC deploys extreme measures to avoid further growth of memory consumption. This
303; limit can be reached only if some other application hogs disks on the server and
304; NC can't work properly.
305; v6.8.6: lowered from 6GB to 4GB   (CXX-5798)
306;write_back_hard_size_limit = 4 GB
307
308; Maximum timeout (in seconds) between data coming into write-back cache and going
309; out of it to the database. This one is active AFTER initial synchronization is done,
310;write_back_timeout = 1000
311
312; v6.7.0 (CXX-4527)
313; Maximum timeout (in seconds) between data coming into write-back cache and going
314; out of it to the database. This one is active DURING initial synchronization,
315;write_back_timeout_startup = 1000
316
317; Delay (in seconds) to take after a write operation to the database failed.
318; Parameter should be needed in extremely exceptional cases.
319;write_back_failed_delay = 2
320
321; v6.7.0  (CXX-3314)
322; Max count of blob keys to store for which blob data was not written successfully
323; (for reasons other than disk space shortage).
324; If this server is primary storage for a blob and the blob write fails,
325; client might put the blob to another server. If blob read request then comes
326; after failed write but before periodic synchronization, server can return wrong blob.
327; Server can remember such failed writes (blob keys only), and consult other servers
328; in uncertain situations.
329;failed_write_blob_key_count = 0
330
331; v6.7.0  (CXX-4842)
332; Blobs which size exceeds this limit (in bytes) will not be stored.
333;max_blob_size_store = 1 GB
334
335; v6.14.5: added
336; Priority of write-back cache memory release task.
337;Positive integer. Higher value means lower priority
338;task_priority_wb_memrelease = 10
339
340
341[mirror]
342; Set of servers participating in the mirroring and replication.
343; All servers are in the format <group>:<server name>:<control port>.
344; Contents of group name doesn't matter - its string value is considered as group
345; identification. When each server needs to proxy some client requests it will
346; direct them to members of their own group first.
347;server_0 = be:nctest11.be-md:9120
348;server_1 = be:nctest21.be-md:9120
349;server_2 = st:nctest31.st-va:9120
350;server_3 = st:nctest32.st-va:9120
351;server_4 = be:nctest11.be-md:9121
352;server_5 = be:nctest21.be-md:9121
353;server_6 = st:nctest31.st-va:9121
354;server_7 = st:nctest32.st-va:9121
355
356; Set of slot numbers served by each server participating in the mirroring
357;srv_slots_0 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25
358;srv_slots_1 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25
359;srv_slots_2 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25
360;srv_slots_3 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25
361;srv_slots_4 = 26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50
362;srv_slots_5 = 26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50
363;srv_slots_6 = 26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50
364;srv_slots_7 = 26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50
365
366; Server credentials
367; if a blob exists on lower trust server and does not exist on higher trust server - it is NOT mirrored
368;   (on an attempt to read it, it will be found if search_on_read is TRUE)
369; if a blob exists on higher trust server and does not exist on low trust server - it is mirrored
370;before v6.14.1:   if a blob exists on both servers - it is mirrored
371;after  v6.14.1:   if a blob exists on both servers - it is mirrored from higher to lower trust server only
372;   that is, if it is updated on lower trust one, the update is not propagated to higher server
373;        and if it is updated on higher trust one, the update is propagated
374;srv_trust_0 = 0
375;srv_trust_1 = 0
376
377
378; Number of additional parts to split all blobs into to avoid too big contention between
379; different clients.
380;cnt_slot_buckets = 10
381
382; File names to output some statistical information useful for building some graphs
383; about NetCache's performance
384; there is no default (default is empty), these are optional
385;mirroring_log_file = ./mirroring.log
386;periodic_log_file = ./periodic.log
387;copy_delay_log_file = ./copy_delay.log
388
389; Filename to store event logs on server shutdown for future synchronization with other
390; servers. It's better to be in the same directory as database
391;sync_log_file = ./cache/sync_events.log
392
393; Maximum number of records to store in event logs for each slot
394;max_slot_log_records = 100000
395
396; Number of records to leave as a reserve below limit when cleaning happens because number
397; of records hit the limit
398;clean_slot_log_reserve = 1000
399
400; Maximum number of records in the event log to clean in one cleaning transaction
401;max_clean_log_batch = 10000
402
403; Minimum time period that should pass between two consecutive forced cleanings (when all
404; synchronizations on the slot are aborted to allow cleaning to proceed).
405;min_forced_clean_log_period = 10
406
407; Time interval between attempts to clean event log
408;clean_log_attempt_interval = 1
409
410; Time interval between periodic synchronizations
411;deferred_sync_interval = 10
412
413; Timeout of inactivity in periodic sync when server can be considered out of service
414;deferred_sync_timeout = 10
415
416; Time interval between periodic sync retries when sync fails for some reason
417;failed_sync_retry_delay = 1
418
419; Time interval during which network errors should occur with some server to consider
420; that server out of service and not requiring initial synchronization.
421;network_error_timeout = 300
422
423; Blobs that are larger than this size (in KB) are considered "large".
424; These blobs are mirrored at a lesser priority than smaller blobs.
425;small_blob_max_size = 100
426
427; Maximum number of active deferred synchronization transactions to hold. More
428; synchronization transactions still can be supported in the passive mode
429; (i.e. initiated by other servers).
430;max_active_syncs = 4
431
432; Maximum allowed number of active deferred synchronization transactions with the same
433; peer. This parameter is important when some server with completely wiped out
434; database is launched. If this parameter is not low enough then all servers start
435; all their active syncs with the new peer and nobody performs sync with each other.
436;max_syncs_one_server = 2
437
438; Maximum number of connections to each peer NetCache
439;max_peer_connections = 100
440
441; Maximum number of connections to each peer which can execute background tasks
442; (instant or deferred synchronization).
443;max_peer_bg_connections = 50
444
445; Number of consecutive network errors to happen before the peer NetCache will be
446; throttled (no physical attempts to connect to it will be made).
447;peer_errors_for_throttle = 10
448
449; Time in seconds to not attempt any physical connections to peer.
450;peer_throttle_period = 10
451
452; v6.7.0  (CXX-4247)
453; Number of consecutive throttles to happen before server checks for possibly changed peer IP address.
454; that is, it assumes same peer name and port, but maybe different IP address
455;peer_throttles_for_ip_change = 10
456
457; Timeout in seconds for network communication with peer
458;peer_communication_timeout = 2
459
460; Timeout in seconds for requesting a blob list from peer
461;peer_blob_list_timeout = 10
462
463; Maximum amount of events pending to each peer for instant synchronization. Any events
464; above this limit will be immediately discarded.
465;max_instant_queue_size = 10000
466
467; v6.7.0  (CXX-4842)
468; Blobs which size exceeds this limit (in bytes) will not be synchronized to other servers.
469; this should be true:  small_blob_max_size <= max_blob_size_sync <= max_blob_size_store
470; v6.8.0 (CXX-5189)
471; '0' is special case, it means no size checks, no mirroring and no warnings
472;max_blob_size_sync = 1 GB
473
474; v6.8.0  (CXX-5189)
475; Log warnings about blobs which size exceeds 'max_blob_size_sync'
476;warn_blob_size_sync = true
477
478; v6.7.0  (CXX-3363)
479; Briefly notify peers when blob is updated on the server
480; (it comes faster than blob data copying, and lets others serve request correctly)
481;blob_update_hotline = true
482
483; v6.9.0  (CXX-6246)
484; How to calculate ICache blob slot
485; slot# is calculated either by whole key (cache,key,subkey), or by "key" only
486; this parameter must be identical for all servers in the cluster
487;slot_calculation_by_key_only = false
488
489; v6.14.5: added
490; Priority of synchronization task.
491;Positive integer. Higher value means lower priority
492;task_priority_sync = 10
493