Announcement

Collapse
No announcement yet.

benchmark nginx not running

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • benchmark nginx not running

    Hi,

    I tried to benchmark nginx, but I get the following error.
    I tried with a root and non-root
    I'm running in Debian 7

    Bo you have an idea ? I have search in the forum but i have found nothing

    Regards.

    -----------------


    toto@nimble4g-05:~$ phoronix-test-suite debug-benchmark nginx

    Phoronix Test Suite v5.8.0m2

    Installed: pts/nginx-1.1.0

    ========================================
    Phoronix Test Suite v5.8.0m2
    System Information
    ========================================

    Hardware:
    Processor: Intel Xeon E5-2620 0 @ 2.00GHz (2 Cores), Motherboard: Microsoft Virtual Machine v7.0, Chipset: Intel 440BX/ZX/DX, Memory: 4096MB, Disk: 322GB Virtual Disk, Graphics: Microsoft Hyper-V virtual VGA

    Software:
    OS: Debian 7.8, Kernel: 3.2.0-4-amd64 (x86_64), Compiler: GCC 4.7.2, File-System: ext4, System Layer: Microsoft Hyper-V Server


    Running Pre-Test Script

    ========================================
    NGINX Benchmark (Run 1 of 1)
    ========================================


    Test Run Command: cd /home/toto/.phoronix-test-suite/installed-tests/pts/nginx-1.1.0/ && ./nginx -n 500000 -c 100 http://localhost:8088/test.html 2>&1

    This is ApacheBench, Version 2.3 <$Revision: 655654 $>
    Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
    Licensed to The Apache Software Foundation, http://www.apache.org/

    Benchmarking localhost (be patient)
    apr_socket_recv: Connection refused (111)

    The test exited with a non-zero exit status.


    Log File At: /home/toto/.phoronix-test-suite/installed-tests/pts/nginx-1.1.0/nginx-1.1.0-1430315013-1.log


    Running Post-Test Script

    ########################################
    NGINX Benchmark:
    Static Web Page Serving


    Average: 0 Requests Per Second
    ########################################



    The following tests failed to properly run:

    - pts/nginx-1.1.0: Static Web Page Serving

  • #2
    Try running "phoronix-test-suite debug-run nginx" and evaluate the output.
    Michael Larabel
    https://www.michaellarabel.com/

    Comment


    • #3
      Hi,

      I have run your cmd.
      you can see below the result
      the log file show the same

      And after i have only run the cmd :
      (root@nimble4g-05) (~) # cd /root/.phoronix-test-suite/installed-tests/pts/nginx-1.1.0/ && ./nginx -n 500000 -c 100 http://localhost:8088/test.html 2>&1
      ./nginx: 2: ./nginx: cannot create : Directory nonexistent


      ------------------

      (~) # phoronix-test-suite debug-run nginx

      Phoronix Test Suite v5.8.0m2

      Installed: pts/nginx-1.1.0

      ========================================
      Phoronix Test Suite v5.8.0m2
      System Information
      ========================================

      Hardware:
      Processor: Intel Xeon E5-2620 0 @ 2.00GHz (2 Cores), Motherboard: Microsoft Virtual Machine v7.0, Chipset: Intel 440BX/ZX/DX, Memory: 3968 MB + 128 MB, Disk: 322GB Virtual Disk, Graphics: Microsoft Hyper-V virtual VGA

      Software:
      OS: Debian 7.8, Kernel: 3.2.0-4-amd64 (x86_64), Compiler: GCC 4.7.2, File-System: ext4, System Layer: Microsoft Hyper-V Server


      Running Pre-Test Script

      ========================================
      NGINX Benchmark (Run 1 of 1)
      ========================================


      Test Run Command: cd /root/.phoronix-test-suite/installed-tests/pts/nginx-1.1.0/ && ./nginx -n 500000 -c 100 http://localhost:8088/test.html 2>&1

      This is ApacheBench, Version 2.3 <$Revision: 655654 $>
      Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
      Licensed to The Apache Software Foundation, http://www.apache.org/

      Benchmarking localhost (be patient)
      apr_socket_recv: Connection refused (111)

      The test exited with a non-zero exit status.


      Log File At: /root/.phoronix-test-suite/installed-tests/pts/nginx-1.1.0/nginx-1.1.0-1430318757-1.log


      Running Post-Test Script

      ########################################
      NGINX Benchmark:
      Static Web Page Serving


      Average: 0 Requests Per Second
      ########################################



      The following tests failed to properly run:

      - pts/nginx-1.1.0: Static Web Page Serving

      Comment


      • #4
        "
        apr_socket_recv: Connection refused (111)

        The test exited with a non-zero exit status.
        "
        Michael Larabel
        https://www.michaellarabel.com/

        Comment


        • #5
          yes, i have see the error message, but i don't understand the problem
          in google, i don't have find a interesting result.

          do I need to install nginx on my VM, for the test run perfectly ?

          Comment


          • #6
            Originally posted by 00gil View Post
            yes, i have see the error message, but i don't understand the problem
            in google, i don't have find a interesting result.

            do I need to install nginx on my VM, for the test run perfectly ?
            It should run out-of-the-box just fine, but given the error above, sounds like some issue with your system otherwise an upstream nginx bug.
            Michael Larabel
            https://www.michaellarabel.com/

            Comment


            • #7
              I Michael,

              I have continued my test/debug for nginx

              I have noted that i obtain the same error when the process doesen't running.

              you can show below different test.
              i have run manually the same test that phorononix solution realize (pre script, test ab, post script)

              after this tests, i thinks that is possible that the process nginx in pre script, doesn't run correctly

              additional information : when i execute lynx command : lynx http://localhost:8088/test.html i obtain a forbidden error

              thanks


              //////////////////////////////////

              (root@nimble4g-05) (~) # /root/.phoronix-test-suite/installed-tests/pts/apache-1.6.1/httpd_/bin/apachectl -k start -f /root/.phoronix-test-suite/installed-tests/pts/apache-1.6.1/httpd_/conf/httpd.conf
              AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using xxx.xxx.xxx.xxx. Set the 'ServerName' directive globally to suppress this message

              (root@nimble4g-05) (~) # netstat -taupen |grep 8088
              tcp6 0 0 :::8088 :::* LISTEN 0 5115407 30744/httpd


              (root@nimble4g-05) (~) # /root/.phoronix-test-suite/installed-tests/pts/apache-1.6.1/httpd_/bin/ab -n 1000000 -c 100 http://localhost:8088/test.html 2>&1
              This is ApacheBench, Version 2.3 <$Revision: 1528965 $>
              Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
              Licensed to The Apache Software Foundation, http://www.apache.org/

              Benchmarking localhost (be patient)
              Completed 100000 requests
              Completed 200000 requests
              Completed 300000 requests
              Completed 400000 requests
              Completed 500000 requests
              Completed 600000 requests
              Completed 700000 requests
              Completed 800000 requests
              Completed 900000 requests
              Completed 1000000 requests
              Finished 1000000 requests

              ........

              (root@nimble4g-05) (~) # /root/.phoronix-test-suite/installed-tests/pts/apache-1.6.1/httpd_/bin/apachectl -k stop
              AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using xxx.xxx.xxx.xxx. Set the 'ServerName' directive globally to suppress this message


              //////////////////////////////////////////////////////////////

              (root@nimble4g-05) (~) # /root/.phoronix-test-suite/installed-tests/pts/nginx-1.1.0/nginx_/sbin/nginx

              (root@nimble4g-05) (~) # netstat -taupen |grep 8088
              tcp 0 0 0.0.0.0:8088 0.0.0.0:* LISTEN 0 7611268 30926/nginx

              (root@nimble4g-05) (~) # /root/.phoronix-test-suite/installed-tests/pts/nginx-1.1.0/nginx_/ab -n 50000 -c 100 http://localhost:8088/test.html 2>&1
              This is ApacheBench, Version 2.3 <$Revision: 655654 $>
              Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
              Licensed to The Apache Software Foundation, http://www.apache.org/

              Benchmarking localhost (be patient)
              apr_socket_recv: Connection refused (111)

              (root@nimble4g-05) (~) # /root/.phoronix-test-suite/installed-tests/pts/nginx-1.1.0/nginx_/sbin/nginx -s quit



              ///////////////////////////////////////////////////////////////

              Here, i have run Apache or Nginx test, when i don't launched the process

              (root@nimble4g-05) (~) # /root/.phoronix-test-suite/installed-tests/pts/apache-1.6.1/httpd_/bin/ab -n 1000000 -c 100 http://localhost:8088/test.html 2>&1
              This is ApacheBench, Version 2.3 <$Revision: 1528965 $>
              Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
              Licensed to The Apache Software Foundation, http://www.apache.org/

              Benchmarking localhost (be patient)
              apr_socket_recv: Connection refused (111)

              ------

              (root@nimble4g-05) (~) # /root/.phoronix-test-suite/installed-tests/pts/nginx-1.1.0/nginx_/ab -n 50000 -c 100 http://localhost:8088/test.html 2>&1
              This is ApacheBench, Version 2.3 <$Revision: 655654 $>
              Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
              Licensed to The Apache Software Foundation, http://www.apache.org/

              Benchmarking localhost (be patient)
              apr_socket_recv: Connection refused (111)

              /////////////////////////////////////////////////

              Comment


              • #8
                up !!!

                Comment


                • #9
                  I do not know why it was working and why it stopped working, but I did run a network trace and it seems that the Apache Benchmark tool which is run to benchmark Nginx is using the IPv6 localhost rather than the IPv4, and Nginx is configured to only listen to the IPv4. So the test fails as you mentioned with a connection attempt error.

                  The solution is to edit the file ~/.phoronix-test-suite/test-profiles/pts/nginx-1.1.0/test-definition.xml
                  And to replace the keywork "localhost" by "127.0.0.1" which will force the benchmark tool to use IPv4 and thus succeed.

                  Note: to Michael Larabel, I've seen your GitHub repos for the pts software, but did not find it for the test profiles. I have no clue how to push you with the fix. Please advise for future!

                  Comment


                  • #10
                    Side note: benchmarking nginx serving static files using ab ("apache benchmark") is funny: ab uses waaaaay more resources to generate load than nginx uses to serve these requests. Needless to say, proper benchmarking of nginx proven to be tricky business. Test could easily end being bottlenecked by ... bechmark tool itself! So to get proper results it usually wise to launch ab on separate powerful physical machine (preferably far more powerful than one running nginx). Else its easy to benchmark ... ab tool itself :-)

                    Comment

                    Working...
                    X