We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16681
    • 62 Posts
    Again, read through the constructor process of the modx class and you will get an idea of what happens under the hood smiley
      Keep it SIMPLX
      • 31246 ☆ A M B ☆
      • 428 Posts
      Quote from: jeroenkenters at Mar 08, 2012, 03:34 PM
      @Artdevue Did you enable caching in your (second) Drupal setup?
      No, I did not know, because I've included all of the default. Time is now included
      http://www.webpagetest.org/result/120308_A8_3GXGB/
      the result was better in Drupal.
      But I did not set up caching in MODx, I have a snippet call is noncached

      But again, I do not see your 10 times faster??
      [ed. note: valikras last edited this post 14 years, 7 months ago.]
        Valentin Rasulov - Industrial design (Hobbies - Web Development)
        Development not standard projects on CMF MODx Revolution.
        Small sample of extensions
        • 34075 ☆ A M B ☆
        • 130 Posts
        Quote from: valikras at Mar 08, 2012, 03:44 PM

        But again, I do not see your 10 times faster??

        Because you're testing uncached smiley And it's UP TO 10 times faster in the examples my client gave me (live comparable sites). In my own testing I see 2 to 3 times faster sites in Drupal. Only looking at page source to rule out difference in loading times of javascript and images.
          Jeroen Kenters

          MODX Professional | MODX Ambassador | Dutch MODX forums moderator

          website | twitter
          • 31246 ☆ A M B ☆
          • 428 Posts
          Quote from: jeroenkenters at Mar 08, 2012, 03:47 PM
          Because you're testing uncached smiley And it's UP TO 10 times faster in the examples my client gave me (live comparable sites). In my own testing I see 2 to 3 times faster sites in Drupal. Only looking at page source to rule out difference in loading times of javascript and images.
          Ok, I originally tried to do a site Druupal and he bent slowly under the project (this was before I became acquainted with MODx)

          Not to be unfounded, that's where the page is a sample http://avia-express.com.ua/ru/tour/poisk-tura 8 databases totaling about 10GB. Here, Drupal does not deliver.

          I'm not saying that can not be improved caching in MODx, but if you try, you can. I love MODx flexibility and a lot else I can transfer them to infinity. And believe me, I with many CMS and MODx, and worked the best among all. [ed. note: valikras last edited this post 14 years, 7 months ago.]
            Valentin Rasulov - Industrial design (Hobbies - Web Development)
            Development not standard projects on CMF MODx Revolution.
            Small sample of extensions
            • 33974
            • 156 Posts
            I didn't test something with different systems. But I agree with Jeroen that MODX is slower on empty sites to Drupal. This is what I can confirm.

            And I think there could be done much more performance on real-world sites using getResources, phpthumbof and such common used snippets.
            And I think a snippet like Wayfinder should be super-fast. Now it isn't at all… in fact it's super-slow. Same goes for Gallery and some other snippets. I hope MODX will improve performance of the system in future.
            And maybe you can also optimize cached results. I once had a visitor rush on my site and MODX took nearly my whole V-Server. This was a blog entry w/o images or something like that. I know this is normal but maybe there is some place for optimization although?

            Another thing I see is the caching of MODX. I don't like to empty the whole cache when I'm just updating the text of a page. So I think it should be more granular… maybe I'm wrong here – I'm not a developer – but that's what we once discussed here with our MODX user group managers in Germany.
              • 31246 ☆ A M B ☆
              • 428 Posts
              @jeroenkenters I tried to create two identical sata on Drupal and MODx. Enable caching.
              Here are the tests: mysql-5.1.41, PHP-5.3.2 Server API - CGI/FastCGI, Apache/2.2.14 (Ubuntu).

              Drupal - http://www.webpagetest.org/result/120309_MH_3GZ76/
              First View: Start Render- 1.241s, Document- 1.352s
              Repeat View: Start Render- 0.279s, Document- 0.306s

              MODx - http://www.webpagetest.org/result/120309_EC_3GZ75/
              First View: Start Render- 0.971s, Document- 1.058s
              Repeat View: Start Render- 0.508s, Document- 0.521s

              As you can see, the first call MODx a little compares favorably with Drupal. When you lose a little bit.
              Caching at the Modx and Drupal systems is different. Drupal gives the cache as a file stored in MODx cache individually, so we can call in MODx uncached snippets of cached resources, etc. that can not be done in the system Drupal.. That is the advantage of MODx. [ed. note: valikras last edited this post 14 years, 7 months ago.]
                Valentin Rasulov - Industrial design (Hobbies - Web Development)
                Development not standard projects on CMF MODx Revolution.
                Small sample of extensions
                • 28215
                • 4,149 Posts
                It is worth it to note that Drupal stores its sessions by default in files, while MODX stores its sessions in the DB. MODX prefers database sessions because file-based sessions leave those sessions vulnerable to reading should your webserver become compromised (think shared host, someone else on the host installs a hack, then navigates to your directory and reads the sessions).

                You can turn sessions to be file-based, which will speed up the loading initially, at the compromise of the security I just noted. Also, did you set "cache_db" to Yes?

                Also, it is worth it to note that this comparison isn't really a fair benchmark - you need to consider that sites aren't empty by default, and "scalability" and "performance" aren't measured by empty page tests. For instance, a fair test would test various pages with all-cached content, some dynamic content, sites that have 10k+ pages (or nodes in drupal), sites that are dealing with authenticated sessions, load balancing and database replication, etc.

                Just saying, while these tests are appreciated (much so!) it's not fair to make a snap judgement that "MODX is slower!" based on this test, since this test isn't really equally comparing the two systems. smiley

                (On a side note, for caching optimizations in MODX sites, I would recommend Jason's getCache and Executioner extras.)
                  shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
                  • 28215
                  • 4,149 Posts
                  Jeroen,

                  I just replicated your test on newly installed MODX 2.2.0-pl2 and Drupal 7.12 installations, and got these results:

                  Number of times: 1000
                  Average Drupal: 0.0238047 s
                  Average MODX: 0.0145506 s

                  Both are vanilla installs of Drupal and MODX, pointed at each's homepage. No special configurations (MODX is even still using the database-based sessions). I've attached the script I used to run this here: https://gist.github.com/2005200

                  Turning on 'cache_db' to Yes, and making the sessions in MODX file-based resulted in these metrics:

                  Average Drupal: 0.023937 s
                  Average MODX: 0.011381 s

                  My environment is:

                  Apache/2.2.21 (Unix)
                  PHP Version 5.3.10
                  mysql5 Ver 14.14 Distrib 5.1.61, for apple-darwin11.3.0 (i386) using readline 6.2
                  mysqlnd 5.0.8-dev - 20102224 - $Revision: 321634 $
                  Suhosin Extension 0.9.33

                  The system is a:
                  2.66Ghz iMac intel core i5 processor
                  8GB 1067 Mhz DDR3 memory
                  Mac OS X Lion 10.7.3

                  Perhaps something is off with your environment or MODX installation? [ed. note: splittingred last edited this post 14 years, 7 months ago.]
                    shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
                    • 34075 ☆ A M B ☆
                    • 130 Posts
                    Shaun,

                    Did you enable caching in Drupal (configuration -> performance)? I'm sure it's not my environment as I have run this test on multiple environments all giving me the same end result (not in ms of course, but in MODX being 2 to 3 times slower in this particular test)

                    I know it's not fair to compare an empty site to a full one, but I doubt MODX will be any faster when there are snippets and all kinds of dynamic content on the page smiley
                    I also know about file based vs DB based sessions. Turning those sessions to file based still did not result in a faster MODX site however (only a bit faster than before).

                    I don't want to end up in a MODX vs Drupal discussion here. Both are great systems running small to very large sites. I just want to see if we could get the performance of MODX up a bit.

                    [edit]
                    Just proved myself I'm not a Drupal expert. Drupal seems to be using DB sessions as well.

                    It's also possible to cache pages but not "blocks". Tried this as well. Drupal partially cached is still a lot faster.

                    Only after disabling caching or logging in (which seems to disable caching; not sure if you can enable the cache for authenticated users) drupal is slower.
                    [/edit] [ed. note: jeroenkenters last edited this post 14 years, 7 months ago.]
                      Jeroen Kenters

                      MODX Professional | MODX Ambassador | Dutch MODX forums moderator

                      website | twitter
                      • 1343 ☆ A M B ☆
                      • 2,213 Posts
                      The other question you may want to ask (granted this IS environment specific) is how well the sites handle concurrent traffic.

                      If you run the shell: ab -n 100 -c 10 http://www.domain.com/

                      (100 requests with a max of 10 concurrently - add " > test1.txt &" to the end to write the output to file)

                      I wouldn't go too crazy with the requests as it will tax any server, but this should give us another test to help measure how MODX is doing and more importantly how we can improve it.
                        Patrick | Server Wrangler
                        About Me: Website | Tweets |  MODX Hosting