We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4702
    • 8 Posts
    hello

    I tried to test speed MODx. I use ad tool from apache.

    normal
    MySQL: 0.0043 s, 0 request(s), PHP: 0.1322 s, total: 0.1364 s, document retrieved from cache.

    hard
    command: "ab -n 200 -c 10 http://localhost/"
    MySQL: 1.2657 s, 0 request(s), PHP: 0.2218 s, total: 1.4875 s, document retrieved from cache.

    why MySQL does take away much time, if 0 request?

    It Bug or somthing else ?

    ps. sorry for my english smiley
      • 32963
      • 1,732 Posts
      Something is not right here. Does your cache page or template makes use of [!Snippets!] ?
        xWisdom
        www.xwisdomhtml.com
        The fear of the Lord is the beginning of wisdom:
        MODx Co-Founder - Create and do more with less.
        • 4702
        • 8 Posts
        cache page and use [[Snippets]]

        may be statistics use mysql ?
          • 4702
          • 8 Posts
          i turn off statistics

          try again
          command: ab.exe -n 100 -c 20 http://localhost/

          in browser: MySQL: 2.9437 s, 0 request(s), PHP: 0.1653 s, total: 3.1089 s, document retrieved from cache.

          :(
            • 6726
            • 7,075 Posts
            Very strange... I have several websites running MODx and I certainly do not have such high MySQL loads...

            Question : which module/plugin/snippet do you use ?
            Maybe try deactivate them and activate one by one... though I doubt it comes from there.
            Maybe your local testing config is at flaw ?
              .: COO - Commerce Guys - Community Driven Innovation :.


              MODx est l'outil id
              • 4702
              • 8 Posts
              content of test document:
              =[begin]=
              MySQL: [^qt^], [^q^] request(s), PHP: [^p^], total: [^t^], document retrieved from [^s^].
              =[end]==

              template use: "(blank)"

              type in browser: localhost/test.html
              result: MySQL: 0.0043 s, 0 request(s), PHP: 0.0856 s, total: 0.0899 s, document retrieved from cache.
              - very nice smiley

              but
              if command: ab.exe -n 100 -c 20 http://localhost/test.html
              result: MySQL: 2.3687 s, 0 request(s), PHP: 0.2324 s, total: 2.6011 s, document retrieved from cache.
              - sad

              can i debug core commands ? or see log-file ?



                • 25663 MODX Staff
                • 12,272 Posts
                Please poke through the document parser and see what you find. I’d love to see improvements incorporated into the core. Thanks for your offer.
                  Ryan Thrash, MODX Co-Founder
                  Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                  • 32963
                  • 1,732 Posts
                  Hi,

                  Yes have a look at the core commands and see what you can come up with. From my estimates I think that time has to do with the time taken to connect to the database.

                  Each connection to modx will create a MySQL db connection.

                    xWisdom
                    www.xwisdomhtml.com
                    The fear of the Lord is the beginning of wisdom:
                    MODx Co-Founder - Create and do more with less.
                    • 4702
                    • 8 Posts
                    may be add to core some code ?

                    if(count($requests)>0) {
                    db_connect....
                    }