I happened to notice broctl check on one of our test boxes was slow. traced it to sqlite commits() being very slow. Then noticed that broctl seems to call set_state() with the same key, val over and over again... once for each worker.. so a few thousand sets just to run broctl check.
Changing set_state to
Seemed to mostly fix it, aside from this:
any idea why that is flipping around like that?
We should possibly add a way for broctl to update state vars without calling commit where it knows it will be setting a large number of state vars in a loop.