We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28331
    • 10 Posts
    Hello!
    I’ve been using ModX a couple of months now and really like it a lot.
    My main consern though, is that the cms seems to be very slow.

    I just ran a benchmark with ab
    ab.exe -kc 10 -n 1000 http://localhost/index.php?id=1


    and i only received about 18 requests / second - and the page is cached and ModX is a fresh install (with the default snippets though, but none of them is active on that specific page). That would make it impossible to use ModX on a larget site

    And sure, I use an WindowsXP 2.4 Ghz machine with 1.5 gig ram (i use a debian machine too, with the same problem), but it shouldn’t be this slow.

    I mean. I can do a really simple loop like this (which is NOT supposed to be an accurate result at all, it doesn’t read any database or files - I know, I know, I know....)

    for($i=0; $i<10000; $i++)
    echo rand(0,1000);


    but i still receive about 190 req/sek on my computer.

    To me, it seems as if the larger the file:
    assets\cache\siteCache.idx.php is , the slower it takes to parse. I have a site where siteCache.idx.php is about 400kb, and ModX is incredible slow there.

    What do you have to say? I have search around the forum and googled, but I can’t find any real benchmarks.
    It can’t just be me. I find it slow also on other computers.

    I mean, something must be wrong, because the stats in the bottom of ModX says:
    MySQL: 0.0080 s, 4 request(s), PHP: 0.0363 s, total: 0.0443 s, document retrieved from database.


    Can you please help, because I really want to contribute to ModX. But I don’t dare to use it on some larger site because of the slowdowns.

    Regards / Johan from Sweden



      • 25663 MODX Staff
      • 12,272 Posts
      There’s a lot of information missing, like how you have PHP, Apache and MySQL configured, which version you’re using etc. If you don’t have your server set up properly, any script will be slow. I also don’t know anything about that benchmarking application or whether it’s a valide gauge of MODx (it might not be). I will say that speed has not been a complaint with MODx.

      What’s your definition of a "larger site"?
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 22303 MODX Staff
        • 10,725 Posts
        First of all, 18 requests per second is pretty damn fast for a database-powered CMS IMHO, especially using ab to do local loopback testing; please feel free to show me an open-source PHP/MySQL CMS with the same features and flexibility that is faster, and I’ll be glad to steal their secrets.

        Second, I’m getting closer to 30 requests per second testing 0.9.6 with ab on my machine (mine must be bigger and faster than yours tongue).

        Now, your evaluation of the siteCache bottleneck is correct and this is being addressed in the new core, which will first be available in the upcoming 0.9.7 release. There is quite a bit of discussion of this here in the forums...

        Otherwise, this site is quite popular and handles the traffic well with MODx and one server, so I’m not sure what kind of traffic you are intending to handle, but perhaps you need to explore using a commercial product that can scale across clusters of web servers to support your needs. I’ve used MODx on a number of higher traffic sites, and have had no problems with rendering speeds, other than on pages with intense database access, which is unavoidable without some robust database result set caching mechanisms (also coming in 0.9.7 for increased scalability).
          • 28331
          • 10 Posts
          Hello, and thanks for your replies.

          Sorry, Of course I should have told you my configuration.

          For this particular test, I used the current 1.6 configuration of XAMPP, which means

          * Apache 2.2.4
          * MySQL 5.0.33
          * PHP 5.2.1

          I know it’s not the "ideal" solution to use XAMPP, but I just wanted to have some quick results to show you some kind of comparisation.


          With a larger site, I mean about 1000-2000 people browsing the site at the same time. (A frontpage to a pokersite, with a completely different backend on a second server). Even though the site is’nt supposed to be so fancy (no complex structure or database), still I’m wondering if MODx can make it.


          Now, your evaluation of the siteCache bottleneck is correct and this is being addressed in the new core, which will first be available in the upcoming 0.9.7 release. There is quite a bit of discussion of this here in the forums...

          Ah...that’s very interesting. Would you like to give me some direction of which topic I should choose to search for?


          Otherwise, this site is quite popular and handles the traffic well with MODx and one server

          Okay. So the entire modxcms.com is based on modx? May I ask what version you use? Do you upgrade it everytime you release another version?


          Regards / Johan

            • 28331
            • 10 Posts
            And another thought.
            Is it possible to just use something like this:

            // ugly pseudocode
            <? import ’/plugins/myplugin.php’ ?>

            instead of pasting all code inside the MODx, and then forcing the MODx-engine to NOT store any cached phpcode inside of siteCache.idx.php.

            I know it can be done to import php-scripts, but I’m not sure how the engine works. Would it still cache php and make sitecache.idx.php grow, or just leave it? This way I could temporary (since 0.9.6 is not out yet smiley ) make the sitecache-file much smaller, and then get better result for my benchmarks.


            Regards / Johan

              • 25663 MODX Staff
              • 12,272 Posts
              modxcms.com is actually still running an older, slower version. A pending redesign should see better performance still in the near future. smiley
                Ryan Thrash, MODX Co-Founder
                Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                • 7923
                • 4,213 Posts
                Quote from: Stabilovic at Feb 20, 2007, 03:34 PM


                Now, your evaluation of the siteCache bottleneck is correct and this is being addressed in the new core, which will first be available in the upcoming 0.9.7 release. There is quite a bit of discussion of this here in the forums...

                Ah...that’s very interesting. Would you like to give me some direction of which topic I should choose to search for?
                Search with siteCache.idx.php returns atleast these:
                http://modxcms.com/forums/index.php/topic,7361.0.html
                http://modxcms.com/forums/index.php/topic,5430.0.html

                Do you have these "benchmarking" results with some other CMS too to compare with?


                  "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                  • 34127
                  • 135 Posts
                  I know it probably doesn’t mean much coming from a MODx newb like myself, but I wanted to jump in. Of all the CMSes I’ve tried, MODx is by far the fastest. My current site (not-MODx-ified yet) is run on an Opteron 246 with 2gigs of RAM, and I have a development area set up on the same server. MODx runs without any problems and practically matches my plain HTML site as it is, which is amazing for a CMS... I know, because I’ve tried all the big names and I would NEVER dare to run something like Joomla on a big site... unless I want my site to crawl. rolleyes

                  I’ve been reading about .97 and it sounds awesome. If .95 (or .96 rc-1) runs this fast, .97 will probably take an educated guess at the user’s next click and open that page in mere milliseconds. I can’t wait until I just have to think about opening a link, rather than actually clicking to open it. tongue
                    • 14050
                    • 788 Posts
                    Quote from: Eleventeen at Feb 21, 2007, 11:20 AM

                    I can’t wait until I just have to think about opening a link, rather than actually clicking to open it. tongue

                    I think Ryan and/or Jason would first ask that you add this as a feature tracker, so that it can be implemented for the 1.0 release grin
                      Jesse R.
                      Consider trying something new and extraordinary.
                      Illinois Wine

                      Have you considered donating to MODx lately?
                      Donate now. Every contribution helps.
                      • 25663 MODX Staff
                      • 12,272 Posts
                      How did you think we were planning on implementing the coffee bit? tongue
                        Ryan Thrash, MODX Co-Founder
                        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me