CodeIgniter Forums

Full Version: Can i go faster?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

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:
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).


El Forum

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.

El Forum

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?

El Forum

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.