ПРОЕКТЫ 


  АРХИВ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  СТАТЬИ 


  ПЕРСОНАЛЬНОЕ 


  ПРОГРАММЫ 



ПИШИТЕ
ПИСЬМА












     АРХИВ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

статус воркера *G iant



Hello
Довольно часто наблюдаю такую картину в топе
114 processes: 1 running, 112 sleeping, 1 lock
80171 www          1   4   -5  4228K  3712K *Giant 270:22  2.88% nginx

6.1-RELEASE
nginx -V
nginx version: nginx/0.6.1
configure arguments: --prefix=/usr/local/etc/nginx --with-cc-opt=-I /usr/local/include --with-ld-opt=-L /usr/local/lib --conf-path=/usr/local/etc/nginx/nginx.conf --sbin-path=/usr/local/sbin/nginx --pid-path=/var/run/nginx.pid --http-client-body-temp-path=/var/tmp/nginx/client_body_temp --http-proxy-temp-path=/var/tmp/nginx/proxy_temp --http-fastcgi-temp-path=/var/tmp/nginx/fastcgi_temp --http-log-path=/var/log/nginx-access.log --error-log-path=/var/log/nginx-error.log --with-http_stub_status_module --user=www --group=www

конфиг nginx вложил(в живом конфиге ещё где-то 20 аналогичных доменов на этих же ИП), трафик в подавляющем большинстве статика, ~30-60Мбит,в пике бывает до кратковременного упирания в интерфейс. Запросы в nginx заворачиваются файерволом
ipfw add 900 fwd xx.xx.xx.xx,8000 tcp from not me to xx.xx.xx.xx dst-port 80 in
ipfw add 901 fwd yy.yy.yy.yy,8000 tcp from not me to yy.yy.yy.yy dst-port 80 in

сетевая fxp, поллинг включен, idle_poll включен

netstat -m
2946/8544/11490 mbufs in use (current/cache/total)
1654/3640/5294/25600 mbuf clusters in use (current/cache/total/max)
1654/3639 mbuf+clusters out of packet secondary zone in use (current/cache)
0/0/0/0 4k (page size) jumbo clusters in use (current/cache/total/max)
0/0/0/0 9k jumbo clusters in use (current/cache/total/max)
0/0/0/0 16k jumbo clusters in use (current/cache/total/max)
4044K/9416K/13460K bytes allocated to network (current/cache/total)
3042199/72299/55299 requests for mbufs denied (mbufs/clusters/mbuf+clusters)
0/0/0 requests for jumbo clusters denied (4k/9k/16k)
1116/3946/6656 sfbufs in use (current/peak/max)
0 requests for sfbufs denied
0 requests for sfbufs delayed
618732 requests for I/O initiated by sendfile
104 calls to protocol drain routines

mbufs denied не растут
user  www;
worker_processes  1;
worker_priority  -5; 
#error_log  logs/error.log;
#error_log  logs/error.log  notice;
error_log  /var/log/nginx/error.log  info;

pid        /var/run/nginx.pid;


events {
    worker_connections  5000;
}


http {
    include       mime.types;
    default_type  application/octet-stream;

    log_format  main  '$remote_addr - $remote_user [$time_local] $request '
                      '"$status" $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    sendfile        on;
    tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  5;
    tcp_nodelay        on;
    reset_timedout_connection on;

    gzip  off;
    gzip_min_length  1100;
    gzip_buffers     4 8k;
    gzip_types       text/plain;

    output_buffers   1 32k;
    postpone_output  1460;

    server_names_hash_bucket_size 128;

    proxy_buffers 16 64k; 
    proxy_set_header        X-Real-IP  $remote_addr;
    proxy_set_header        Host    $host;
    proxy_pass_header   X-Forwarded-For;
    proxy_read_timeout 3600;
    proxy_send_timeout 3600;

    server{
            listen      127.0.0.1:8000;
            server_name 127.0.0.1;
            access_log  off;
            error_log   off;
            stub_status on;
    }

    server {
        listen      xx.xx.xx.xx:8000 default sndbuf=98304 backlog=2048 
accept_filter=httpready;
        server_name domen1.com www.domen1.com;
        set $mydocroot /home/user/domains/domen1.com/public_html;
        #access_log  /var/log/nginx/domen1.com.access.log  main;
        access_log  off;
        error_log  /var/log/nginx/domen1.com.error.log  warn;

        location / {
                proxy_pass   http://xx.xxx.xx.xx:80;
        }

        location ~ 
\.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js)$
 {
                
                index  index.html index.htm index.php index.shtml;
                
                access_log off;
                root $mydocroot;            
        }

        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }

        location ~ /\.ht {
            deny  all;
        }
    }

    server {
        listen    yy.yy.yy.yy:8000  default sndbuf=98304 backlog=2048 
accept_filter=httpready;
        server_name domen2.com www.domen2.com;
        set $mydocroot /home/user/domains/domen2.com/public_html;
        #access_log  /var/log/nginx/domen2.com.access.log  main;
        access_log  off;
        error_log  /var/log/nginx/domen2.com.error.log  warn;

        location / {
                proxy_pass   http://yy.yy.yy.yy:80;
        }

        location ~ 
\.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js)$
 {
                
                index  index.html index.htm index.php index.shtml;
                
                access_log off;
                root $mydocroot;            
        }

        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }

        location ~ /\.ht {
            deny  all;
        }
    }


}


 




Copyright © Lexa Software, 1996-2009.