ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

EE optimizing and memcached server

December 02, 2010 4:04am

Subscribe [3]
  • #1 / Dec 02, 2010 4:04am

    Studio Meta

    105 posts

    Hello,

    We’re using EE on a website which has increasing traffic. We manage multiple weblogs, a bunch of members and many related entries.

    Recently we had big memory issue, because of heavy SQL queries, so we tought using EE with a memcached server would be a good idea.

    Does someone has any experience dealing with this ? We’ve found an extension called “IronCache” but it seems it isn’t released yet.

    http://webdevnotebook.com/2010/05/21/ironcache-caching-expression-engine-with-memcached/

    Any ressources for optimizing EE are welcome. Of course we had also read wiki, using cache parameters, limiting embedding, etc.

    Regards,

  • #2 / Dec 02, 2010 5:04pm

    Ingmar

    29245 posts

    Have you seen this page in the docs as well? Or perhaps you might take a closer look at Solspace’s cache module?

  • #3 / Dec 03, 2010 3:49am

    Studio Meta

    105 posts

    Ingmar, thanks for your reply. We’ve already looked at the extreme traffic documentation, and at the Solspace’s cache module.

    Actually we’ve setup an Akamai server so I guess Solspace’s module isn’t needed anymore.

    After investigating I found an interesting query, which seems to return hundreds of results, but we only need to display 10 related videos :

    SELECT rel_child_id, rel_parent_id FROM exp_relationships WHERE '2' IN (rel_child_id, rel_parent_id)
    
    SELECT t.entry_id FROM exp_weblogs w, exp_weblog_titles t, exp_weblog_data d WHERE w.weblog_id = t.weblog_id AND t.entry_id = d.entry_id AND t.site_id = '1' AND t.status IN ('open') AND w.blog_name IN('video') AND t.entry_date < 1291362227 AND t.entry_id IN(2,75,343,342,340,338,337,336,334,332,331,330,329,328,326,323,322,350,312,354,353,352,317,351,344,349,345,347,735,387,389,390,391,409,410,411,709,412,414,415,416,417,418,419,420,625,624,623,432,680,679,675,444,670,667,665,590,662,589,459,460,588,461,587,659,462,586,463,585,464,465,584,583,582,581,580,579,578,577,576,575,573,574,643,784,785,790,791,800,804,832,833,834,835,843,846,850,866,868,870,871,876,879,881,891,901,903,912,916,920,933,937,961,964,966,969,974,1012,1016,1025,1032,1039,1040,1046,1052,1055,1065,1069,1073,1080,1089,1093,1103,1104,1106,1120,1125,1129,1149,1153,1160,1163,1168,445,1531,1535,2319,1661,2539,3106,2707,1761,2433,2028,2013,3190,2344,2345,2346,2347,2348,1608,1610,1643,2318,1717,2027,2434,2706,1820,1853,3192,1921,1958,2079,2078,333,2126,2125,3012,3013,2538,2191,2205,2206,2224,2242,2263,3184,2375,2376,2401,2402,3187,2493,2494,2510,413,2939,3146,3147,2601,2602,2603,2633,2634,2772,2773,2822,2823,2849,2851,2941,2951,3053,3055,3107,3180,3181,3199,3200,3189) AND t.entry_id != '2'

    As you can see it select every children from parent ID (2). I’m using ed_related:entries because I need pagination, but as far as I remember it was the same using native reverse related entries. Isn’t there a way to use some lighter query ?

    The solution might be to use a memcached server, so you have any experience please help 😊

  • #4 / Dec 03, 2010 9:42am

    Ingmar

    29245 posts

    The solution might be to use a memcached server, so you have any experience please help 😊

    Unfortunately not, and this really isn’t something that we can offer regular Tech Support for. Let me move this to the CodeShare Corner for you to see if somebody else from the community has something to contribute. Thanks.

  • #5 / Dec 03, 2010 11:54am

    Studio Meta

    105 posts

    Thanks for your quick reply, we’re going to investigate, I think we should improve the reverse related entries to limit queries.

    I’ll post something there if we find a solution.

    Regards,

  • #6 / Jan 07, 2011 3:59pm

    handyman

    509 posts

    I had asked the same question about memcache earlier in this thread:
    http://ellislab.com/forums/viewthread/174805/P18/#833423

    It appears that support for it is not built into EE.

    As far as optimization tips, I’d done a few…well, more than a few!

    But they are the usual ones you would think of:
    1. Moved all ad banners to Amazon S3
    2. Moved some other static images there also.
    3. Moved some heavily used css and js files to S3

    In your case, however, it seems as if tracking down the specific problem queries as you have done might be a better solutions - after all, if it is excessive MySQL queries causing the problem, tuning up the all the other little things might not help too much.

  • #7 / Jan 10, 2011 10:31am

    Studio Meta

    105 posts

    Thanks for your reply.

    We finally set up Akamai with both custom sql queries and it fits our needs.

    Regards,

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases