Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
After updating i18n module from 1.10 to 1.11 [1] our cache hit rate (memcache) dropped from 98% to low/mid 70%. After reverting i18n module to 1.10 (with security patch applied) our cache hit rate went back up to 92%.
[1] We made several other security module updates at the same time, but the revert to 1.10 still increased cache hit rate significantly
Comments
Comment #1
Jose Reyero CreditAttribution: Jose Reyero commentedThanks for the data but this number by itself doesn't mean too much. That release introduces some new caching for i18n strings and it is possible that it just made your cache hit some limit.
If you can share more data on which are the cache misses, etc, that would be nice.
Comment #2
chevali CreditAttribution: chevali commentedI can confirm performance issues on node/add in secondary language, about 3x more time.
reverting to 1.10 fixes the issue
Comment #3
Jose Reyero CreditAttribution: Jose Reyero commentedOk, so we'll assume it was the new caching introduced in 7.x-1.11
It may be related to this one.. #2431017: Cache non translated strings
That should be fixed in next release.
Comment #4
gwynnebaer CreditAttribution: gwynnebaer commentedWe see something similar (thousands of cache_get()'s that never have anything "set"). On our site, we see something close to 25/sec cache_get()'s that "miss" (an active site with 5 languages enabled). We use memcached and the keys that are missing look like:
i18n:string:obj:menu:item:167725:title
The patch mentioned above caches textgroup's but not objects.
Is this intended? Why do we make so many cache_get()'s, never expecting to get anything back?
(Running 7.x-1.14)
Comment #5
joseph.olstad@gwynnebaer, can you please try the patch 1 from this related issue:
#2431017: Cache non translated strings
if this helps , please report back your findings.
Comment #6
joseph.olstadbetween 7.x-1.10 and 7.x-1.11 this issue was included, lots of new cache functions. Performance profiling would have to be done to compare the difference to see whether an actual improvement was made here.
#776146: A simple cache for i18nstrings_cache() to reduce queries
so I'm not sure if 7.x-1.11 was an actual performance improvement (or degregation).
However 7.x-1.12 introduced a table index , this was in all likelihood more of drastic improvement than the cache changes (or cache regressions depending on what a performance profiling analysis with xhprof would say), maybe compensated for what was added to 7.x-1.11
#1940532: Missing database index in locales_source for textgroup and context
if you really want to be a performance guru, you need to set up xhprof , a php performance profiling utility heavily improved by facebook engineers, it only works on Linux (or maybe mac) but if you're on windows, no xhprof for windows and if there is, good luck getting windows to work with xhprof.
Comment #7
gwynnebaer CreditAttribution: gwynnebaer commentedThe patch does not change the behavior for our site. I can run xhprof but what am I looking for?
Comment #8
joseph.olstadWith xhprof you are looking at latency stats, number of function calls, and if you have configured the image UT put it will highlight your bottleneck in a big red box , each box represents a function and lines to and from callers.
Essentially you run the xhprof before and after patching and compare statistics, this will tell you right away if the performance is improved or degraded before and after patch or code changes