[ https://bro-tracker.atlassian.net/browse/BIT-1547?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=25303#comment-25303 ]
Justin Azoff commented on BIT-1547: ----------------------------------- Merged.. Can you see about merging master back into topic/mfischer/broctl-broker? This latest change conflicts. I was able to just apply the config.py diff but the install.py change has issues. > broctl sets the same state variables over and over > -------------------------------------------------- > > Key: BIT-1547 > URL: https://bro-tracker.atlassian.net/browse/BIT-1547 > Project: Bro Issue Tracker > Issue Type: Problem > Components: BroControl > Affects Versions: git/master > Reporter: Justin Azoff > Assignee: Justin Azoff > Fix For: 2.5 > > > 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 > {code} > # Set a dynamic state variable. > def set_state(self, key, val): > key = key.lower() > if self.state.get(key) == val: > return > self.state[key] = val > self.state_store.set(key, val) > {code} > Seemed to mostly fix it, aside from this: > {code} > Set manager-port to 47760 > Set manager-port to 47761 > Set manager-port to 47760 > Set manager-port to 47761 > Set manager-port to 47760 > Set manager-port to 47761 > Set manager-port to 47760 > Set manager-port to 47761 > Set manager-port to 47760 > Set manager-port to 47761 > Set manager-port to 47760 > Set manager-port to 47761 > {code} > 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. -- This message was sent by Atlassian JIRA (v7.2.0-OD-05-022#72002) _______________________________________________ bro-dev mailing list bro-dev@bro.org http://mailman.icsi.berkeley.edu/mailman/listinfo/bro-dev