ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

1500 Requests per second for CodeIgniter 2.0? Am I missing something?

May 03, 2010 3:58pm

Subscribe [2]
  • #1 / May 03, 2010 3:58pm

    Mareshal

    230 posts

    I tried to benchmark the new codeigniter now, but I got some strange values.

    ab -c 100 -n 10000 http://localhost/codeigniter

    Time taken for tests: 6.571 seconds
    Failed requests: 0
    Write errors: 0
    Requests per second: 1521.75
    Time per request: 0.657 ms

    XAMPP 1.7.2(apache 2.2.13), PHP 5.3.1, Windows 7, CodeIgniter 2.0

    Asus Laptop, Inter core i3, 2.26 Ghz, 3GB RAM


    First time I said is correct, but CakePHP got 1300 requests per second, which is impossible.

  • #2 / May 03, 2010 4:43pm

    WanWizard

    4475 posts

    What are you exactly testing here?

    This same test, on an ‘out of the box CI 1.7.2’ with welcome controller gives me:

    Time taken for tests:   82.212 seconds
    Complete requests:      10000
    Failed requests:        0
    Write errors:           0
    Total transferred:      14880000 bytes
    HTML transferred:       12690000 bytes
    Requests per second:    121.64 [#/sec] (mean)
    Time per request:       822.121 [ms] (mean)
    Time per request:       8.221 [ms] (mean, across all concurrent requests)
    Transfer rate:          176.75 [Kbytes/sec] received

    on my development laptop, a Dell Precision M6300, Core 2 Duo T9500, Fedora 12 x64, PHP 5.3.2.

  • #3 / May 03, 2010 4:53pm

    Mareshal

    230 posts

    What command did you use?

    I was reading this: http://paul-m-jones.com/archives/236 and this http://www.alrond.com/en/2007/jan/25/performance-test-of-6-leading-frameworks/ . Used same commands and got huge results.

    check these results: http://static.alrond.com/results_ci.txt

    What am I missing here?

    OK my mistake, I must admin. I was testing http://localhost/codeigniter instead of http://localhost/codeigniter/index.php/welcome

    Sorry !!!

  • #4 / May 03, 2010 5:29pm

    WanWizard

    4475 posts

    The same as you:

    ab -c 100 -n 10000 <a href="http://test.catwoman.mydomain.local/">http://test.catwoman.mydomain.local/</a>

    I have a default .htaccess for all my CI sites, which I dropped in. That might have slowed things down a bit, but made sure the URL above gave me the output of the welcome controller.

  • #5 / May 03, 2010 5:33pm

    Mareshal

    230 posts

    Yes, I get the data from Welcome/Index because is the default controller, but I think “ab” doesn’t know to look for index.php, only checks the directory.

  • #6 / May 03, 2010 5:40pm

    WanWizard

    4475 posts

    I tried to recreate paul jones’ reference test:

    ab -c 10 -t 60 <a href="http://test.catwoman.mydomain.local/helloworld.html">http://test.catwoman.mydomain.local/helloworld.html</a>

    Results:

    Time taken for tests:   60.185 seconds
    Complete requests:      7326
    Failed requests:        0
    Write errors:           0
    Total transferred:      2227104 bytes
    HTML transferred:       87912 bytes
    Requests per second:    121.72 [#/sec] (mean)
    Time per request:       82.153 [ms] (mean)
    Time per request:       8.215 [ms] (mean, across all concurrent requests)
    Transfer rate:          36.14 [Kbytes/sec] received

    And he scores 808 #/sec on a puny Mac G4 mini? Must be running stripped to the bone or heavily tuned, I find that a bit hard to believe…

  • #7 / May 03, 2010 6:19pm

    Mareshal

    230 posts

    I also tried to recreate it and I got better results than him.

    ab -c 10 -t 60 <a href="http://localhost/hello.html">http://localhost/hello.html</a>

    😊

    Server Software:        Apache/2.2.14
    Server Hostname:        localhost
    Server Port:            80
    
    Document Path:          /hello.html
    Document Length:        12 bytes
    
    Concurrency Level:      10
    Time taken for tests:   32.554 seconds
    Complete requests:      50000
    Failed requests:        0
    Write errors:           0
    Total transferred:      19550000 bytes
    HTML transferred:       600000 bytes
    Requests per second:    1535.92 [#/sec] (mean)
    Time per request:       6.511 [ms] (mean)
    Time per request:       0.651 [ms] (mean, across all concurrent requests)
    Transfer rate:          586.47 [Kbytes/sec] received

    I got even better results.

    Edit: Check this topic: http://ellislab.com/forums/viewthread/154056/ - How fast is your HelloWorld.html ? :D

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases