Tuning with NewRelic

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
DaPooch's picture

So I've finally delved into tuning up my aging Drupal 6 site using NewRelic and like most I'm amazed at what their product has to offer. Very useful for honing in on problem areas. However, being new to this I'm not fully sure what the correct actions are to fix my particular problem.

According to NR my biggest issue right now is the _revisioning_view (Revisioning Module) function. Digging through the trace reveals A LOT (1218) of calls to the url_alias table (which currently has 75,000+ records in it) I've read a few things suggesting running memcache or some form of Path Caching. 1218 Calls to url_alias certainly seems like a lot but before I go down the road of installing more modules I'd like to get a better grasp of what's going on here. Does anything jump out to anyone?

My other big item seems to be the time it takes to Insert and Update the cache_content table. See the attached screenshots from NR and let me know where you think I should go first.

AttachmentSize
Screen Shot 2013-03-15 at 3.57.03 PM.png186.36 KB
Screen Shot 2013-03-15 at 3.52.57 PM.png32.34 KB
Screen Shot 2013-03-15 at 4.03.19 PM.png65.19 KB

Comments

Any progress on this issue or

HyperGlide's picture

Any progress on this issue or how to work through the NR data set?

Based on this it seems that

ghankstef's picture

Based on this it seems that it would make good sense to cache the revisioning view that is slow, but even better would be to find the exact query the view is running and use Mysql's Explain syntax to see why the query is slow. Then you can try adding an index. In many situation this can really help tons.

Using memcache or cachrouter module with APC if you only run on one server could really speed up caching by removing caching from the database altogether.

If you move caching to memcache or APC you could then look at the pathcache module or even consider using Pressflow as a drop in replacement for Drupal core which includes path alias caching and other performance enhancements.

I see similar issues. If you

markdorison's picture

I see similar issues. If you look at the _revisioning_view function (http://drupalcode.org/project/revisioning.git/blob/HEAD:/revisioning.mod...), it is essentially a pass-through for node_load() with a specific vid.

In that case you may want to

dalin's picture

In that case you may want to use EntityCache module, even better with an alternate cache backend (ex. Memcache).

--


Dave Hansen-Lange
Director of Technical Strategy, Advomatic.com
Pronouns: he/him/his

@dalin: Thanks for the

markdorison's picture

@dalin: Thanks for the feedback. It looks like I linked to the D7 version of revisioning which is confusing, but this is actually a D6 site.

Correct link: http://drupalcode.org/project/revisioning.git/blob/c8cd668d83d7221b4ec16...

For D6 you may want to

dalin's picture

For D6 you may want to investigate this branch for PressFlow:
https://code.launchpad.net/~catch-drupal/pressflow/load_cache

--


Dave Hansen-Lange
Director of Technical Strategy, Advomatic.com
Pronouns: he/him/his

@dalin: Thanks for pointing

markdorison's picture

@dalin: Thanks for pointing me to this. Any idea why this never made it into Pressflow proper?

A few reasons I can think

dalin's picture

A few reasons I can think of:

1) Development is pretty much over for Pressflow D6.
2) Since caching of node_load() is a foreign concept in D6, such aggressive caching could break stuff. YMMV so it's probably too risky to push out to the hundreds of sites running vanilla Pressflow D6.

--


Dave Hansen-Lange
Director of Technical Strategy, Advomatic.com
Pronouns: he/him/his