source: vendor/current/ctdb/doc/ctdb-tunables.7.xml

Last change on this file was 989, checked in by Silvan Scherrer, 9 years ago

Samba Server: update vendor to version 4.4.7

File size: 23.8 KB
Line 
1<?xml version="1.0" encoding="iso-8859-1"?>
2<!DOCTYPE refentry
3 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
4 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
5
6<refentry id="ctdb-tunables.7">
7
8 <refmeta>
9 <refentrytitle>ctdb-tunables</refentrytitle>
10 <manvolnum>7</manvolnum>
11 <refmiscinfo class="source">ctdb</refmiscinfo>
12 <refmiscinfo class="manual">CTDB - clustered TDB database</refmiscinfo>
13 </refmeta>
14
15 <refnamediv>
16 <refname>ctdb-tunables</refname>
17 <refpurpose>CTDB tunable configuration variables</refpurpose>
18 </refnamediv>
19
20 <refsect1>
21 <title>DESCRIPTION</title>
22
23 <para>
24 CTDB's behaviour can be configured by setting run-time tunable
25 variables. This lists and describes all tunables. See the
26 <citerefentry><refentrytitle>ctdb</refentrytitle>
27 <manvolnum>1</manvolnum></citerefentry>
28 <command>listvars</command>, <command>setvar</command> and
29 <command>getvar</command> commands for more details.
30 </para>
31
32 <para>
33 The tunable variables are listed alphabetically.
34 </para>
35
36 <refsect2>
37 <title>AllowClientDBAttach</title>
38 <para>Default: 1</para>
39 <para>
40 When set to 0, clients are not allowed to attach to any databases.
41 This can be used to temporarily block any new processes from
42 attaching to and accessing the databases. This is mainly used
43 for detaching a volatile database using 'ctdb detach'.
44 </para>
45 </refsect2>
46
47 <refsect2>
48 <title>AllowUnhealthyDBRead</title>
49 <para>Default: 0</para>
50 <para>
51 When set to 1, ctdb allows database traverses to read unhealthy
52 databases. By default, ctdb does not allow reading records from
53 unhealthy databases.
54 </para>
55 </refsect2>
56
57 <refsect2>
58 <title>ControlTimeout</title>
59 <para>Default: 60</para>
60 <para>
61 This is the default setting for timeout for when sending a
62 control message to either the local or a remote ctdb daemon.
63 </para>
64 </refsect2>
65
66 <refsect2>
67 <title>DatabaseHashSize</title>
68 <para>Default: 100001</para>
69 <para>
70 Number of the hash chains for the local store of the tdbs that
71 ctdb manages.
72 </para>
73 </refsect2>
74
75 <refsect2>
76 <title>DatabaseMaxDead</title>
77 <para>Default: 5</para>
78 <para>
79 Maximum number of dead records per hash chain for the tdb databses
80 managed by ctdb.
81 </para>
82 </refsect2>
83
84 <refsect2>
85 <title>DBRecordCountWarn</title>
86 <para>Default: 100000</para>
87 <para>
88 When set to non-zero, ctdb will log a warning during recovery if
89 a database has more than this many records. This will produce a
90 warning if a database grows uncontrollably with orphaned records.
91 </para>
92 </refsect2>
93
94 <refsect2>
95 <title>DBRecordSizeWarn</title>
96 <para>Default: 10000000</para>
97 <para>
98 When set to non-zero, ctdb will log a warning during recovery
99 if a single record is bigger than this size. This will produce
100 a warning if a database record grows uncontrollably.
101 </para>
102 </refsect2>
103
104 <refsect2>
105 <title>DBSizeWarn</title>
106 <para>Default: 1000000000</para>
107 <para>
108 When set to non-zero, ctdb will log a warning during recovery if
109 a database size is bigger than this. This will produce a warning
110 if a database grows uncontrollably.
111 </para>
112 </refsect2>
113
114 <refsect2>
115 <title>DeferredAttachTO</title>
116 <para>Default: 120</para>
117 <para>
118 When databases are frozen we do not allow clients to attach to
119 the databases. Instead of returning an error immediately to the
120 client, the attach request from the client is deferred until
121 the database becomes available again at which stage we respond
122 to the client.
123 </para>
124 <para>
125 This timeout controls how long we will defer the request from the
126 client before timing it out and returning an error to the client.
127 </para>
128 </refsect2>
129
130 <refsect2>
131 <title>DeterministicIPs</title>
132 <para>Default: 0</para>
133 <para>
134 When set to 1, ctdb will try to keep public IP addresses locked
135 to specific nodes as far as possible. This makes it easier
136 for debugging since you can know that as long as all nodes are
137 healthy public IP X will always be hosted by node Y.
138 </para>
139 <para>
140 The cost of using deterministic IP address assignment is that it
141 disables part of the logic where ctdb tries to reduce the number
142 of public IP assignment changes in the cluster. This tunable may
143 increase the number of IP failover/failbacks that are performed
144 on the cluster by a small margin.
145 </para>
146 </refsect2>
147
148 <refsect2>
149 <title>DisableIPFailover</title>
150 <para>Default: 0</para>
151 <para>
152 When set to non-zero, ctdb will not perform failover or
153 failback. Even if a node fails while holding public IPs, ctdb
154 will not recover the IPs or assign them to another node.
155 </para>
156 <para>
157 When this tunable is enabled, ctdb will no longer attempt
158 to recover the cluster by failing IP addresses over to other
159 nodes. This leads to a service outage until the administrator
160 has manually performed IP failover to replacement nodes using the
161 'ctdb moveip' command.
162 </para>
163 </refsect2>
164
165 <refsect2>
166 <title>ElectionTimeout</title>
167 <para>Default: 3</para>
168 <para>
169 The number of seconds to wait for the election of recovery
170 master to complete. If the election is not completed during this
171 interval, then that round of election fails and ctdb starts a
172 new election.
173 </para>
174 </refsect2>
175
176 <refsect2>
177 <title>EnableBans</title>
178 <para>Default: 1</para>
179 <para>
180 This parameter allows ctdb to ban a node if the node is misbehaving.
181 </para>
182 <para>
183 When set to 0, this disables banning completely in the cluster
184 and thus nodes can not get banned, even it they break. Don't
185 set to 0 unless you know what you are doing. You should set
186 this to the same value on all nodes to avoid unexpected behaviour.
187 </para>
188 </refsect2>
189
190 <refsect2>
191 <title>EventScriptTimeout</title>
192 <para>Default: 30</para>
193 <para>
194 Maximum time in seconds to allow an event to run before timing
195 out. This is the total time for all enabled scripts that are
196 run for an event, not just a single event script.
197 </para>
198 <para>
199 Note that timeouts are ignored for some events ("takeip",
200 "releaseip", "startrecovery", "recovered") and converted to
201 success. The logic here is that the callers of these events
202 implement their own additional timeout.
203 </para>
204 </refsect2>
205
206 <refsect2>
207 <title>FetchCollapse</title>
208 <para>Default: 1</para>
209 <para>
210 This parameter is used to avoid multiple migration requests for
211 the same record from a single node. All the record requests for
212 the same record are queued up and processed when the record is
213 migrated to the current node.
214 </para>
215 <para>
216 When many clients across many nodes try to access the same record
217 at the same time this can lead to a fetch storm where the record
218 becomes very active and bounces between nodes very fast. This
219 leads to high CPU utilization of the ctdbd daemon, trying to
220 bounce that record around very fast, and poor performance.
221 This can improve performance and reduce CPU utilization for
222 certain workloads.
223 </para>
224 </refsect2>
225
226 <refsect2>
227 <title>HopcountMakeSticky</title>
228 <para>Default: 50</para>
229 <para>
230 For database(s) marked STICKY (using 'ctdb setdbsticky'),
231 any record that is migrating so fast that hopcount
232 exceeds this limit is marked as STICKY record for
233 <varname>StickyDuration</varname> seconds. This means that
234 after each migration the sticky record will be kept on the node
235 <varname>StickyPindown</varname>milliseconds and prevented from
236 being migrated off the node.
237 </para>
238 <para>
239 This will improve performance for certain workloads, such as
240 locking.tdb if many clients are opening/closing the same file
241 concurrently.
242 </para>
243 </refsect2>
244
245 <refsect2>
246 <title>KeepaliveInterval</title>
247 <para>Default: 5</para>
248 <para>
249 How often in seconds should the nodes send keep-alive packets to
250 each other.
251 </para>
252 </refsect2>
253
254 <refsect2>
255 <title>KeepaliveLimit</title>
256 <para>Default: 5</para>
257 <para>
258 After how many keepalive intervals without any traffic should
259 a node wait until marking the peer as DISCONNECTED.
260 </para>
261 <para>
262 If a node has hung, it can take
263 <varname>KeepaliveInterval</varname> *
264 (<varname>KeepaliveLimit</varname> + 1) seconds before
265 ctdb determines that the node is DISCONNECTED and performs
266 a recovery. This limit should not be set too high to enable
267 early detection and avoid any application timeouts (e.g. SMB1)
268 to kick in before the fail over is completed.
269 </para>
270 </refsect2>
271
272 <refsect2>
273 <title>LCP2PublicIPs</title>
274 <para>Default: 1</para>
275 <para>
276 When set to 1, ctdb uses the LCP2 ip allocation algorithm.
277 </para>
278 </refsect2>
279
280 <refsect2>
281 <title>LockProcessesPerDB</title>
282 <para>Default: 200</para>
283 <para>
284 This is the maximum number of lock helper processes ctdb will
285 create for obtaining record locks. When ctdb cannot get a record
286 lock without blocking, it creates a helper process that waits
287 for the lock to be obtained.
288 </para>
289 </refsect2>
290
291 <refsect2>
292 <title>LogLatencyMs</title>
293 <para>Default: 0</para>
294 <para>
295 When set to non-zero, ctdb will log if certains operations
296 take longer than this value, in milliseconds, to complete.
297 These operations include "process a record request from client",
298 "take a record or database lock", "update a persistent database
299 record" and "vaccum a database".
300 </para>
301 </refsect2>
302
303 <refsect2>
304 <title>MaxQueueDropMsg</title>
305 <para>Default: 1000000</para>
306 <para>
307 This is the maximum number of messages to be queued up for
308 a client before ctdb will treat the client as hung and will
309 terminate the client connection.
310 </para>
311 </refsect2>
312
313 <refsect2>
314 <title>MonitorInterval</title>
315 <para>Default: 15</para>
316 <para>
317 How often should ctdb run the 'monitor' event in seconds to check
318 for a node's health.
319 </para>
320 </refsect2>
321
322 <refsect2>
323 <title>MonitorTimeoutCount</title>
324 <para>Default: 20</para>
325 <para>
326 How many 'monitor' events in a row need to timeout before a node
327 is flagged as UNHEALTHY. This setting is useful if scripts can
328 not be written so that they do not hang for benign reasons.
329 </para>
330 </refsect2>
331
332 <refsect2>
333 <title>NoIPFailback</title>
334 <para>Default: 0</para>
335 <para>
336 When set to 1, ctdb will not perform failback of IP addresses
337 when a node becomes healthy. When a node becomes UNHEALTHY,
338 ctdb WILL perform failover of public IP addresses, but when the
339 node becomes HEALTHY again, ctdb will not fail the addresses back.
340 </para>
341 <para>
342 Use with caution! Normally when a node becomes available to the
343 cluster ctdb will try to reassign public IP addresses onto the
344 new node as a way to distribute the workload evenly across the
345 clusternode. Ctdb tries to make sure that all running nodes have
346 approximately the same number of public addresses it hosts.
347 </para>
348 <para>
349 When you enable this tunable, ctdb will no longer attempt to
350 rebalance the cluster by failing IP addresses back to the new
351 nodes. An unbalanced cluster will therefore remain unbalanced
352 until there is manual intervention from the administrator. When
353 this parameter is set, you can manually fail public IP addresses
354 over to the new node(s) using the 'ctdb moveip' command.
355 </para>
356 </refsect2>
357
358 <refsect2>
359 <title>NoIPHostOnAllDisabled</title>
360 <para>Default: 0</para>
361 <para>
362 If no nodes are HEALTHY then by default ctdb will happily host
363 public IPs on disabled (unhealthy or administratively disabled)
364 nodes. This can cause problems, for example if the underlying
365 cluster filesystem is not mounted. When set to 1 on a node and
366 that node is disabled, any IPs hosted by this node will be
367 released and the node will not takeover any IPs until it is no
368 longer disabled.
369 </para>
370 </refsect2>
371
372 <refsect2>
373 <title>NoIPTakeover</title>
374 <para>Default: 0</para>
375 <para>
376 When set to 1, ctdb will not allow IP addresses to be failed
377 over onto this node. Any IP addresses that the node currently
378 hosts will remain on the node but no new IP addresses can be
379 failed over to the node.
380 </para>
381 </refsect2>
382
383 <refsect2>
384 <title>PullDBPreallocation</title>
385 <para>Default: 10*1024*1024</para>
386 <para>
387 This is the size of a record buffer to pre-allocate for sending
388 reply to PULLDB control. Usually record buffer starts with size
389 of the first record and gets reallocated every time a new record
390 is added to the record buffer. For a large number of records,
391 this can be very inefficient to grow the record buffer one record
392 at a time.
393 </para>
394 </refsect2>
395
396 <refsect2>
397 <title>RecBufferSizeLimit</title>
398 <para>Default: 1000000</para>
399 <para>
400 This is the limit on the size of the record buffer to be sent
401 in various controls. This limit is used by new controls used
402 for recovery and controls used in vacuuming.
403 </para>
404 </refsect2>
405
406 <refsect2>
407 <title>RecdFailCount</title>
408 <para>Default: 10</para>
409 <para>
410 If the recovery daemon has failed to ping the main dameon for
411 this many consecutive intervals, the main daemon will consider
412 the recovery daemon as hung and will try to restart it to recover.
413 </para>
414 </refsect2>
415
416 <refsect2>
417 <title>RecdPingTimeout</title>
418 <para>Default: 60</para>
419 <para>
420 If the main dameon has not heard a "ping" from the recovery dameon
421 for this many seconds, the main dameon will log a message that
422 the recovery daemon is potentially hung. This also increments a
423 counter which is checked against <varname>RecdFailCount</varname>
424 for detection of hung recovery daemon.
425 </para>
426 </refsect2>
427
428 <refsect2>
429 <title>RecLockLatencyMs</title>
430 <para>Default: 1000</para>
431 <para>
432 When using a reclock file for split brain prevention, if set
433 to non-zero this tunable will make the recovery dameon log a
434 message if the fcntl() call to lock/testlock the recovery file
435 takes longer than this number of milliseconds.
436 </para>
437 </refsect2>
438
439 <refsect2>
440 <title>RecoverInterval</title>
441 <para>Default: 1</para>
442 <para>
443 How frequently in seconds should the recovery daemon perform the
444 consistency checks to determine if it should perform a recovery.
445 </para>
446 </refsect2>
447
448 <refsect2>
449 <title>RecoverPDBBySeqNum</title>
450 <para>Default: 1</para>
451 <para>
452 When set to zero, database recovery for persistent databases is
453 record-by-record and recovery process simply collects the most
454 recent version of every individual record.
455 </para>
456 <para>
457 When set to non-zero, persistent databases will instead be
458 recovered as a whole db and not by individual records. The
459 node that contains the highest value stored in the record
460 "__db_sequence_number__" is selected and the copy of that nodes
461 database is used as the recovered database.
462 </para>
463 <para>
464 By default, recovery of persistent databses is done using
465 __db_sequence_number__ record.
466 </para>
467 </refsect2>
468
469 <refsect2>
470 <title>RecoverTimeout</title>
471 <para>Default: 120</para>
472 <para>
473 This is the default setting for timeouts for controls when sent
474 from the recovery daemon. We allow longer control timeouts from
475 the recovery daemon than from normal use since the recovery
476 dameon often use controls that can take a lot longer than normal
477 controls.
478 </para>
479 </refsect2>
480
481 <refsect2>
482 <title>RecoveryBanPeriod</title>
483 <para>Default: 300</para>
484 <para>
485 The duration in seconds for which a node is banned if the node
486 fails during recovery. After this time has elapsed the node will
487 automatically get unbanned and will attempt to rejoin the cluster.
488 </para>
489 <para>
490 A node usually gets banned due to real problems with the node.
491 Don't set this value too small. Otherwise, a problematic node
492 will try to re-join cluster too soon causing unnecessary recoveries.
493 </para>
494 </refsect2>
495
496 <refsect2>
497 <title>RecoveryDropAllIPs</title>
498 <para>Default: 120</para>
499 <para>
500 If a node is stuck in recovery, or stopped, or banned, for this
501 many seconds, then ctdb will release all public addresses on
502 that node.
503 </para>
504 </refsect2>
505
506 <refsect2>
507 <title>RecoveryGracePeriod</title>
508 <para>Default: 120</para>
509 <para>
510 During recoveries, if a node has not caused recovery failures
511 during the last grace period in seconds, any records of
512 transgressions that the node has caused recovery failures will be
513 forgiven. This resets the ban-counter back to zero for that node.
514 </para>
515 </refsect2>
516
517 <refsect2>
518 <title>RepackLimit</title>
519 <para>Default: 10000</para>
520 <para>
521 During vacuuming, if the number of freelist records are more than
522 <varname>RepackLimit</varname>, then the database is repacked
523 to get rid of the freelist records to avoid fragmentation.
524 </para>
525 <para>
526 Databases are repacked only if both <varname>RepackLimit</varname>
527 and <varname>VacuumLimit</varname> are exceeded.
528 </para>
529 </refsect2>
530
531 <refsect2>
532 <title>RerecoveryTimeout</title>
533 <para>Default: 10</para>
534 <para>
535 Once a recovery has completed, no additional recoveries are
536 permitted until this timeout in seconds has expired.
537 </para>
538 </refsect2>
539
540 <refsect2>
541 <title>Samba3AvoidDeadlocks</title>
542 <para>Default: 0</para>
543 <para>
544 If set to non-zero, enable code that prevents deadlocks with Samba
545 (only for Samba 3.x).
546 </para> <para>
547 This should be set to 1 only when using Samba version 3.x
548 to enable special code in ctdb to avoid deadlock with Samba
549 version 3.x. This code is not required for Samba version 4.x
550 and must not be enabled for Samba 4.x.
551 </para>
552 </refsect2>
553
554 <refsect2>
555 <title>SeqnumInterval</title>
556 <para>Default: 1000</para>
557 <para>
558 Some databases have seqnum tracking enabled, so that samba will
559 be able to detect asynchronously when there has been updates
560 to the database. Everytime a database is updated its sequence
561 number is increased.
562 </para>
563 <para>
564 This tunable is used to specify in milliseconds how frequently
565 ctdb will send out updates to remote nodes to inform them that
566 the sequence number is increased.
567 </para>
568 </refsect2>
569
570 <refsect2>
571 <title>StatHistoryInterval</title>
572 <para>Default: 1</para>
573 <para>
574 Granularity of the statistics collected in the statistics
575 history. This is reported by 'ctdb stats' command.
576 </para>
577 </refsect2>
578
579 <refsect2>
580 <title>StickyDuration</title>
581 <para>Default: 600</para>
582 <para>
583 Once a record has been marked STICKY, this is the duration in
584 seconds, the record will be flagged as a STICKY record.
585 </para>
586 </refsect2>
587
588 <refsect2>
589 <title>StickyPindown</title>
590 <para>Default: 200</para>
591 <para>
592 Once a STICKY record has been migrated onto a node, it will be
593 pinned down on that node for this number of milliseconds. Any
594 request from other nodes to migrate the record off the node will
595 be deferred.
596 </para>
597 </refsect2>
598
599 <refsect2>
600 <title>TakeoverTimeout</title>
601 <para>Default: 9</para>
602 <para>
603 This is the duration in seconds in which ctdb tries to complete IP
604 failover.
605 </para>
606 </refsect2>
607
608 <refsect2>
609 <title>TDBMutexEnabled</title>
610 <para>Default: 0</para>
611 <para>
612 This paramter enables TDB_MUTEX_LOCKING feature on volatile
613 databases if the robust mutexes are supported. This optimizes the
614 record locking using robust mutexes and is much more efficient
615 that using posix locks.
616 </para>
617 </refsect2>
618
619 <refsect2>
620 <title>TickleUpdateInterval</title>
621 <para>Default: 20</para>
622 <para>
623 Every <varname>TickleUpdateInterval</varname> seconds, ctdb
624 synchronizes the client connection information across nodes.
625 </para>
626 </refsect2>
627
628 <refsect2>
629 <title>TraverseTimeout</title>
630 <para>Default: 20</para>
631 <para>
632 This is the duration in seconds for which a database traverse
633 is allowed to run. If the traverse does not complete during
634 this interval, ctdb will abort the traverse.
635 </para>
636 </refsect2>
637
638 <refsect2>
639 <title>VacuumFastPathCount</title>
640 <para>Default: 60</para>
641 <para>
642 During a vacuuming run, ctdb usually processes only the records
643 marked for deletion also called the fast path vacuuming. After
644 finishing <varname>VacuumFastPathCount</varname> number of fast
645 path vacuuming runs, ctdb will trigger a scan of complete database
646 for any empty records that need to be deleted.
647 </para>
648 </refsect2>
649
650 <refsect2>
651 <title>VacuumInterval</title>
652 <para>Default: 10</para>
653 <para>
654 Periodic interval in seconds when vacuuming is triggered for
655 volatile databases.
656 </para>
657 </refsect2>
658
659 <refsect2>
660 <title>VacuumLimit</title>
661 <para>Default: 5000</para>
662 <para>
663 During vacuuming, if the number of deleted records are more than
664 <varname>VacuumLimit</varname>, then databases are repacked to
665 avoid fragmentation.
666 </para>
667 <para>
668 Databases are repacked only if both <varname>RepackLimit</varname>
669 and <varname>VacuumLimit</varname> are exceeded.
670 </para>
671 </refsect2>
672
673 <refsect2>
674 <title>VacuumMaxRunTime</title>
675 <para>Default: 120</para>
676 <para>
677 The maximum time in seconds for which the vacuuming process is
678 allowed to run. If vacuuming process takes longer than this
679 value, then the vacuuming process is terminated.
680 </para>
681 </refsect2>
682
683 <refsect2>
684 <title>VerboseMemoryNames</title>
685 <para>Default: 0</para>
686 <para>
687 When set to non-zero, ctdb assigns verbose names for some of
688 the talloc allocated memory objects. These names are visible
689 in the talloc memory report generated by 'ctdb dumpmemory'.
690 </para>
691 </refsect2>
692
693 </refsect1>
694
695 <refsect1>
696 <title>SEE ALSO</title>
697 <para>
698 <citerefentry><refentrytitle>ctdb</refentrytitle>
699 <manvolnum>1</manvolnum></citerefentry>,
700
701 <citerefentry><refentrytitle>ctdbd</refentrytitle>
702 <manvolnum>1</manvolnum></citerefentry>,
703
704 <citerefentry><refentrytitle>ctdbd.conf</refentrytitle>
705 <manvolnum>5</manvolnum></citerefentry>,
706
707 <citerefentry><refentrytitle>ctdb</refentrytitle>
708 <manvolnum>7</manvolnum></citerefentry>,
709
710 <ulink url="http://ctdb.samba.org/"/>
711 </para>
712 </refsect1>
713
714 <refentryinfo>
715 <author>
716 <contrib>
717 This documentation was written by
718 Ronnie Sahlberg,
719 Amitay Isaacs,
720 Martin Schwenke
721 </contrib>
722 </author>
723
724 <copyright>
725 <year>2007</year>
726 <holder>Andrew Tridgell</holder>
727 <holder>Ronnie Sahlberg</holder>
728 </copyright>
729 <legalnotice>
730 <para>
731 This program is free software; you can redistribute it and/or
732 modify it under the terms of the GNU General Public License as
733 published by the Free Software Foundation; either version 3 of
734 the License, or (at your option) any later version.
735 </para>
736 <para>
737 This program is distributed in the hope that it will be
738 useful, but WITHOUT ANY WARRANTY; without even the implied
739 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
740 PURPOSE. See the GNU General Public License for more details.
741 </para>
742 <para>
743 You should have received a copy of the GNU General Public
744 License along with this program; if not, see
745 <ulink url="http://www.gnu.org/licenses"/>.
746 </para>
747 </legalnotice>
748 </refentryinfo>
749
750</refentry>
Note: See TracBrowser for help on using the repository browser.