Skip to main content

Aerospike Debugging

1) for read latency
asloglatency -h {NAMESPACE}-read -f -7200
asloglatency -h {NAMESPACE}-write -f 'Apr 17 2019 16:00:00' -l aerospike.log-20190418 

2) for cluster network conection error
grep CLUSTER /var/log/aerospike/aerospike.log|grep -v "CLUSTER-SIZE 12"
grep "departed node" /var/log/aerospike/aerospike.log
grep "in-progress" /var/log/aerospike/aerospike.log|grep -v "tsvc-q 0"
grep "in-progress" /var/log/aerospike/aerospike.log|grep -v "rw-hash 0 proxy-hash 0"

3)for expiry,eviction
grep "(nsup)" /var/log/aerospike/aerospike.log|grep "Total time"|grep -E "[0-9]{4,9} ms"
If this kind of warning is found in log:
WARNING (nsup): (thr_nsup.c:1044) {NAMESPACE} no records below eviction void-time 299051849 - threshold bucket 0, width 260 sec, count 51354 > target 14699 (0.5 pct)
then  evict-hist-buckets should be increased and also increase evict-tenths-pct. default value is 5( 0.5%).
verify the bucket size: asinfo -v namespace/NAMESPACE -l|grep bucket
then increase evict-hist-buckets number
asadm -e "asinfo -v 'set-config:context=namespace;id=NAMESPACE;evict-hist-buckets=100000'"
asadm -e "asinfo -v 'set-config:context=namespace;id=NAMESPACE;evict-tenths-pct=10'"

4)for error
grep -E "ERROR|WARN" /var/log/aerospike/aerospike.log
grep "hwm" /var/log/aerospike/aerospike.log
grep -E "ERROR|WARN" /var/log/aerospike/aerospike.log|grep -oE "GMT:.*"|sort -n|uniq -c|sort -n
4) config
asinfo -v "get-config:" -l|grep "proto"
asinfo -v namespace/NAMESPACE -l
asinfo -v "set-config:context=service;proto-fd-max=100000"
asinfo -v "set-config:context=namespace;id=test;high-water-memory-pct=50"
or asadm -e "asinfo -v 'set-config:context=namespace;id=test;high-water-memory-pct=50'"
for disk hwm:
asadm -e "asinfo -v 'set-config:context=namespace;id=test;high-water-disk-pct=50'"
note: "id" is name of namespace here.

5) network connections
netstat -an|grep tcp|wc -l
netstat -an|grep tcp|awk '{print $5}'|grep -oE ".*:"|sort -n|uniq -c|sort -n
netstat -an|grep tcp|awk '{print $6}'|sort -n|uniq -c|sort -n
ss|awk '{print $2}'|sort -n|uniq -c|sort -n

Comments

Popular posts from this blog

On Divisibility of Numbers

There are some rules to check that a given number is divisible by a number without actual division. e.g. to check if a given number is divisible by 2, you have just check the last digit is even or not. Similarly for 3 , if the sum of digit of any given number is divisible by 3 then the number will also be divisible by 3. One day I was thinking that if there is some generalized rule for every number. Here is some interesting thing I found out. Suppose we have to test divisibility by 17. Let us check whether 4913 is divisible by 17 or not. Here is the rule:- Step 1) :- found out multiple of the number( in this case 17) which ends with 1 or 9. 17 X 3 = 51 ends with 1. Step 2) :- strip the last digit . so we got 5 here. Step 3) :- take the last digit of 4913 which is 3. multiply it by 5 3X5=15. Remove the last digit from 4913 and subtract 15 from it. 491-15 = 476 again repeat this on 476 47 -...

Retirement Pension calculation

Calculation of how much you need  to save for pension  is not magic. It can be expressed by a simple equation like this: Assuming 4% inflation* and your current monthly expenditure is 1 lakh. for calculating life expetency you can refer: https://twitter.com/srikundansingh/status/1147423727753187328 This is table for monthly saving you need: Current Age Retirement Age life expectancy Interest rate % Monthly saving needed 30 40 80 6 612216 30 40 80 8 443951 30 40 80 10 333052 30 40 80 12 255669 30 40 90 6 962869 30 40 90 8 690015 30 40 90 10 513540 30 40 90 12 391969 30 40 100 6 1487250 30 40 100 8 1056611 30 40 100 10 781885 30 40 100 12 594362 30 40 110 6 2272055 30 40 110 8 1603538 30 40 110 10 1181492 30 40 110 12 895401 30 45 80 6 331079 30 45 80 8 226990 30 45 80 10 160033 30 45 80 12 114896 30 45 90 6 527922 30 45 90 8 356871 30 45 90 10 249194 30 45 90 12 177667 30 45 100 6 821839 30 45 100 8 549996 30 45 100 10 38...