TIP: Use Markdown or, <pre> for multi line code blocks / <code> for inline code.
These forums are read-only and for archival purposes only!
Please join our new forums at discourse.kohanaframework.org
Kohana & Codeigniter Speed
  • Hi All of you,

    Please read

    Kohana vs CodeIgniter: Speed and Memory Usage Performance Benchmark

    http://thislab.com/2008/03/25/kohana-vs-codeigniter-speed-and-memory-usage-performance-benchmark

    Please post your replay, I think Kohana is better than CI. Can any one prove?

    Thank you :)
  • See the other discussion about Kohana performance.

  • This is on a Quad Xeon XServe running apache2 and php 5.2.4.

    Here's Kohana with a recent speed optimization. Kohana is about 50% faster in this test.


    bash-3.2# ab -c 100 -n 3000 http://kohanadev.imagemanagement.com/
    This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
    Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
    Copyright 2006 The Apache Software Foundation, http://www.apache.org/

    Benchmarking kohanadev.imagemanagement.com (be patient)
    Completed 300 requests
    Completed 600 requests
    Completed 900 requests
    Completed 1200 requests
    Completed 1500 requests
    Completed 1800 requests
    Completed 2100 requests
    Completed 2400 requests
    Completed 2700 requests
    Finished 3000 requests


    Server Software: Apache/2.2.6
    Server Hostname: kohanadev.imagemanagement.com
    Server Port: 80

    Document Path: /
    Document Length: 5414 bytes

    Concurrency Level: 100
    Time taken for tests: 30.245100 seconds
    Complete requests: 3000
    Failed requests: 0
    Write errors: 0
    Total transferred: 16996344 bytes
    HTML transferred: 16246094 bytes
    Requests per second: 99.19 [#/sec] (mean)
    Time per request: 1008.170 [ms] (mean)
    Time per request: 10.082 [ms] (mean, across all concurrent requests)
    Transfer rate: 548.75 [Kbytes/sec] received

    Connection Times (ms)
    min mean[+/-sd] median max
    Connect: 0 0 2.0 0 32
    Processing: 32 1000 297.2 959 2001
    Waiting: 30 946 252.5 947 1854
    Total: 40 1001 297.1 960 2002

    Percentage of the requests served within a certain time (ms)
    50% 960
    66% 1113
    75% 1198
    80% 1203
    90% 1398
    95% 1605
    98% 1794
    99% 1807
    100% 2002 (longest request)



    =====================

    And heres CI:

    mail:~ admin$ ab -c 100 -n 3000 http://kohanadev.imagemanagement.com/
    This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
    Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
    Copyright 2006 The Apache Software Foundation, http://www.apache.org/

    Benchmarking kohanadev.imagemanagement.com (be patient)
    Completed 300 requests
    Completed 600 requests
    Completed 900 requests
    Completed 1200 requests
    Completed 1500 requests
    Completed 1800 requests
    Completed 2100 requests
    Completed 2400 requests
    Completed 2700 requests
    Finished 3000 requests


    Server Software: Apache/2.2.6
    Server Hostname: kohanadev.imagemanagement.com
    Server Port: 80

    Document Path: /
    Document Length: 1330 bytes

    Concurrency Level: 100
    Time taken for tests: 55.553866 seconds
    Complete requests: 3000
    Failed requests: 0
    Write errors: 0
    Total transferred: 4695000 bytes
    HTML transferred: 3990000 bytes
    Requests per second: 54.00 [#/sec] (mean)
    Time per request: 1851.796 [ms] (mean)
    Time per request: 18.518 [ms] (mean, across all concurrent requests)
    Transfer rate: 82.51 [Kbytes/sec] received

    Connection Times (ms)
    min mean[+/-sd] median max
    Connect: 0 0 1.8 0 40
    Processing: 55 1847 3143.9 838 14740
    Waiting: 24 670 461.8 640 2568
    Total: 55 1848 3143.8 838 14740

    Percentage of the requests served within a certain time (ms)
    50% 838
    66% 1037
    75% 1198
    80% 1326
    90% 5446
    95% 10534
    98% 13728
    99% 13995
    100% 14740 (longest request)
  • Athlon64 3200+ running IIS6 with PHP 5.2.5:

    CI 1.6

    Response Time (secs)
    avg 0.49
    stdev 0.07
    min 0.06
    50th % 0.48
    80th % 0.52
    90th % 0.55
    95th % 0.56
    99th % 0.72
    max 0.72

    Throughput (req/sec)
    avg 34.58
    stdev 11.96
    min 6
    50th % 40
    80th % 40
    90th % 40
    95th % 42
    99th % 42
    max 42

    ==============

    Kohana 2.1.1

    Response Time (secs)
    avg 0.33
    stdev 0.05
    min 0.23
    50th % 0.31
    80th % 0.33
    90th % 0.36
    95th % 0.38
    99th % 0.59
    max 0.69

    Throughput (req/sec)
    avg 56.55
    stdev 16.49
    min 7
    50th % 61
    80th % 63
    90th % 63
    95th % 63
    99th % 63
    max 63

    ==============

    Kohana SVN r2555

    Response Time (secs)
    avg 0.31
    stdev 0.05
    min 0.20
    50th % 0.30
    80th % 0.30
    90th % 0.34
    95th % 0.34
    99th % 0.59
    max 0.67

    Throughput (req/sec)
    avg 60.36
    stdev 18.74
    min 4
    50th % 66
    80th % 67
    90th % 67
    95th % 68
    99th % 68
    max 68

    ==============

    Kohana SVN with same optimisation as Zombor

    Response Time (secs)
    avg 0.24
    stdev 0.03
    min 0.05
    50th % 0.23
    80th % 0.25
    90th % 0.25
    95th % 0.28
    99th % 0.28
    max 0.30

    Throughput (req/sec)
    avg 77.55
    stdev 12.40
    min 46
    50th % 81
    80th % 84
    90th % 86
    95th % 87
    99th % 87
    max 87
  • I found this very interesting:

    63+ Best Practices for PHP Performance

    When performance is critical, is always good to know new tips.

  • Kohana being better than CI is more than just abut speed ;) (for me anyway).

    BTW what is that optimisation? Is it in the SVN yet? wants :D

  • It's in svn. What it does is cache the Kohana::find_file method between requests. If you have enabled several include paths, Kohana will search all of them to find a file. When the cache is on, it won't have to.
  • Ah! Nice... thanks Dlib.

    I tried to bench Kohana this morning on my server: but it's clustered so the performance certainly is not accurate and the results were fairly worthless :P

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion