from old forum Post by Hanson » Fri Aug 08, 2014 2:43 am
Aerospike 3.3.12 with In-Memory + Disk Persistence. Running local C client with 4 threads, with/without LDT Bin (using lmap for sub-records with 1KB size of bytes).
Traffic: Write at 10K TPS
Without LDT Bin, it’s normal. With LDT Bin: Before aerospike_query_foreach() invoked, the average Write latency is 0.40ms. After aerospike_query_foreach() invoked, the average Write latency is 0.50ms, and keeps there even no more aerospike_query_foreach() invoked . It never drops back to 0.40ms. The aerospike_query_foreach() was completed very fast (in 10ms, with 1100 records retuned by callback).
Here is the piece of C client code:
…
as_query query;
as_query_init(&query, db_name, table_name);
as_query_where_inita(&query, 1);
as_query_where(&query, "bucket", integer_equals(10888));
as_error err;
if (aerospike_query_foreach(connection, &err, NULL, &query, query_callback, NULL) != AEROSPIKE_OK) {
printf("aerospike_query_foreach() failed: %d - %s\n", err.code, err.message);
}
…
I also observed that the CPU usage of Aerospike server process asd was unusual: “top –H” showed the CPU usage for one of the asd thread jumped from 86.6% to 96.8% (~10% higher), and keeps there.
Before aerospike_query_foreach() invoked:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
15729 root 20 0 52.6g 47g 1724 R 87.5 67.7 309:04.52 asd
15726 root 20 0 52.6g 47g 1724 R 86.6 67.7 311:28.27 asd
15731 root 20 0 52.6g 47g 1724 R 83.9 67.7 310:52.26 asd
15730 root 20 0 52.6g 47g 1724 R 83.6 67.7 309:47.62 asd
16840 ainet 20 0 357m 1988 1368 S 15.3 0.0 0:01.94 dbtest
16841 ainet 20 0 357m 1988 1368 S 15.3 0.0 0:01.93 dbtest
16842 ainet 20 0 357m 1988 1368 S 15.3 0.0 0:01.94 dbtest
16843 ainet 20 0 357m 1988 1368 S 15.3 0.0 0:01.94 dbtest
15604 root 20 0 52.6g 47g 1724 S 5.3 67.7 24:29.59 asd
15601 root 20 0 52.6g 47g 1724 S 2.0 67.7 10:32.64 asd
15725 root 20 0 52.6g 47g 1724 S 0.7 67.7 19:01.29 asd
After aerospike_query_foreach() invoked:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
15726 root 20 0 52.0g 47g 1724 R 96.8 66.8 310:40.19 asd
15729 root 20 0 52.0g 47g 1724 R 62.3 66.8 308:29.90 asd
15731 root 20 0 52.0g 47g 1724 R 62.0 66.8 310:18.01 asd
15730 root 20 0 52.0g 47g 1724 S 61.0 66.8 309:13.39 asd
16805 ainet 20 0 791m 14m 1488 R 14.6 0.0 0:10.81 dbtest
16806 ainet 20 0 791m 14m 1488 S 14.6 0.0 0:10.83 dbtest
16808 ainet 20 0 791m 14m 1488 S 14.6 0.0 0:10.82 dbtest
16807 ainet 20 0 791m 14m 1488 S 14.3 0.0 0:10.81 dbtest
15604 root 20 0 52.0g 47g 1724 S 4.3 66.8 24:27.68 asd
15601 root 20 0 52.0g 47g 1724 S 1.7 66.8 10:31.79 asd
15661 root 20 0 52.0g 47g 1724 S 1.7 66.8 0:09.80 asd