Results 1 to 11 of 11

Thread: Contao performance

  1. #1
    New user
    Join Date
    10-18-10.
    Posts
    10

    Default Contao performance

    We have web site based on Contao CMS.

    I ran load tests by LoadImpact and found that our web site goes down after 50 simultaneous users.
    I enabled and turned up mysql query caching, Apache mod_cache, PHP eAccelerator . After optimization site goes down after 110 simultaneous users.

    Every page build run about 130-170 mysql queries (debug mode). mod_cache doesn’t work for new users (as I understand it caches pages for users that already visited web site).
    Then, I have restored old website version based on Drupal, and ran test. 110 simultaneous users generated 25% system load. Contao is slower than Drupal in about 40-50 times.

    As I understand Drupal caches pages and modules in core. Contao uses Apache mod_cache that caches pages by URL for users. So when new user comes to Contao site, cache doesn’t work and every page generates 130-170 queries to database. When it comes to Drupal it can get page from cache.

    Is there any other way to boost Contao performance?

  2. #2

    Default Re: Contao performance

    Its interesting to know of the test you have performed. I don't know if you have found this or not, under website root there is setting for cache. This cache is not the Apache mod_cache, which you have pointed. So can you turn this on and perform the Test again.
    OM MANI PEME HUNG! how many has to die for freedom and dignity. Save this world

  3. #3
    New user
    Join Date
    10-18-10.
    Posts
    10

    Default Re: Contao performance

    tsarma,
    Quote Originally Posted by tsarma
    Its interesting to know of the test you have performed.
    I used LoadImpact and Siege with default settings, only number of simultaneous user was changed.

    Quote Originally Posted by tsarma
    I don't know if you have found this or not, under website root there is setting for cache. This cache is not the Apache mod_cache, which you have pointed. So can you turn this on and perform the Test again.
    if you meant "Cache mode" in Settings, sure it was "Use the server and the browser cache".
    Images, css,and javascript caching is on too.

    if you meant something other - could you clarify?

  4. #4
    User
    Join Date
    06-19-09.
    Location
    Elbl?g, Poland
    Posts
    152

    Default Re: Contao performance

    Quote Originally Posted by igolikov
    if you meant "Cache mode" in Settings
    No, tsarma means "Set cache timeout" option in every page settings (including root page). And there can "Set a cache timeout value for the page and its subpages".
    Marcin

    http://www.contao.pl - Polish Support Site
    http://forum.contao.pl - Polish Contao community forum


    -----------------------
    Need custom template? Feel free to contact me by e-mail marcin@contao.pl

  5. #5
    New user
    Join Date
    10-18-10.
    Posts
    10

    Default Re: Contao performance

    qrczak,

    For the website root it was set to "60 minutes". This setting should be inherited by all other pages.
    I set cache timeout for home page and repeat tests - results is the same.

  6. #6

    Default Re: Contao performance

    I set cache timeout for home page and repeat tests - results is the same
    Were you logged into BE during the test? If so Contao will render the pages new every time ignoring the cache settings !
    OM MANI PEME HUNG! how many has to die for freedom and dignity. Save this world

  7. #7
    New user
    Join Date
    10-18-10.
    Posts
    10

    Default Re: Contao performance

    Quote Originally Posted by tsarma
    Were you logged into BE during the test? If so Contao will render the pages new every time ignoring the cache settings !
    Yes I was logged in BE. But test results were not changed after I logged out.
    Can any other logged user affect caching?

    Is any information available about using Contao for high-loaded sites?

    BTW when I open page in Firefox with Firebug extension - I see that when I load any page second time most elements are taken from cache.

  8. #8
    New user
    Join Date
    10-18-10.
    Posts
    10

    Default Re: Contao performance

    I've added debug output to index.php (FirePHP extension) and found out that cache is working, page outputs by $this->outputFromCache().

    But anyway, I see a lot of sql queries in mysql query log when request page (cache lifetime is 3 hours).

    Some sql request belongs to cron.php. I think that is not good to run it hon every page request (if page is requested 100 times per second for example).

  9. #9
    User
    Join Date
    06-19-09.
    Location
    Elbl?g, Poland
    Posts
    152

    Default Re: Contao performance

    Quote Originally Posted by igolikov
    Some sql request belongs to cron.php. I think that is not good to run it hon every page request (if page is requested 100 times per second for example).
    Remove it from your template:
    Code:
    [img]<?php echo $this->base; ?>cron.php[/img]
    Most people and me use system cron instead this way. It's not only my opinion, see this: http://dev.contao.org/issues/486. And then try run again your tests.
    Marcin

    http://www.contao.pl - Polish Support Site
    http://forum.contao.pl - Polish Contao community forum


    -----------------------
    Need custom template? Feel free to contact me by e-mail marcin@contao.pl

  10. #10
    New user
    Join Date
    06-19-09.
    Location
    Denmark
    Posts
    29

    Default Re: Contao performance

    Hi qrczak,

    Could you share the real cron you'd setup for making this stupid cron.php unnessesary - because i've simply just removed it from the template, not even thinking of what that causes besides a better page speed performance of cause
    Cheers!

    Jimmy Rittenborg
    Follow me on twitter

  11. #11
    User
    Join Date
    06-19-09.
    Location
    Elbl?g, Poland
    Posts
    152

    Default Re: Contao performance

    I don't exactly remember what time period I set in cron but I have these commands

    Code:
    wget -t 1 -O - http://www.domain.com/system/modules...Controller.php >& /dev/null
    wget -t 1 -O - http://www.domain.com/cron.php >& /dev/null
    First line you need when you has installed this module: http://www.contao.org/extension-list/vi ... 09.en.html
    Marcin

    http://www.contao.pl - Polish Support Site
    http://forum.contao.pl - Polish Contao community forum


    -----------------------
    Need custom template? Feel free to contact me by e-mail marcin@contao.pl

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •