High periodic disk I/O

gpskomsa at mail.ru
Tue Jan 14 13:54:52 UTC 2014


  !

  freebsd 9.2 amd64, 16gb ram, gmirror 2.7Tb x 2, nginx 1.4.2

 Nginx  php-fpm    ,  (1-10 /).  , nginx      ,   ,     . ..  , nginx     ,       ,  .

       700 ,      10  100,      10gb.
  ,  ,   10-20  nginx     2-5 ,              .  gstat:

L(q) ops/s r/s kBps ms/r w/s kBps ms/w %busy Name
 0 55 8 120 2689 47 903 4952 91.4| ada0
 12 36 4 68 2652 32 659 5418 96.4| ada1
 12 51 12 188 2676 39 855 5410 108.2| mirror/gm

   nginx           nginx,     -     .
 :

user web;
worker_processes 8;

events {
 worker_connections 1024;
}

http {
 include mime.types;
 default_type application/octet-stream;
 sendfile on;
 tcp_nopush on;
 keepalive_timeout 65;
 gzip on;
 gzip_disable "msie6";

 proxy_cache_path /var/www/cache/static levels=2:2 keys_zone=cachearea:3000m max_size=1000000m inactive=1y;
 proxy_temp_path /var/www/cache/tmp;
 include /usr/local/etc/nginx/conf.d/*.conf;
}

server {
 listen 80;

 server_name www.domain.com;
 root /var/www/domain/public;

 access_log /var/log/domain-access_log;
 error_log /var/log/domain-error_log warn;

 sendfile off;
 aio on;

 client_max_body_size 100m;
 client_body_buffer_size 128k;

 location / {
  index index.html index.php;
  try_files $uri $uri/ /index.php$is_args$args;
 }

 location ~* /static/(?<chosturi>.*)$ {
 expires max;

 resolver 8.8.8.8;
 proxy_pass http://proxydomain.com/$chosturi?$query_string;
 proxy_cache cachearea;
 proxy_cache_key $chosturi;
 proxy_cache_valid 404 301 302 500 502 503 1h;
 proxy_cache_valid 200 204 10y;
 }

 location ~ /index\.php$ {
 include fastcgi_params;
 fastcgi_pass 127.0.0.1:9000;
 fastcgi_index index.php;
 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
 }
}

           .
.

-- 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-ru/attachments/20140114/be4e0ec1/attachment.html>


nginx-ru