| From | Sent On | Attachments |
|---|---|---|
| somebody nobody | Aug 16, 2007 3:15 am | |
| Igor Clark | Aug 16, 2007 3:37 am | |
| Igor Sysoev | Aug 16, 2007 4:03 am | |
| Brice Figureau | Aug 16, 2007 4:20 am | |
| somebody nobody | Aug 16, 2007 4:21 am | |
| somebody nobody | Aug 16, 2007 4:31 am | |
| seun...@public.gmane.org | Aug 16, 2007 4:46 am | |
| Brice Figureau | Aug 16, 2007 4:52 am | |
| seun...@public.gmane.org | Aug 16, 2007 5:00 am | |
| Joey | Aug 16, 2007 7:45 am | |
| Aleksandar Lazic | Aug 17, 2007 1:18 am | |
| seun...@public.gmane.org | Aug 18, 2007 11:21 pm |
| Subject: | Re: Nginx isn't as fast as i expect | |
|---|---|---|
| From: | seun...@public.gmane.org (seun...@public.gmane.org) | |
| Date: | Aug 16, 2007 5:00:32 am | |
| List: | ru.sysoev.nginx | |
We have to specifically tell him to reduce the number of fastcgi worker processes to something like 4, really. Anything more than 4 fastcgi processes is too much with nginx as your front end. two many processes fill up the l2 cache with junk and kill performance, it's not just swapping! The primary advantage of nginx is that you can handle more users with less processes.
On 8/16/07, Brice Figureau <brice+ngin...@public.gmane.org>
wrote:
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+ngin...@public.gmane.org>
-- Seun Osewa http://www.nairaland.com [vast Nigerian forum]





