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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Jim Kirkpatrick created an issue. See original summary.

Sutharsan’s picture

Good suggestion. Please, do provide code for this.

Rob C’s picture

Priority: Normal » Major

I'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'.

Sutharsan’s picture

@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?

Rob C’s picture

Updated my original comment.

Sutharsan’s picture

Status: Active » Needs review
FileSize
4.37 KB

This patch moves the large variable to the cache table.
Please review and test.

Sutharsan’s picture

Fixed an error when clearing cache.

Sutharsan’s picture

Status: Needs review » Fixed

Committed the patch. Feedback is still appreciated.

  • Sutharsan committed f67a287 on 7.x-2.x
    Issue #2622044 by Sutharsan: On large sites,...
drumm’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.