memaslap reports wrong statistics when SET is 0

Bug #2043553 reported by Igor
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libmemcached
New
Undecided
Unassigned

Bug Description

When set is 0 the memaslap populates server/s with keys/values--performs a lot of SET operations.
Right after the population stage the actual test begins and memaslap performs a lot of only GET operations (only GETs as set is 0).
However, when memaslap generates statistics for the test, it counts both the SET and the GET operations, including the SET operations of the population stage. As a result, it reports wrong throughput and transaction/second.

In ms_print_memslap_stats() it prints the statistics as follows:
(ms_stats.cmd_get+ms_stats.cmd_set)/test_time = transaction/second
(ms_stats.bytes_written + ms_stats.read)/test_time = throughput

And of course, these numbers are wrong as they include the SET operations and the written bytes of the population stage while test time is the time of the GET operations.

Attached is an example report of the test of 128 bytes values, set is 0, 16 threads, and test ran for 65 seconds. Note, that the population stage took around 16 minutes---see the huge cmd_set counter.
It reports 4M transactions/second and 659 MB/s when in fact the real performance is ~500K transactions/second and ~55 MB/s.

Revision history for this message
Igor (xrevolver) wrote :
description: updated
Revision history for this message
Igor (xrevolver) wrote :

Tested on libmemcached-1.0.18

Revision history for this message
Igor (xrevolver) wrote :

I am not really familiar with the memaslap internals but here is a simple fix that works for me.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.