Liutauras wrote:
> Hi all,
>
> i want to speed up agavi app and reach >500 requests per second.
> use database is false,
> development is false,
> page execution time filter shows about 0.08s
>
> i try for testing :
>
> # http_load -parallel 5 -fetches 100 urls_file.txt
> (urls_file.txt content just one line 
> http://localhost/~code/0.11/samples/pub/index.php/en/)
>
> and got poor performance  output is here:
> ------------------------------------------------------------------------------
> 100 fetches, 5 max parallel, 512800 bytes, in 5.50459 seconds
> 5128 mean bytes/connection
> 18.1667 fetches/sec, 93158.7 bytes/sec
> msecs/connect: 0.09106 mean, 0.21 max, 0.021 min
> msecs/first-response: 272.438 mean, 877.924 max, 104.075 min
> HTTP response codes:
>   code 200 -- 100
> ---------------------------------------------------------------------------------
> as you can see there is only 18 requests made per second :( what else 
> can i do?
>
> When i set use_translation == false i got ~43 requests per second.
> Shoud i turn off everything for best performance?
> I tested old old mojavi framework :) he reached 30req/s in sample page 
> with DB and smarty on.
> If i run this test on a sample php file with just one line of php code, 
> i got 2350req/sec.
>
>
> How you achieved :
> "Our largest request / second rate on an Agavi powered application is 
> approx. 2500 reqs/sec on a single server."
> and
> "Currently managing about 500 reqs/sec with an ease."
> Info taken from: http://trac.agavi.org/wiki/ShowCase/MiDaSi
>
> I run test on notebook which has: Intel Core2 CPU T7200   2.00GHz, with 
> 1 GB ram.
> Thanks for any advice
>
>   
Well, the advice I can give you is not Agavi specific (though you can 
probably improve performance by enabling per-action caching)

First and foremost, play with Apache settings, namely 
MaxRequestsPerChild and other resource allocation settings. 
MaxRequestsPerChild defines how many requests an Apache child process 
handles. You should monitor memory usage closely while running tests and 
find a value that wouldn't cause a lot of overhead but won't consume all 
the memory either (assuming PHP leaks, which it does).

Second, of course, is database optimization. Ensure that indices are 
present on the columsn that you search on. If you are running something 
more advanced than MySQL (i.e. PostgreSQL) you can additionally play 
with resource settings to achieve better performance.

Third, if you have .htaccess mod_rewrite rules, move them to the Apache 
config file, and disable .htaccess across the entire application. Kill 
Apache modules that aren't in use.

Beyond that, I suppose, you should add more RAM and switch to a faster 
server implementation e.g Lighty + FastCGI
> _______________________________________________
> users mailing list
> [email protected]
> http://lists.agavi.org/mailman/listinfo/users
>   


_______________________________________________
users mailing list
[email protected]
http://lists.agavi.org/mailman/listinfo/users

Reply via email to