I have a large Drupal 7 website on my hands that is very large and has loads of modules (over 200). I am already seeing poor performance symptoms in the FPM logs with max_children limits reached on the Acquia server. I installed a profiler (blackfire) and the main issue (on every page) is an absurd amount of calls to unserialize (over 300) coming from DrupalDatabaseCacheprepareItem (autenticated). This happens even on a basic page. I am having a tough time coming up with a solid strategy to pinpoint the bottleneck and which module(s) are the culprit.

Anyone can help me with this?

  • If you have a profiler, you should be able to see what is calling all the cache gets.
    – mikeytown2
    Jan 21 '18 at 19:51
  • Hi @mikeytown2 thanks for your reply. I have tried the profiler but wasn't getting much luck, however I wasn't focusing on the cache_gets. I'll have a try and get back with the results. Thanks! Jan 22 '18 at 23:55
  • Okay so as an example, on a standard content page, blackfire is telling me I have 602 calls to unserialize. 84 of these from menu_get_object, 206 from DrupalDatabaseCache:prepareItem and 7 from EntityAPIController::load (these seem to be the relevant ones). From these, the ones that come to cache_get (that calls DrupalDatabaseCache::getMultiple) are variable_initialize and FieldInfo::getFields (1 for each). Jan 23 '18 at 7:07
  • This is what gets me so confused, I can't understand where the load is coming from since it only shows 1 call for variable_initialize and FieldInfo::getFields. Also it's a big gap between the 602 calls and the sum of the above. Jan 23 '18 at 7:07
  • I’ve found ceefour.github.io/wincachegrind is easier to understand what is causing a slowdown. What software are you using to view the cachegrind? I’ve found it can ID slow points easier
    – mikeytown2
    Jan 23 '18 at 7:42

I ended up using the variable debug module, which was incredibly useful in helping me find out the expensive variables I had.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.