Hello.
So we have a site with a fair number of variables, and indeed modules. We've been trying to reduce the amount of cache traffic and burden per page.
Turns out, the l10n_update_translation_status
variable gets really big... 150 modules = by far the biggest variable in the site, and loaded with cache_bootstrap on every page outside the page cache. This represents a reasonable amount of DB, cache and memory traffic (depending on architecture).
Check it out for yourselves: drush sqlq "select name, length(value) as size from variable order by size desc limit 10;"
My suggestion is this data is stored in bona fide cache table entries, because that is the correct place for this kind of information. Variables is the wrong place for this data IMHO, and has a disproportionate performance cost.
Thanks for your consideration.
Comment | File | Size | Author |
---|---|---|---|
#6 | l10n_update-status-cache-2622044-6.patch | 4.37 KB | Sutharsan |
Comments
Comment #2
Sutharsan CreditAttribution: Sutharsan commentedGood suggestion. Please, do provide code for this.
Comment #3
Rob C CreditAttribution: Rob C commentedI'm updating this issue's priority, because this is a problem for any large site with a variable table where the size of the table is close to the max allowed packet setting in the mysql config.
This could occur for example when you enable a module and the new size of the variable exceeds max_allowed_packet, or when cron fetches updates and the new size is larger then the old size and also exceeds this setting, so let's update to 'Major'.
Comment #4
Sutharsan CreditAttribution: Sutharsan commented@Rob C, I understand you want a higher priority. But I don't understand your arguments. Please explain "issue time" and what has time to do with the 1MB variable size? What _is_ the variable size?
Comment #5
Rob C CreditAttribution: Rob C commentedUpdated my original comment.
Comment #6
Sutharsan CreditAttribution: Sutharsan commentedThis patch moves the large variable to the cache table.
Please review and test.
Comment #7
Sutharsan CreditAttribution: Sutharsan commentedFixed an error when clearing cache.
Comment #8
Sutharsan CreditAttribution: Sutharsan commentedCommitted the patch. Feedback is still appreciated.
Comment #10
drummCorrecting issue status, see #2698635: Issue statuses changing by themselves?.