Поэксперементировал  еще  немного, но  пока    не получается понять,  где
затык.  Конфиг   nginx:
user                    www  www;
worker_processes        auto;
worker_rlimit_nofile    200000;
error_log               /var/log/nginx/nginx-error_log warn;



events {
        worker_connections      8192;
        use                     kqueue;
        multi_accept on;
}


http {
        access_log                      off;

        include                         mime.types;
        include                         win-utf;
        default_type                    application/octet-stream;


        log_format inc
'$host;$remote_addr;$status;$upstream_response_time;$upstream_addr;$upstream_status;$http_x_forwarded_for;$time_local;$request;$http_user_agent';

        sendfile                        on;
        tcp_nopush                      on;
        tcp_nodelay                     on;
        sendfile_max_chunk              32m;
        reset_timedout_connection       on;

        client_header_buffer_size       16k;
        large_client_header_buffers     4 8k;
        client_max_body_size            5m;
        client_body_buffer_size         128k;

        variables_hash_max_size         1024;
        server_names_hash_bucket_size   256;

        keepalive_timeout               15;
        client_body_timeout             10s;
        client_header_timeout           10s;
        lingering_time                  10s;
        send_timeout                    10s;
        
        #gzip
        gzip                            on;
        gzip_min_length                 2048;
        gzip_comp_level                 4;
        gzip_http_version               1.0;
        gzip_proxied                    any;
        gzip_buffers                    32 64k;
        gzip_types                      text/plain text/xml text/css 
text/javascript application/xml
application/x-javascript  application/atom+xml application/xaml+xml
application/rtf application/json;
        gzip_vary                       off;


        open_file_cache                 max=30000 inactive=60s;
        open_file_cache_valid           60s;
        open_file_cache_min_uses        2;
        open_file_cache_errors          on;

        #Proxy
        proxy_buffers                   512 8k;
        proxy_buffer_size               64k;
        output_buffers                  32 512k;

        proxy_send_timeout              180;
        proxy_read_timeout              180;
}
Sysctl:
security.bsd.see_other_uids=0
kern.ipc.maxsockets=204800
kern.ipc.nmbclusters=262144
kern.ipc.shm_use_phys=1
kern.ipc.somaxconn=4096
kern.maxfiles=204800
kern.maxfilesperproc=200000
kern.maxvnodes=256000
kern.random.sys.harvest.ethernet=0
kern.random.sys.harvest.interrupt=0
kern.sync_on_panic=1
net.inet.icmp.bmcastecho=0
net.inet.icmp.drop_redirect=1
net.inet.icmp.maskrepl=0
net.inet.ip.intr_queue_maxlen=256
net.inet.ip.maxfragpackets=1024
net.inet.ip.portrange.first=1024
net.inet.ip.portrange.last=65535
net.inet.ip.portrange.randomized=0
net.inet.ip.redirect=0
net.inet.ip.sourceroute=0
net.inet.ip.accept_sourceroute=0
net.inet.tcp.blackhole=2
net.inet.tcp.drop_synfin=1
net.inet.tcp.fast_finwait2_recycle=1
net.inet.tcp.finwait2_timeout=3000
net.inet.tcp.hostcache.expire=1200
net.inet.tcp.keepinit=5000
net.inet.tcp.maxtcptw=65536
net.inet.tcp.msl=5000
net.inet.tcp.recvbuf_auto=0
net.inet.tcp.recvspace=65536
net.inet.tcp.sendbuf_auto=0
net.inet.tcp.sendspace=131072
net.inet.tcp.syncookies=1
net.inet.tcp.tso=0
net.inet.udp.blackhole=1
net.inet.udp.recvspace=32768
net.isr.direct=1
net.route.netisr_maxqlen=1024
vfs.ufs.dirhash_maxmem=100000000

loader.conf:
kern.ipc.nmbclusters=0
net.inet.tcp.reass.maxsegments=2048
vm.pmap.shpgperproc=400
hw.em.rxd=4096
hw.em.txd=4096
hw.em.rx_int_delay=100
hw.em.tx_int_delay=100
hw.em.rx_abs_int_delay=1000
hw.em.tx_abs_int_delay=1000
dev.em.rx_processing_limit=-1
net.inet.tcp.hostcache.hashsize=4096
net.inet.tcp.hostcache.bucketlimit=100
net.inet.tcp.hostcache.cachelimit=65536
net.inet.tcp.syncache.hashsize=1024
net.inet.tcp.syncache.bucketlimit=100
net.inet.tcp.syncache.cachelimit=65536
net.inet.tcp.tcbhashsize=4096
net.isr.defaultqlimit=4096
net.isr.bindthreads=1
net.isr.maxthreads=8
net.link.ifqmaxlen=1024

Сократил  размер файла  до 1  Кб 
LA ~5  при  16  ядрах
IO   в порядке,   загрузка сети  около 130 мегабит/c

Posted at Nginx Forum: 
http://forum.nginx.org/read.php?21,259544,259693#msg-259693

_______________________________________________
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru

Ответить