Should I still use entitycache in Drupal 7 projects?

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

I have been using entitycache [1] without problems in D7. However I have not really measured lately does it really improve the performance and is there some issues? And what is the state at the moment about entitycache going to core [2] in D7 or D8?

What I am asking is:

  1. Should I use entitycache in projects of any kind? (Like using APC cache ALWAYS because it does not matter is there logged in users or not.)

  2. Has anyone measured the impact lately? (If it is in core it does not really make sense using it, right?)

  3. Can someone contribute some rough statistics / analytics what is the impact of using entitycache?

[1] http://drupal.org/project/entitycache
[2] http://drupal.org/node/597236

Comments

Personally, I don't notice

erikwebb's picture

Personally, I don't notice much difference with a site that has relatively simple content types. The biggest improvements I've found are on sites with a large number of fields and/or references to other entities in addition to using a backend different from the database (e.g. Memcached). If your site is large, this will also require a fairly large amount of cache space.

I ran some numbers about a year ago, but unfortunately don't have the results handy. As with most "scalability" improvements, the performance doesn't increase much for simple cases (and may actually be slightly worse), but becomes more pronounced as complexity and traffic increases.

Also, anytime you're running a high-traffic site and can reduce more database load, that's always a win in my book.

I did notice a great improvement

tipit's picture

You are totally right that the complexity plays a role. I also have a note (from more than a year ago) which says that entitycache improved the performance about 30-40%. But all I can remember about the testing is that I measured that locally very quickly and the site is a pretty complex commerce site. :)

Now the case is that there will be a Varnish in front and not much logged in users so the entitycache module won't do a use performance impact. But like you said if it is a win (even a little win) then why not installing entitycache to every site?

Personally, I wouldn't

erikwebb's picture

Personally, I wouldn't install a performance-related module if I couldn't quantify any performance gain. Just adds to overall size. You're right I guess that it doesn't hurt, but simplicity is always good too.

Good results with EntityCache

murrayw's picture

I recently performed some tests around node and entity loads using a variety of caching techniques. In short I found that Entity Cache provided a large improvement when loading entities which were able to use entity cache.

In a nutshell my findings for entity load were:
- nodes are 2x slower than entities
- fields don't really slow things down too much more
- hooks on node load are probably the culprits
- mysql query cache leads to 30% improvement (if hit)
- entitycache can lead to 80% improvement
- Using APC with entitycache didn't help too much more (probably because my DB was on SSD). ie. Getting the entity from a cache table in DB still provided great results.
- You will see good results for light/heavy nodes and light/heavy entities if they are able to use EntityCache.
- Field Collections were unable to use it at time of testing.

When using xHProf on a page load I found similar results with time spent in entity load reduced. I got between 6% and 10% speedup for the entire page.
- heavy node pages reduced from 14.4% down to 4.3%
- lightweight term pages reduced from 10.0% to 4.1%.

So yes, I did see good results in my tests.

Usual caveats apply when reading these results as they are specific to my setup and data. I suggest giving XHProf a try on your own setup.

You can download my slides here:
http://morpht.com/posts/one-weird-old-tip-lose-node-weight

cheers

Murray

Managing Director
Morpht

major problems with entity cache

cinnamon's picture

Personally I don't use entity cache any more. I'm sure there are performance gains, but modules like CER and multilangual sites work unreliable with entity cache. Seen to many nodes that don't update when they should. For CER I believe there was a patch, but basicly you want your site to be 100% consistent and not ask yourself with every module you deploy "does it play nice with entity cache?" ;)

Multilingual website issues

theodorosploumis's picture

I recently had to disable entity cache module on a multilingual website because it needed to flush caches every time a new Node (or Other entity) was added.

In fact the site goes faster now, I don't know why.

Drupal 7, Drupal 6, Drupal anyway...

Multilingual website issues

theodorosploumis's picture

I recently had to disable entity cache module on a multilingual website because it needed to flush caches every time a new Node (or Other entity) was added.

In fact the site goes faster now, I don't know why.

Drupal 7, Drupal 6, Drupal anyway...

Metatag

parisek's picture

I noticed problem with entity cache and metatag module. When I open node I saw only default metatag settings (but node has its own defined), but when cleared cache everything is OK. This problem persist (I tried manually clear all cache tables) and unexpectedly returns. I figured it out, that Entity cache is the problem, but I don't know why this happens.

If you haven't already,

greggles's picture

If you haven't already, please file a bug in the metatag queue. This seems like a bug and I'm sure the maintainers would be interested in knowing it, but over here they will likely never see it.

If you have filed an issue, please link to it :)

Metatags with entitycache

vimaljoseph's picture

I also face the same issue. There is a bug report at https://drupal.org/node/2227377

First project wonders

Anonymous's picture

I've been working on my first serious project. Let me tell you, entity cache did wonders (drupal 7). It especially helped with the quiz module, since (at least from what I saw) quiz didn't come with any caching. Since the quizzes are nodes, as soon as I enabled entity cache taking quizzes was about 80% quicker (RIDICULOUS!). Of course, I have memcache enabled, and APC. I did a few other things like fine tunning apc, and I'm truly satisfied with Drupal performance.

High performance

Group notifications

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