With T166802, T177017 and their subtasks, the filter profiling is slowly being re-added to wikis. In fact, from the time it was disabled, it's now more performant and will possibly be even better after patches like this will be merged. So I'm proposing to set both $wgAbuseFilterProfile and $wgAbuseFilterRuntimeProfile true by default (and also rename them), to give a heavy help to filter mantainers. Of course, the patch itself is straightforward to write, but I'd first like to hear some thoughts, although I think the reasons that caused profiling to be disabled don't exist anymore. Adding as subscribers some people from previous related tasks.
Current status (Jan 24th)
Profiling is now enabled everywhere in production. We should wait a couple of weeks to see if any problem arises, especially the ones outlined in https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/AbuseFilter/+/211951/. If everything is fine, the next step is https://gerrit.wikimedia.org/r/486279 + https://gerrit.wikimedia.org/r/486280 to remove the global from AbuseFilter and WMF config.
In the meanwhile, we have to understand whether enabling $wgAbuseFilterRuntimeProfile everywhere would be safe. If so, we should then follow a similar process: enable it for every wiki, wait a couple of weeks, then if everything is fine remove it from AbuseFilter and WMF config. Regardless of this, https://gerrit.wikimedia.org/r/486284 should be merged to add some more light stats.
Questions for Performance-Team
- Is Xenon happy with profiling, currently enabled everywhere? The recording method is AbuseFilter::recordProfilingResult, and what it does is get and set 3 stash keys for every active filter for every action (edit, move, delete, account (auto)creation and upload), in a deferredupdate. (See "future plans" below for improvements)
- Would Graphite be OK with new profiling data from every wiki? The recording method is AbuseFilter::recordRuntimeProfilingResult, and what it does is update 3 statsd keys for every edit. See here a list of wikis where this is already in place.
Future plans
The final goal of this task is to have all profiling enabled by default and drop profiling globals. Once that will be done, patches like https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/AbuseFilter/+/478232/ will be easier to write and, starting with https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/AbuseFilter/+/201104/, we'll add profiling data on-wiki, possibly making it more efficient. The latter will also change the profiling system so that recordProfilingResult will only use a single stash key for every filter.