Welcome! Log In Create A New Profile

Advanced

Performance question about nginx (0.4.16*) and apache prefork

Posted by xmichielx 
Performance question about nginx (0.4.16*) and apache prefork
October 15, 2009 09:16AM
Hi,

I am using an old Nginx which comes with Debian Etch or using an Aapache 2.2 prefork MPM server.
I am trying to set up nginx to be more speedy by serving static files (jpg and html).
But I find out that Apache prefork is faster serving the images then Nginx 0.4.
I know it is an old version but it is the default version shipped with Debian Etch (4.0) :(
The Nginx version used is: nginx/0.4.13

I want to try NOT to upgrade to a newer version because of the security updates installed by the Debian team.
I only want to install from source if the newer versions are way , way faster then the used old 0.4.13 version.
I only want to serve static files and not php or such or ssl.

My nginx config:
user www-data;
worker_processes 1;

error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;

events {
worker_connections 4024;
use epoll;

Turned gzip off.

How can I get a better performance on a 4 CPU 2 Ghz XEON server with 4 GB of memory instead of Apache using prefork MPM and caching?

Regards,

Michiel
Re: Performance question about nginx (0.4.16*) and apache prefork
October 15, 2009 09:43AM
Can't you use the Lenny repository? That at least has a recent 0.6.x series version if I recall correctly. I'm not really a Debian guy so I'm not certain of the feasibility of doing that.

Also, you should try increasing the number of worker processes to 4, one for each core.

I'd like to see your full config and your benchmarks if you can post them.

--
Jim Ohlstein
Re: Performance question about nginx (0.4.16*) and apache prefork
October 15, 2009 09:48AM
Hi,

I downloaded the 0.7 latest stable and am already seeing some improvements.
This is my config:

user www-data;
worker_processes 4;

error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;

events {
worker_connections 1024;
use epoll;
}

http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
access_log /var/log/nginx/access.log;

sendfile on;
tcp_nopush on;

#keepalive_timeout 0;
keepalive_timeout 5 5;
tcp_nodelay on;

# gzip on;

server {
listen 80;
server_name website;



location / {
root /home/website/onderhoud;
index index.html index.htm;
}
}


Can I tweak it some more to improve performance?
Re: Performance question about nginx (0.4.16*) and apache prefork
October 15, 2009 09:57AM
You can try gzip for html files.

--
Jim Ohlstein
Re: Performance question about nginx (0.4.16*) and apache prefork
October 15, 2009 10:18AM
ok, we aren't seeing much diffirences between the apache 2.3 and ngin 0.7 stable using both 8000 max clients.
both tests are done from the same remote machine and with siege and ab.

Am I missing significant nginx.conf modules to really speed it up?
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 250
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready