puppet-gluster icon indicating copy to clipboard operation
puppet-gluster copied to clipboard

Custom facts provided by module slow and thrash glusterd

Open sammcj opened this issue 7 years ago • 3 comments

The custom facts for the volumes / bricks that this module provides causes gluster volume info and gluster volume status to be called every time the facts are calculated, this may be the cause of #86.

Both the gluster volume status and gluster volume info commands are not designed to be run frequently as they query every node in the cluster along with volume metadata and do create quite a bit of load on the cluster.

On a small cluster with 120 volumes, this puppet module takes over 2.5 minutes just loading facts.

As such, if you have a three node cluster, with each node running puppet every 10 minutes it means that every 10 minutes you're spending 7 minutes just in facter.

I don't have a solution for this, but I don't think people should be constantly running these commands across their clusters, I did just find the gluster get-state command which dumps the state of the cluster out to a local file and is very fast - perhaps this could be used instead?

root@int-gluster-01:~ # time facter -p
real	2m8.956s
user	0m8.099s
sys	0m0.603s

vs

root@int-gluster-01:~ # time gluster get-state
glusterd state dumped to /var/run/gluster/glusterd_state_20170913_160143

real	0m0.471s
user	0m0.010s
sys	0m0.004s

sammcj avatar Sep 13 '17 06:09 sammcj