|
Name of parameter |
Description |
| ClientPort
|
The client connects to the server's port, which is the external service port, and is typically set to 2181.
|
|
DataDir |
The directory where the snapshot file snapshot is stored. By default, the transaction log is also stored here. It is recommended to configure parameter Datalogdir at the same time, and write performance of transaction log directly affects ZK performance. |
| Ticktime
|
A time unit in the ZK. All time in ZK is based on this time unit and is configured in integer multiples. For example, the minimum time-out period for a session is 2*ticktime.
|
|
Datalogdir |
The transaction log output directory. Try to configure a separate disk or mount point for the output of the transaction log, which will greatly improve ZK performance.
(No Java system property) |
| Globaloutstandinglimit
|
Maximum number of request stacks. The default is 1000. While ZK is running, the server is still allowing clients to submit requests to the server to improve throughput performance, although it has no idle time to handle more client requests. Of course, in order to prevent server memory overflow, this request backlog number still need to be under the limit.
(Java system property:zookeeper.globaloutstandinglimit. )
|
|
Preallocsize |
Pre-open disk space for subsequent writes to the transaction log. The default is 64M, and each transaction log size is 64M. If ZK has a large snapshot frequency, it is advisable to reduce this parameter appropriately. (Java system Property:zookeeper.preallocsize ) |
| Snapcount
|
Once a snapshot (snapshot) is triggered for each snapcount transaction log output, ZK generates a snapshot.* file and creates a new transaction log file log.*. The default is 100000. (In a real code implementation, some random number processing is performed to prevent all servers from taking snapshots at the same time to affect performance) (Java system property:Zookeeper.snapcount )
|
|
Tracefile |
Log that is used to log all requests, which can be used during general debugging, but is not recommended for production environments and can seriously affect performance. (Java system property:?) requesttracefile ) |
| Maxclientcnxns
|
The limit on the number of connections between a single client and a single server is IP-level, default is 60, and if set to 0, there is no limit. Please note that this limitation is only limited by the number of connections between a single client machine and a single ZK server, not the specified client IP, nor the number of connections to the ZK cluster, nor the number of connections to all clients by a single ZK. Specify the client IP throttling policy, here's a patch that you can try: http://rdc.taobao.com/team/jm/archives/1334 (No Java system property)
|
|
Clientportaddress |
For multi-NIC machines, you can specify a different listening port for each IP. By default, all IPs are listening on the port specified by clientport . New in 3.3.0 |
| Minsessiontimeoutmaxsessiontimeout
|
Session timeout limit, if the client set timeout time is not in this range, then it will be forced to set to the maximum or minimum time. The default session timeout is 2 * Ticktime * ticktime this range New in 3.3.0
|
|
Fsync.warningthresholdms |
When the transaction log is output, if the call to the Fsync method exceeds the specified time-out, a warning message is output in the log. The default is 1000ms. (Java system Property: Fsync.warningthresholdms ) New in 3.3.4 |
| Autopurge.purgeinterval
|
As mentioned above, 3.4.0 and later versions, ZK provides the ability to automatically clean up the transaction log and snapshot files, this parameter specifies the cleanup frequency, in hours, the need to configure a 1 or larger integer, the default is 0, that does not turn on the automatic cleanup function. (No Java system property) New in 3.4.0
|
|
Autopurge.snapretaincount |
This parameter is used in conjunction with the above parameter, which specifies the number of files that need to be preserved. The default is to keep 3. (No Java system property) New in 3.4.0 |
| Electionalg
|
In previous releases, this parameter configuration allowed us to choose the leader election algorithm, but since in later versions only a "tcp-based version of fast leader election" algorithm was left, this parameter does not seem to work at the moment, This is not a detailed expansion of the said. (No Java system property)
|
|
Initlimit |
Follower during the boot process, all the latest data is synchronized from leader, and then the starting state of the external service is determined. Leader allows F to complete this work within Initlimit time. Normally, we don't have to be too concerned with setting this parameter. If the data volume of the ZK cluster is indeed very large, f at startup, the time to synchronize data from the leader will be correspondingly longer, so in this case it is necessary to adjust this parameter appropriately. (No Java system property) |
| Synclimit
|
During the operation, leader is responsible for communicating with all the machines in the ZK cluster, for example, through some heartbeat detection mechanisms, to detect the machine's survival status. If L make a heartbeat packet after Synclimit and have not received a response from F, then I think this f is out of line. Note: Do not set this parameter too large, or it may obscure some problems. (No Java system property)
|
|
Leaderserves |
By default, leader accepts client connections and provides normal read and write services. However, if you want leader to focus on the coordination of the machines in the cluster, you can set this parameter to no, which greatly improves the performance of the write operation. (Java system Property:zookeeper. leaderserves ). |
| SERVER.X=[HOSTNAME]:NNNNN[:NNNNN]
|
The x here is a number that is consistent with the ID in the myID file. On the right can be configured with two ports, the first port for data synchronization between F and L and other communication, the second port is used to leader voting communication during the election process.
(No Java system property)
|
|
group.x=nnnnn[:nnnnn]weight.x=nnnnn |
For machine grouping and weight setting, see here (No Java system property) |
| Cnxtimeout
|
Leader during an election, the time-out period for opening a connection is 5s by default. (Java system Property:zookeeper. cnxtimeout )
|
|
Zookeeper. Digestauthenticationprovider
. superdigest |
ZK permission settings are related, see " using Super identity to operate on privileged nodes " and " ZooKeeper permission Control " |
| Skipacl
|
No ACL checks are made on all client requests. If a permission limit is set on the previous node, it will be invalidated once the start is opened on the server. (Java system Property: Zookeeper.skipacl )
|
|
Forcesync |
This parameter determines whether you need to call filechannel. Force to ensure that the data is fully synchronized to disk when the transaction log commits. (Java system Property: Zookeeper.forcesync ) |
| Jute.maxbuffer
|
The maximum amount of data per node is 1M by default. This restriction must be set on both the server and client side to take effect. (Java system Property: Jute.maxbuffer )
|