zoopkeeper profile

Transfer blog Park @ sweeping ape : https://www.cnblogs.com/likui360/p/5985588.html

 

parameter name

Explanation

clientPort

The client connects to the server port, that port external services, usually set to 2181 bar.

dataDir

Directory stores a snapshot of the file snapshot. By default, the transaction log will be stored here. Also the configuration parameters dataLogDir, write performance directly affects the transaction log zk performance.

tickTime

ZK is a unit of time. All times are ZK to this time unit basis, multiplied by an integer configured. For example, the minimum time-out session is 2 * tickTime.

dataLogDir

The transaction log output directory. Try to configure a separate disk or mount point to the output from the transaction log, which will greatly enhance the performance of ZK.  
(No  the Java  System Property)

globalOutstandingLimit

The maximum number of requests pile up. The default is 1000. ZK running time, although server has no free to handle more client requests, but still allows clients to submit requests to the server up to improve the throughput performance. Of course, in order to prevent memory overflow Server, the request still need to limit the number of accumulation under.  
(The Java System Property: zookeeper.globalOutstandingLimit.  )

preAllocSize

Pre-open disk space for subsequent written to the transaction log. The default is 64M, each transaction log size is 64M. If the snapshot ZK greater frequency, it is recommended to reduce the appropriate parameter. (The Java System Property: zookeeper.preAllocSize  )

snapCount

SnapCount times after every transaction log output, triggering a snapshot (snapshot), this time, ZK will generate a snapshot. * Files, and create a new transaction log file log. *. The default is 100000. (real code implementation, conduct some random number, so as to avoid a snapshot of all servers at the same time affecting the performance) (the Java System Property: zookeeper.snapCount  )

traceFile

Used to record log of all requests, general debugging process can be used, but is not recommended for production environments, it will seriously affect performance. (The Java System Property :?  requestTraceFile  )

maxClientCnxns

Limit the number of connections between a single client and a single server, the ip level, default is 60, if set to 0, it indicates that no limitation thereto intended. Please note that this limitation of the scope of use, just limit the number of connections between a single client and a single machine ZK server, not for the specified client IP, nor to limit the number of connections ZK cluster, nor is it a single for all ZK limit the number of connected clients. Specify the client IP restriction policies, there is a patch, you can try: http://rdc.taobao.com/team/jm/archives/1334 (No the Java System Property)

clientPortAddress

For multi-card machines, you can specify a different listening port for each IP. By default, all IP listens  clientPort  specified port.  New in 3.3.0

minSessionTimeoutmaxSessionTimeout

Session timeout limit, if the timeout set by the client is not in this range, it will be forced to set a maximum or minimum time. The default timeout is in Session * 2   tickTime ~ 20 is the range * New in 3.3.0 tickTime

fsync.warningthresholdms

When the transaction log output, if you call fsync method than the specified timeout period, it will output a warning message in the log. The default is 1000ms. (The Java System Property:   fsync.warningthresholdms  ) New in 3.3.4

autopurge.purgeInterval

Already mentioned above, version 3.4.0 and later, ZK provides the ability to automatically clean up the transaction log, and the snapshot file, this parameter specifies the cleanup frequency, in hours, you need to configure an integer of 1 or greater, the default is 0, which means do not open the automatic cleaning function. (No the Java System Property)   New in 3.4.0

autopurge.snapRetainCount

This parameter and the above parameters with the use of this parameter specifies the number of files you want to keep. The default is to retain 3. (No the Java System Property)   New in 3.4.0

electionAlg

In previous releases, this parameter is configured to allow us to select leader election algorithm , but because in a future release, only leaving a "TCP-based version of fast leader election" algorithm, so this argument does not seem at present use, and does not expand in detail here say. (No Java system property)

initLimit

Follower在启动过程中,会从Leader同步所有最新数据,然后确定自己能够对外服务的起始状态。Leader允许F在 initLimit 时间内完成这个工作。通常情况下,我们不用太在意这个参数的设置。如果ZK集群的数据量确实很大了,F在启动的时候,从Leader上同步数据的时间也会相应变长,因此在这种情况下,有必要适当调大这个参数了。(No Java system property)

syncLimit

在运行过程中,Leader负责与ZK集群中所有机器进行通信,例如通过一些心跳检测机制,来检测机器的存活状态。如果L发出心跳包在syncLimit之后,还没有从F那里收到响应,那么就认为这个F已经不在线了。注意:不要把这个参数设置得过大,否则可能会掩盖一些问题。(No Java system property)

leaderServes

默认情况下,Leader是会接受客户端连接,并提供正常的读写服务。但是,如果你想让Leader专注于集群中机器的协调,那么可以将这个参数设置为no,这样一来,会大大提高写操作的性能。(Java system property: zookeeper. leaderServes )。

server.x=[hostname]:nnnnn[:nnnnn]

这里的x是一个数字,与myid文件中的id是一致的。右边可以配置两个端口,第一个端口用于F和L之间的数据同步和其它通信,第二个端口用于Leader选举过程中投票通信。  
(No Java system property)

group.x=nnnnn[:nnnnn]weight.x=nnnnn

对机器分组和权重设置,可以  参见这里(No Java system property)

cnxTimeout

Leader选举过程中,打开一次连接的超时时间,默认是5s。(Java system property: zookeeper.  cnxTimeout )

zookeeper.DigestAuthenticationProvider
.superDigest

ZK权限设置相关,具体参见  《  使用super  身份对有权限的节点进行操作 》  和  《 ZooKeeper   权限控制 

skipACL

对所有客户端请求都不作ACL检查。如果之前节点上设置有权限限制,一旦服务器上打开这个开头,那么也将失效。(Java system property:  zookeeper.skipACL )

forceSync

这个参数确定了是否需要在事务日志提交的时候调用 FileChannel .force来保证数据完全同步到磁盘。(Java system property: zookeeper.forceSync )

jute.maxbuffer

每个节点最大数据量,是默认是1M。这个限制必须在server和client端都进行设置才会生效。(Java system property: jute.maxbuffer )

Guess you like

Origin blog.csdn.net/ydeway/article/details/93857407
Recommended