zendesk / ultragrep

the grep that greps the hardest.
Apache License 2.0
29 stars 4 forks source link

Add austerity mode to parser. option --austerity-mode governs whether or... #30

Open broberts-zd opened 10 years ago

broberts-zd commented 10 years ago

... not the program will do a load average check prior to running

vanchi-zendesk commented 10 years ago

I like this!

cc @osheroff

mfischer-zd commented 10 years ago

It's not OS-independent, though. This is a Linux-specific way of gathering load average and the number of CPUs. If a Gem exists that can obtain system facts in an OS-independent way, I'd use that instead.

mfischer-zd commented 10 years ago

Also I think run policy is better enforced elsewhere, like in a wrapper script.

broberts-zd commented 10 years ago

Typically this should be done in a wrapper script in accordance with separation of concerns between general functionality of the app (mostly developers province) and the specific operational reality of our environment (mostly ops). But but but.... I think we are going to have to go with this austerity option anyway. We need to add something to ultragrep to prevent it from driving up the load average too much. 7% of our PD alerts come from ultragrep running the way it currently does - and adding this load check to prevent it from running won't solve the issue. Just one instance of ultragrep (I think) will set off alerts. What I proposed here was just the first part of --austerity-mode, I was planning to also limit its resource usage (see op-5030).

Another concern is: should this be in the open source version of ultragrep? If not, just fork.