Nginx isn't as fast as i expect
Brice Figureau
brice+nginx at daysofwonder.com
Thu Aug 16 15:52:34 MSD 2007
On Thu, 2007-08-16 at 13:31 +0200, somebody nobody wrote:
> A. 1 worker doesn't make any different when i test it,
> B. i must set sendfile off because in solaris sendfilev give me some
> errors
sendfile should work with tcp socket I guess, did you try ?
> C. Apache isn't running with Fastcgi and that why i am wondering why
> nginx is slower
So under apache you're using mod_php ?
Is it:
1) the same PHP version in each case
2) do they use the same php.ini file (ie maybe you have a PHP opcode
cache like APC or xcache on your apache's PHP version)
> D. spawn-fcgi -a 127.0.0.1 -s /tmp/fastcgi.socket -u nobody -g
> nogroup -C 250 -f /php/bin/php
> E. in apache i have 250 php processes too
Depending on the spec of your server 250 must be too much.
Apache usually spawns process on demand, so you might not reach more
than 200 processes with the ab command you posted earlier.
Spawn-cgi will spawns 250 processes whatever the real load is.
Maybe at 250 processes your box is swapping, but not at 200...
> F. I did try a tcp socket and it gave me the same effect
Can you check running apache with fastcgi in the same conditions to
isolate who's the culprits (fastcgi communications, unix/tcp socket, php
or the webserver in question).
HTH,
--
Brice Figureau <brice+nginx at daysofwonder.com>
More information about the nginx
mailing list