Monday, 26 May 2014

GSOC Week 1 : Getting hands dirty

The primary job in the coming days according to the timeline suggested in the accepted proposal is to identify the counters present in different xlators in the Gluster's inverted graph and standardize the stats that would be available only at one end point in the application. 

With this regard, Anand Avati, a longtime contributor to Gluster has advised me to look into the meta xlator which is already storing some stats like latency measurement and fop count. The meta xlator lies at the top of the graph, hence it's the ideal location to gather overall latency of a request given to gluster. Based on my experience in testing meta, I've found that meta xlator when realised on a running mounted volume, consists purely of virtual files. In order to enable latency measurement, you have to do "echo 1 > $MNT/.meta/measure_latency". Don't forget to put a '-n' after echo other wise the file receives an input of "1\n" which leads to an incorrect write. I realised this after spending quite some time evaluating the variable contents by debugging glusterfs with gdb. A redacted output of this can be found at

So the basic idea right now is to read up all the xlators and document which stats each of it is storing and hence provide access to this information in a standardized manner.