CodeIgniter Forums
Can i go faster? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Can i go faster? (/thread-42242.html)



Can i go faster? - El Forum - 05-31-2011

[eluser]Rogier[/eluser]
I'm building a small modular CMS. But can i get more request/second? How do i do this. I already use phil sturgeon's cache lib. My queries are fast according to the profiler lib.
Apache benchmark:
Code:
Document Path:          /atom/index
Document Length:        23545 bytes

Concurrency Level:      10
Time taken for tests:   46.31786 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      24346000 bytes
HTML transferred:       23545000 bytes
Requests per second:    21.72 [#/sec] (mean)
Time per request:       460.318 [ms] (mean)
Time per request:       46.032 [ms] (mean, across all concurrent requests)
Transfer rate:          516.49 [Kbytes/sec] received

Should i cache the total output?(cause all i'm caching now is the pagedata).

Greets


Can i go faster? - El Forum - 06-01-2011

[eluser]WanWizard[/eluser]
Before you start, you'll first have to determine what element in the chain causes an average of 46ms per request.
No point spending time on something that only accounts for 1% of that time.

Are you testing locally or over the internet? A transfer rate of half an Mbps strikes me as very low, and can most likely not be optimized by modifying the application.


Can i go faster? - El Forum - 06-01-2011

[eluser]Rogier[/eluser]
Thanks for your reply. This is tested on localhost. And i think the cause is the "build" function of Template library phil sturgeon.... According to the benchmarking I did in the Template class. Is dit a normal request/second result?


Can i go faster? - El Forum - 06-01-2011

[eluser]WanWizard[/eluser]
Install xdebug, do some profile runs, use cachegrind to check where in the request the time is spend. It's much more reliable then benchmarking.