ðòïåëôù 


  áòèé÷ 


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]

Re: íÅÄÌÅÎÎÁÑ ÏÔÄÁÞÁ ÐÒÉ ×É ÄÅÏÓÔÒÉÍÉÎÇÅ


  • To: nginx-ru@xxxxxxxxx
  • Subject: Re: íÅÄÌÅÎÎÁÑ ÏÔÄÁÞÁ ÐÒÉ ×É ÄÅÏÓÔÒÉÍÉÎÇÅ
  • From: Slava Kokorin <slava.kokorin@xxxxxxxxx>
  • Date: Fri, 26 Mar 2010 18:22:55 +0300
  • Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:received:message-id:subject:from:to:content-type; bh=EtQyioNK9tVHr7cojB4AsFxPMSOfFKCMQ6RaLjb2FMI=; b=k9XRaOoGeTM6XEXKlZPnyHL1Spq8SXZbtXjl5idoApFP3DKiAwscq4msobsO42N8L7 at5NceVlCKmzSnMbRiKjKRkTrqmao4iBGrVslxLLfvNmtNzld6alMnsM/G6rY+2uGbKm VSXokVN/mplvYqdJAAnEU1ZeXsESYkMlV0Hp0=
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=CXP4/++jSAdbNhcqQuS8YOT4kVgloh9XS06ZC5vyjpR3yVR2E1iHQl7A0+7HW7pGDg FS3pkJ3KcmknZHXHt2crU6CoNhUrn9jRrAKYPhp8dqxjt6WYyzIuNKJyBN3trfiSgVtW lePuFODGZBp/FnEYoEzhYpdWQlO0MRVazuImw=
  • In-reply-to: <76f87383c6bdc566fd18e1f13856713c.NginxMailingListRussian@xxxxxxxxxxxxxxx>
  • References: <76f87383c6bdc566fd18e1f13856713c.NginxMailingListRussian@xxxxxxxxxxxxxxx>

ñ ÂÙ ÐÏÐÒÏÂÏ×ÁÌ ÏÇÒÁÎÉÞÉÔØ ÓËÏÒÏÓÔØ ÄÌÑ ÓÔÒÉÍÉÎÇ location-Ï×.š ïÔÄÁ×ÁÔØ × ÐÏÌÏ×ÉÎÕ ÍÉÎÉÍÁÌØÎÏ ÎÅÏÂÈÏÄÉÍÏÊ ÓËÏÒÏÓÔÉ ÎÁÐÒÉÍÅÒ.

á ÐÏÞÅÍÕ Õ ×ÁÓ × location / {}

proxy_buffering š š š š š šoff;š
É
sendfile off;

ó ËÁËÏÊ-ÔÏ ÃÅÌØÀ?


round-robin × gmirror ËÓÔÁÔÉ ÎÅ ÆÁËÔ ÞÔÏ ÄÁ£Ô ÏÖÉÄÁÅÍÙÊ ÐÒÉÒÏÓÔ × ÓËÏÒÏÓÔÉ ÞÔÅÎÉÑ, Á ÎÅ ÎÁÏÂÏÒÏÔ. ñ ÂÙ ÏÔÄÁ×ÁÌ flv É mp4 Ó ÏÔÄÅÌØÎÏ ÓÔÏÑÝÉÈ ×ÉÎÔÏ×.


26 ÍÁÒÔÁ 2010 Ç. 17:40 ÐÏÌØÚÏ×ÁÔÅÌØ kyxap <nginx-forum@xxxxxxxx> ÎÁÐÉÓÁÌ:
FreeBSD 7.2 i386, dual xeon X3230, 4Gb, 2x500Gb SATA2 7200rpm Ó ÏÔËÌÀÞÅÎÎÙÍ AHCI × gmirror round-robin, ÏÐÃÉÉ newfs ÓÔÁÎÄÁÒÔÎÙÅ.
îÅÍÎÏÇÏ php-ÓËÒÉÐÔÏ× ÎÁ ÁÐÁÞÅ, ÞÅÒÅÚ H264 Streaming Module 2 ÓÔÒÉÍÉÔÓÑ ×ÉÄÅÏ.
òÁÚÍÅÒ mp4/flv ÆÁÊÌÏ× ÏÔ 200 ÄÏ 400 ÍÅÇÁÂÁÊÔ É ÓÏ×ÓÅÍ ÞÕÔØ-ÞÕÔØ html-ÆÁÊÌÏ×.
ë ÓÏÖÁÌÅÎÉÀ, ÎÅ ÍÏÇÕ ÄÏÂÉÔØÓÑ ÓËÏÒÏÓÔÉ ÏÔÄÁÞÉ ÂÏÌØÛÅ150 ÍÅÇÁÂÉÔ - ×ÉÎÔÙ ÚÁÇÉÂÁÀÔÓÑ, ÞÔÏ ÍÎÅ ËÁÖÅÔÓÑ ÓÔÒÁÎÎÙÍ.
÷ËÌÀÞÉÌ ÐÏÄÄÅÒÖËÕ AIO, ÜÔÏ ÄÏÂÁ×ÉÌÏ ÐÏÒÑÄËÁ 20 ÍÅÇÁÂÉÔ, ÎÏ ×ÓÅ ÒÁ×ÎÏ Ë šÖÅÌÁÅÍÏÍÕ ÒÅÚÕÌØÔÁÔÕ 250+ ÍÅÇÁÂÉÔ ÎÅ ÐÒÉ×ÅÌÏ.
þÔÏ-ÔÏ ÎÅ ÔÁË Ó ÎÁÓÔÒÏÊËÁÍÉ nginx? é ÓÍÏÖÅÔ ÌÉ ÐÏÍÏÞØ ÄÏÂÁ×ÌÅÎÉÅ × ÍÁÓÓÉ× ÅÝÅ 1-2È ÄÉÓËÏ× ÉÌÉ ÚÁÍÅÎÁ ÜÔÉÈ Ä×ÕÈ ÄÉÓËÏ× ÎÁ Raptor'Ù?

gstat
dT: 1.001s šw: 1.000s
šL(q) šops/s š šr/s š kBps š ms/r š šw/s š kBps š ms/w š %busy Name
š š0 š š š0 š š š0 š š š0 š š0.0 š š š0 š š š0 š š0.0 š š0.0 šacd0
š 11 š š 82 š š 82 š 9247 š110.2 š š š0 š š š0 š š0.0 š100.3 šad4
š š0 š š š0 š š š0 š š š0 š š0.0 š š š0 š š š0 š š0.0 š š0.0 šad4s1
š 12 š š 89 š š 89 š 9906 š157.1 š š š0 š š š0 š š0.0 š101.1 šad6
š 23 š š171 š š171 š19153 š134.7 š š š0 š š š0 š š0.0 š100.3 šmirror/gm0
š š0 š š š0 š š š0 š š š0 š š0.0 š š š0 š š š0 š š0.0 š š0.0 šad6s1
š 23 š š171 š š171 š19153 š134.7 š š š0 š š š0 š š0.0 š100.3 šmirror/gm0s1
š š0 š š š0 š š š0 š š š0 š š0.0 š š š0 š š š0 š š0.0 š š0.0 šmirror/gm0s1a
š š0 š š š0 š š š0 š š š0 š š0.0 š š š0 š š š0 š š0.0 š š0.0 šmirror/gm0s1b
š š0 š š š0 š š š0 š š š0 š š0.0 š š š0 š š š0 š š0.0 š š0.0 šmirror/gm0s1c
š š0 š š š0 š š š0 š š š0 š š0.0 š š š0 š š š0 š š0.0 š š0.0 šmirror/gm0s1d
š š0 š š š0 š š š0 š š š0 š š0.0 š š š0 š š š0 š š0.0 š š0.0 šmirror/gm0s1e
š 23 š š171 š š171 š19153 š134.7 š š š0 š š š0 š š0.0 š100.3 šmirror/gm0s1f

štop
last pid: 21185; šload averages: š0.16, š0.23, š0.18 šup 3+14:09:45 š š03:09:50
73 processes: š1 running, 72 sleeping
Mem: 2195M Active, 869M Inact, 269M Wired, 137M Cache, 112M Buf, 36M Free
Swap: 2048M Total, 244K Used, 2048M Free
šPID USERNAME šTHR PRI NICE š SIZE š šRES STATE šC š TIME š WCPU COMMAND
18471 www š š š š 1 š-8 š š0 š1070M š1016M biord š1 š 1:25 š3.56% nginx
18470 www š š š š 1 š-4 š š0 š1176M š1106M ufs š š2 š 1:22 š2.29% nginx

netstat -m
7515/7470/14985 mbufs in use (current/cache/total)
1374/1772/3146/65536 mbuf clusters in use (current/cache/total/max)
1374/1186 mbuf+clusters out of packet secondary zone in use (current/cache)
5858/5980/11838/12800 4k (page size) jumbo clusters in use (current/cache/total/max)
0/0/0/6400 9k jumbo clusters in use (current/cache/total/max)
0/0/0/3200 16k jumbo clusters in use (current/cache/total/max)
28058K/29331K/57390K bytes allocated to network (current/cache/total)
0/0/0 requests for mbufs denied (mbufs/clusters/mbuf+clusters)
0/0/0 requests for jumbo clusters denied (4k/9k/16k)
82/8074/32768 sfbufs in use (current/peak/max)
0 requests for sfbufs denied
0 requests for sfbufs delayed

stub
Active connections: 680
server accepts handled requests
š6749 6749 18797
Reading: 0 Writing: 643 Waiting: 37

nginx.conf

worker_processes 2;

events {
šworker_connections 4096;
šuse kqueue;
}

http {
šserver_names_hash_bucket_size 128;
šinclude mime.types;
šdefault_type application/octet-stream;
šaccess_log off;
šserver_tokens off;
šsendfile off;
šaio on;
šdirectio 2m;
šoutput_buffers 1 2m;
štcp_nopush on;
štcp_nodelay on;
škeepalive_timeout 15;
šconnection_pool_size 2k;
šrequest_pool_size 4k;
šgzip on;
šgzip_proxied š š any;
šgzip_comp_level 9;
šgzip_types text/plain text/css application/json application/x-_javascript_ text/xml application/xml application/xml+rss text/_javascript_;
šserver {
š šlisten 11.22.33.44:80;
š šserver_name site.com www.site.com;
š šroot /home/user/site.com;
š šindex index.html index.htm;
š šaccess_log off;

š šlocation / {
š š šproxy_pass š š š š http://127.0.0.1:80;
š š šproxy_redirect š š default;
š š šproxy_set_header š Host š š š š š š $host;
š š šproxy_set_header š X-Real-IP š š š š$remote_addr;
š š šclient_max_body_size š š š 50m;
š š šclient_body_buffer_size š š128k;
š š šreset_timedout_connection šon;
š š šproxy_buffering š š š š š šoff;
š š šproxy_connect_timeout š š š90;
š š šproxy_send_timeout š š š š 90;
š š šproxy_read_timeout š š š š 90;
š š šproxy_buffer_size š 4k;
š š šproxy_buffers š š š š š š š4 32k;
š š šproxy_busy_buffers_size š š64k;
š š šproxy_temp_file_write_size 64k;
š š šcharset š š š š off;
š š}

š šlocation ~ \.flv$ {
š š š šflv;
š š š šroot /home/user/site.com;
š š}

š šlocation ~ \.mp4$ {
š š š šmp4;
š š š šroot /home/user/site.com;
š š}

š šlocation ~* ^.+\.(gif|jpg|jpeg|png|ico|bmp|mpg|mp3|mpeg|avi|wmv|js|css)$ {
š š šroot /home/user/site.com;
š š}
}

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


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



--
Regards,
Slava
_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru


 




Copyright © Lexa Software, 1996-2009.