Slowing D7 site..

Events happening in the community are now at Drupal community events on www.drupal.org.
wipeout_dude's picture

Hi,

We have over the last couple of years built what is essentially a web based database application for our business that is accessed by our customers.. Launched in Sept 2011 and actively developed with new functionality being added since then.. We now have just under 16,000 "nodes" in the database..

The server is a Linode 1.5GB VM and runs nginx, php-fpm with APC and mysql..

Now I have to make it clear that its not a high traffic site with a peak of about 8-10 logged in users at a busy time.. Usually more like 3-4.. There maybe a few anonymous users visiting during the course of a day but probably not more than 1 at any point in time..

The system was always very "snappy" and page loads were fast but it seems that in the last month or so the performance has really dropped off significantly.. There has been no real configuration change other than updating D7 core and any module updates and the data hasn't grown any quicker than usual either..

The server doesn't appear to show any processor, memory or IO bottlenecks.. I suspected that the Linode host might be congested and Linode recently moved the VM to another server to see if that helped.. It didn't..

I have done some MySQL tuning but still didn't see any real improvement..

So I am not quite sure where else to look to work out what is causing the issue.. Or to figure out if it's caused by one of the core updates or a module updates..

For those of you with sites that have a large number of nodes are there any specific things that need to be done when passing say 15,000-20,000 nodes to help performance? I didn't think that 15,000 items what that much really but it maybe..

Any suggestions?

Thanks..

Comments

Enable

Drupa1ish's picture

Enable https://drupal.org/project/devel, set Display query log by duration at admin/config/development/devel, in order to identity slow queries. Maybe you can narrow down the module causing the issue

Thanks, I start there are see

wipeout_dude's picture

Thanks, I'll start there are see what it shows..

extra modules, cache limitation or expiration

bmarcotte's picture

a couple of thoughts come to mind.

Have you added any extra modules that could have pushed your memory demand beyond APC allocations?

Similarly, depending on your various server cache timings, infrequent page requests can occur after cache expirations and cause reloads of core and module source code. Essentially operating as if APC were OFF. If you vary your requests, 30sec, 60sec, 2min, 5min, 10 min, do you see a performance cliff after progressively delaying requests? That would be indicative of cache expirations.

One last thought. If you've added and removed modules over the years, there may be extraneous entries in the variables table. I'm far from positive, but I think the entire variables table is loaded during bootstrap. It is somewhat typical for modules to leave configuration settings behind during uninstall so it 'remembers' your settings if you re-install. You can check $GLOBALS['conf'] to see what is being loaded. to see, add Devel's dpm($GLOBALS); to your index.php after the bootstrap call and see what is in conf.

Happy hunting,
Bob


Bob Marcotte
Engineering Consultant
Marcotte Enterprises, Inc.
http://www.marcotteenterprises.com

Due to the nature of the site

wipeout_dude's picture

Due to the nature of the site and always needing to show current data I don't make a lot of use of caching other than the odd view that doesn't change the data very often..

I've checked APC and its got enough memory.. I have not looked at APC cache expirations so will check that out..

I have installed and removed modules so will check you suggestions and see if there is any cleaning up to be done there..

Thanks..

Get yourself some

greggles's picture

Get yourself some http://newrelic.com/ and look at the reports. That should show you what you need to know.

Does the free version of

wipeout_dude's picture

Does the free version of newrelic show enough to diagnose of do you have to get the paid version?

The free version is still

greggles's picture

The free version is still very helpful, yes, but for the first 2 weeks you get a "promo" that gives you the features of one of the paid tiers.

Menu Items

bmarcotte's picture

there is an old issue, https://drupal.org/node/1471554 where menu.inc makes multiple calls to a module's hook_load function. If you have custom mymodule_load functions, check to make sure your entity is statically cached otherwise you may find yourself reloading the same item a dozen times.


Bob Marcotte
Engineering Consultant
Marcotte Enterprises, Inc.
http://www.marcotteenterprises.com

High performance

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: