[Gluster-devel] timer wheel for object expiry?

Jeff Darcy jdarcy at redhat.com
Tue Dec 16 20:35:55 UTC 2014


> For BitRot[1] there's a need to track objects (files) for inactivity
> for a certain period of time (after release()). I was considering
> using timer wheel[2] to track object expiry as it's proven to be
> scalable and used by the linux kernel. This could even be beneficial
> as GlusterFS timer subsystem which is currently add:O(N)/expiry:O(1).
> 
> I have a test code (that works at seconds granularity) and borrows
> much of the code from the linux kernel. I've put it up here:
> https://github.com/vshankar/timer-wheel
> 
> The other option would be to use rbtree, but I guess the "cascading"
> logic in timer wheel is much more simpler and suited for
> cancellations.

+1

This is an extremely well proven way to deal with very large numbers
of timers efficiently.


More information about the Gluster-devel mailing list