Skip to content

Instantly share code, notes, and snippets.

@vishnu2kmohan
Last active May 1, 2017 18:54
Show Gist options
  • Select an option

  • Save vishnu2kmohan/ad378adbb70bf2297caf3baac8c06801 to your computer and use it in GitHub Desktop.

Select an option

Save vishnu2kmohan/ad378adbb70bf2297caf3baac8c06801 to your computer and use it in GitHub Desktop.
Troubleshoot Zookeeper and Bouncer

Check Disk Latency

time dd if=/dev/zero of=/var/lib/dcos/exhibitor/dd_test bs=1M count=1024 oflag=direct && rm /var/lib/dcos/exhibitor/dd_test

Monitor iostat -p sda -m -x 1 while the dd runs.

Check CPU flags for Crypto Acceleration

cat /proc/cpuinfo

Run openssl speed

Check DNS Name Resolution

Check Reverse Lookup of a Master's IP from another node in the cluster

python -m timeit -n 10 "import socket" "socket.gethostbyaddr('<IP_address_of_another_master>')"

Check Zookeeper Lock Performance

python -m timeit -n 10 -s "from kazoo.client import KazooClient" "zk = KazooClient('zk-1.zk:2181,zk-2.zk:2181,zk-3.zk:2181,zk-4.zk:2181,zk-5.zk:2181') ; zk.start() ; lock = zk.Lock('/test_lock', 'TestLock') ; lock.acquire() ; lock.release() ; zk.stop()"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment