Welcome! Log In Create A New Profile

Advanced

дисковая нагрузка приводит к ребуту

Михаил Монашёв
September 12, 2010 08:54AM
Здравствуйте.

Есть сервер, использующийся как хранилище кучи мелких файлов. Если на
нём спомощью вебдава эти файлы копировать и перемещать, создавая тем
самыми большую нагрузку на диск, то воркеры начинают висеть в
состоянии biord или ufs или wdrain или suspfs, а в состоянии kqread
ниодного не остаётся. gstat показывает полную загрузку разделов, к
которым обращается nginx. FreeBSD 8.1 начинает тормозить, ибо диски не
справляются, и через некоторое перезагружается. vmstat -z не
показывает превышения лимитов. Используется AIO. Корки пока нет.
Скажите пожалуйста, что может выедать nginx при тормозах дисков, что
приводит к ребуту?

nginx version: nginx/0.8.46
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 --error-log-path=/var/log/nginx-error.log --user=www --group=www --with-file-aio --http-client-body-temp-path=/var/tmp/nginx/client_body_temp --http-fastcgi-temp-path=/var/tmp/nginx/fastcgi_temp --http-proxy-temp-path=/var/tmp/nginx/proxy_temp --http-scgi-temp-path=/var/tmp/nginx/scgi_temp --http-uwsgi-temp-path=/var/tmp/nginx/uwsgi_temp --http-log-path=/var/log/nginx-access.log --with-http_dav_module --with-http_realip_module --with-http_stub_status_module --with-pcre

Конфиг:
worker_processes 30;

error_log /opt/log/nginx/error.log;


events {
use kqueue;
worker_connections 2024;
#worker_connections 16384;
#accept_mutex off;
#debug_connection 41.233.38.203;
}


http {
types {
text/html html htm shtml;
text/css css;
text/xml xml;
image/gif gif;
image/jpeg jpeg jpg;
application/x-javascript js;
text/plain txt;
image/png png;
image/x-icon ico;
application/x-shockwave-flash swf;
audio/mpeg mp3;
application/x-gzip gz;
}
default_type application/octet-stream;

log_format main '$time_local $remote_addr $bytes_sent $host "$request" $status "$http_referer" "$http_user_agent"';
access_log /opt/log/nginx/access.log main;

sendfile_max_chunk 128k;
sendfile on;
tcp_nopush on;
aio sendfile;
tcp_nodelay on;
send_lowat 12000;

keepalive_timeout 75 60;

output_buffers 1 8k;
postpone_output 1460;

gzip off;

reset_timedout_connection on;

server_names_hash_max_size 32768;

log_not_found off;

client_max_body_size 20m;

proxy_set_header Host $host;

proxy_cache_path /opt1/favicons levels=1:1 keys_zone=favicons:50m inactive=3d max_size=5G;

resolver 87.242.76.68;

server {
listen 87.242.76.164:80 default accept_filter=httpready rcvbuf=4096 sndbuf=131072;
server_name for.trash.ru;

location / {
return 204;
}

location = /nginx_status {
stub_status on;
}
}
server {
listen 87.242.76.164:80;
server_name f.beon.ru f.mindmix.ru f.ltalk.ru f.carguru.ru f.car-guru.com f.qaix.com f.ryxi.com f.gyxe.com f.gyxu.com f.xywe.com f.xyqe.com;

proxy_intercept_errors on;
error_page 301 302 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 422 423 424 425 426 449 500 501 502 503 504 505 506 507 509 510 = /zero;

proxy_cache favicons;
proxy_cache_key $proxy_host;
proxy_temp_path /opt1/favicons/proxy_tmp_path;
proxy_cache_valid any 30d;
proxy_ignore_headers X-Accel-Redirect X-Accel-Expires Expires Cache-Control;

proxy_hide_header Location;

expires 30d;

location / {
return 204;
}

location = /zero {
return 204;
}

# aa.ru
location ~ "^/([a-z0-9-]{1,50}\.[a-z]{2,4})$" {
proxy_set_header Host $1;
proxy_pass http://$1/favicon.ico;
}

# bb.aa.ru
location ~ "^/([a-z0-9-]{1,50}\.[a-z0-9-]{1,50}\.[a-z]{2,4})$" {
proxy_set_header Host $1;
proxy_pass http://$1/favicon.ico;
}

# cc.bb.aa.ru или 111.222.33.44
location ~ "^/([a-z0-9-]{1,50}\.[a-z0-9-]{1,50}\.[a-z0-9-]{1,50}\.[a-z0-9]{1,4})$" {
proxy_set_header Host $1;
proxy_pass http://$1/favicon.ico;
}

}

include servers;
}

кусочек servers:

server {
listen 87.242.76.164:80;
server_name i0.carguru.ru b.i0.carguru.ru;

rewrite ^(/\d+/\d+/\d+/)\d+/(avatars/.+|design/.+|0\.(?:gif|jpeg|png|mp3))$ /$1$2 last;

location / {
expires 1y;
root /opt1/cargururu/i0;
if ($request_method = GET ) {
error_page 404 = @fallback;
}
client_body_temp_path /opt1/cargururu/webdav-tmp;
dav_methods PUT DELETE COPY MOVE;
create_full_put_path on;
dav_access user:rw group:rw all:r;
limit_except GET {
allow 127.0.0.0/8;
allow 10.0.0.0/8;

allow xx.xx.xx.xx/29;

deny all;
}
}
location @fallback {
expires 1s;
rewrite ^.*$ http://a0.carguru.ru/i/users$request_uri redirect;
}
}
...

всего примерно 1000 блоков server {}

--

С уважением,
Михаил Монашёв
mailto:postmaster@softsearch.ru
ICQ# 166233339
http://michael.mindmix.ru/
Без бэкапа по жизни.


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

дисковая нагрузка приводит к ребуту

Михаил Монашёв September 12, 2010 08:54AM

Re: дисковая нагрузка приводит к ребуту

Phil Kulin September 12, 2010 11:44AM

Re[2]: дисковая нагрузка приводит к ребуту

Михаил Монашёв September 12, 2010 02:22PM

Re: Re[2]: дисковая нагрузка приводит к ребуту

Phil Kulin September 12, 2010 04:00PM

Re[4]:

Andrey Repin September 12, 2010 09:12PM

Re: Re[4]: дисковая нагрузка приводит к ребуту

Phil Kulin September 12, 2010 09:36PM

Re[5]: дисковая нагрузка приводит к ребуту

Михаил Монашёв September 13, 2010 01:54AM

Re: дисковая нагрузка приводит к ребуту

Михаил Монашёв September 14, 2010 05:14AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 296
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready