this is my config for a web server that does only static files mostly
gifs,
pngs and jpgs… is there any improvement i can do in this like is there
some
sort of caching that can be enabled? or any other improvements that can
be
done to this…
#user mark;
worker_processes 1;
error_log logs/error_staticfarm.log;
pid logs/nginx_staticfarm.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
#access_log logs/access_staticfarm.log;
sendfile on;
#tcp_nopush on;
keepalive_timeout 0;
#keepalive_timeout 10;
gzip on;
server {
listen 6080;
server_name localhost;
#access_log logs/host.access.log main;
location /nginx_status {
stub_status on;
access_log off;
}
location /static{
root /home/mark/staticfarm/;
access_log off;
}
}
}
Off the top of my head, I don’t know if gzipping binary image data is
going to get you much except overhead - it’s probably a narrow
calculation though
OK , I will turn it OFF… is there anything else that can be improved…
?
thanks a lot
On Monday 28 January 2008, Igor C. wrote:
Off the top of my head, I don’t know if gzipping binary image data is
going to get you much except overhead - it’s probably a narrow
calculation though
gzip module will compress only mimetypes selected by directive
gzip_types
which is default limited to text/html
On 1/28/08, [email protected] [email protected] wrote:
pid logs/nginx_staticfarm.pid;
sendfile on;
location /nginx_status {
stub_status on;
access_log off;
}
location /static{
root /home/mark/staticfarm/;
access_log off;
}
}
}
If you have more than one cpu, you could up the worker_processes to
match the number of cpus you have. Depends on the traffic load you are
expecting though.
You may want to bump worker_connections as well.
max_clients = worker_processes * worker_connections
On 1/28/08, [email protected] [email protected] wrote:
sort of caching that can be enabled? or any other improvements that can
events {
#tcp_nopush on;
stub_status on;
If you have more than one cpu, you could up the worker_processes to
match the number of cpus you have. Depends on the traffic load you are
is this number of cpus or number of cores? if I have two quad cores,
worker_process = 8
is this right?
If the server is only serving the media files, then yea. In fact, you
could probably bump it slightly over the number of cores you have, so
that any processes waiting for IO can get some processing time in for
request handling (header parsing etc).
If that box is doing other things, then adjust accordingly for
whatever else is running.
On Jan 28, 2008 10:59 AM, eliott [email protected] wrote:
#user mark;
default_type application/octet-stream;
server {
}
}
}
If you have more than one cpu, you could up the worker_processes to
match the number of cpus you have. Depends on the traffic load you are
is this number of cpus or number of cores? if I have two quad cores,
worker_process = 8
is this right?