Lucas_Werkmeister_WMDE added a comment.

One thing that could also be tweaked in that code is to track the last timestamp an entry was touched and prune ones older than a certain number of days. For busy regexes, that stops long-tail cruft from accumulating and reduce memcached I/O in bytes.

If I understand correctly, that would help if we had some regexes that are frequently used (so the entire cache map is never evicted), but only with less than 100 values, so the bottom of the cache map would be a handful of stale, rarely-used values. I don’t think that’s a likely scenario right now (though it might be something to think about if we significantly increase the max size).

Another thing to tune would be the max size.

Yeah, I’ll make it configurable (and add tracking to see how often the $textHash was found in the cache map).


TASK DETAIL
https://phabricator.wikimedia.org/T173696

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Lucas_Werkmeister_WMDE
Cc: Krinkle, aaron, gerritbot, Ladsgroup, daniel, Aklapper, Jonas, Lucas_Werkmeister_WMDE, Lordiis, GoranSMilovanovic, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, QZanden, Lewizho99, Maathavan, Agabi10, Izno, Wikidata-bugs, aude, Mbch331
_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to