[Gluster-devel] lookup caching

Olivier Le Cam Olivier.LeCam at crdp.ac-versailles.fr
Sun Apr 11 08:42:04 UTC 2010

Hi -

Raghavendra G wrote:

> you can do that by sending the cached stats (here stat of file, stat of 
> parent directory) through STACK_UNWIND.
> STACK_UNWIND_STRICT (lookup, frame, 0, 0, loc->inode, cached_stat, NULL, 
> parent_stat);
> you can look into libglusterfs/src/defaults.c for default definitions of 
> each of fop (file operations) and their call backs.

Thank you. I have been able to get a (quick and dirty) stats lookups 
caching translator working. I still not well understand everything with 
the GlusterFS internal library, most of the caching job is done by my 
own code.

Anyway, it is enough at this step to make some benchmarkings with and to 
see if it is possible to improve performances significantly enough.

My first impression is quite mitigate. I can indeed see some 
improvements accessing small files: stats caching does its job. But for 
some reason, io-cache still talks with the servers before delivering a 
file, even if that file is available in its cache.

I can see three protocol calls:
	- client_open()		(to both servers)
	- client_stat()		(to one server only: load balancing?)
	- client_flush()	(to both servers)

This might be a problem with the implementation of my translator which 
only override "lookup" calls for now.

My source code is attached (please be soft on it: as said before, it's a 
quick and dirty hack of the rot-13 translator).

I'd like to get rid of any traffic with the servers when the file is 
available in the io-cache. That way I could really see if such a 
translator can be of any interest.

Do you have any idea for achieving this goal?

Thanks and best regards,
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: rot-13.c
URL: <http://supercolony.gluster.org/pipermail/gluster-devel/attachments/20100411/c92a3ac5/attachment-0003.c>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: rot-13.h
URL: <http://supercolony.gluster.org/pipermail/gluster-devel/attachments/20100411/c92a3ac5/attachment-0003.h>

More information about the Gluster-devel mailing list