https://bugzilla.wikimedia.org/show_bug.cgi?id=52829
--- Comment #10 from Ori Livneh <o...@wikimedia.org> --- (In reply to comment #8) > So, because this checked against the list we already have, > $wgSquidServersNoPurge, which is currently 225 entries of single IPs, this > ran > a CIDR match up to 225 times, which in turn increased the appserver load by > about 20-30% -- the CPU cost could be differ a lot depending on hour of the > day > (-> service region -> datacenter -> list order :)). > > This was deployed yesterday and we had to revert today, which brought > appservers down from 80% to 50% usage and API appservers from 60% to 30%. > > Reedy optimized this check with https://gerrit.wikimedia.org/r/#/c/95163/ > which > Antoine reviewed and merged, but hasn't deployed yet. We could also reduce > our > load in another way, by aggregating our list to CIDR and cutting it down to > 10-15 entries at most (which was the original intention anyway). > > Since the isInRange seems to be expensive, though, I'd feel more comfortable > if > someone took a closer look and optimized the call (e.g. by making it be > *just* > CIDR with a simple bitwise operation, not ranges in general) and/or made a > separate array for CIDR ranges as it sounds pretty silly to do such expensive > checks on what is known to have been a list of single IP addresses until now. Faidon, thanks very much for investigating; I should have reviewed this more carefully. -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l