We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42284
    • 13 Posts
    Hi all,

    We've just launched a new site for a client and due to the requirements of having to host it in the UK we're using Rackspace's Cloud Servers and Cloud Database instead of ModXCloud.

    The site isn't that well trafficked with only 500 visits a day, so the first server we set up only had 1 CPU and 512MB of memory (Ubuntu 12.04 LTS, nginx 1.3.12, PHP 5.3.10, PHP-FPM).

    We found that when we had approx 10 concurrent users the load on the site would be too much and people would start experiencing issues accessing the site and all our alerts would start going off. Looking at what was happening to the resources we saw that the CPU was running at 100% constantly, although the memory wasn't being maxed out.

    We tried adjusting the server settings to see if we could make a difference but nothing we tried helped.

    We've ended up moving across to a server with 4 CPUs and 512MB of memory and this seems to cope with the level of traffic it gets.

    Is ModX that CPU intensive? Are there things we can do to improve this, we've already enabled caching on the site?

    We have another site launching with this client in the summer and that one gets 8000 visits a day, which makes me worry whether ModX can handle it.

    Any thoughts would be welcomed

    Thanks
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      As far as MODx being able to handle that kind of a load, consider that this forum is a native MODx application, running on Revo, and if you check the stats at the bottom of the page you can see it has had 23232 visitors so far today.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 21257 MODX Staff
        • 730 Posts
        The amount of CPU MODX is using depends on how your templating is structured, and on how any Extras or custom code are behaving. For example, if you've got a bunch of TVs in a template, and you're aggregating a number of resources that use that template (e.g. Wayfinder or getResources), and processing those TVs (not just loading their raw values) then this can lead to a lot of CPU usage due to extra database queries and extra work PHP has to do. Also, 'enabling caching' is a little unclear. Beyond just turning on caching and making Resources cacheable, careful consideration of how elements are cached or not can go a long way.

        Also, check out these system settings:
        http://rtfm.modx.com/display/revolution20/access_category_enabled
        http://rtfm.modx.com/display/revolution20/access_context_enabled <-- don't set this one in System Settings .. only turn off in Context Settings
        http://rtfm.modx.com/display/revolution20/access_resource_group_enabled

          Mike Schell
          Lead Developer, MODX Cloud
          Email: [email protected]
          GitHub: https://github.com/netProphET/
          Twitter: @mkschell
          • 36416
          • 589 Posts
          Quote from: aothold at Mar 19, 2013, 01:28 PM

          We've just launched a new site for a client and due to the requirements of having to host it in the UK we're using Rackspace's Cloud Servers and Cloud Database instead of ModXCloud. (...)
          Any thoughts would be welcomed

          I don't think you'll have much luck with that CloudLinux abomination:
          https://forums.modx.com/forums/thread/75073/modx-revolution-issues-on-rackspace-cloud-sites
            • 42284
            • 13 Posts
            Thanks Mike, we're going to take a look at how we're handling TV's and see if we can work out where the issue is arising.


            Quote from: danilocuculic at Mar 19, 2013, 06:25 PM
            Quote from: aothold at Mar 19, 2013, 01:28 PM

            We've just launched a new site for a client and due to the requirements of having to host it in the UK we're using Rackspace's Cloud Servers and Cloud Database instead of ModXCloud. (...)
            Any thoughts would be welcomed

            I don't think you'll have much luck with that CloudLinux abomination:
            https://forums.modx.com/forums/thread/75073/modx-revolution-issues-on-rackspace-cloud-sites

            We're not using CloudSites, this is only available in the USA and I'm aware that ModX doesn't play too nicely with it. We're using Rackspaced dedicated cloud servers, a completely different beast.


              • 36416
              • 589 Posts
              Quote from: aothold at Mar 20, 2013, 03:28 AM
              We're not using CloudSites, this is only available in the USA and I'm aware that ModX doesn't play too nicely with it. We're using Rackspaced dedicated cloud servers, a completely different beast.

              Ah, sorry. They have their branding a bit too close for a superficial person like me. smiley
                • 42967
                • 143 Posts
                Do you have database caching turned on?

                If you post an example of one of your templates, we can see if there are any obvious problems. That level of traffic is nothing for modx to worry about.
                  Eighth day design
                  Design agency with offices in Edinburgh and Brighton