sendfile_max_chunk

Igor Savchenko dicsydel at gmail.com
Thu May 10 17:29:18 MSD 2007


Hello Александр,

Thursday, May 10, 2007, 3:14:15 PM, you wrote:

> Igor Savchenko пишет:

>>> скорость диска ~40М/сек, сеть быстрее.
>>> Можно увидеть результаты отдачи этого же файла(при отдаче с диска, не из
>>> кэша) nginx'ом wget'у через localhost ?
>> 
> Судя по Server, это  апач отдал, а не nginx.  Сколько отдаёт nginx в тех
> же условиях с sendfile_max_chunk=0 и sendfile_max_chunk=256k ?

  HTTP/1.1 200 OK
  Server: nginx/0.5.20
  Date: Thu, 10 May 2007 13:24:12 GMT
  Content-Type: application/octet-stream
  Content-Length: 1440062065
  Last-Modified: Thu, 10 May 2007 11:37:20 GMT
  Connection: keep-alive
  Accept-Ranges: bytes
Length: 1,440,062,065 (1.3G) [application/octet-stream]

 0% [                                                                                                                  ] 372,736       16.66K/s ETA 23:26:54

 Это с 256K... оборвал, т.к. ждать 23 часа нет времени...

  HTTP/1.1 200 OK
  Server: nginx/0.5.20
  Date: Thu, 10 May 2007 13:25:59 GMT
  Content-Type: application/octet-stream
  Content-Length: 1440062065
  Last-Modified: Thu, 10 May 2007 11:37:20 GMT
  Connection: keep-alive
  Accept-Ranges: bytes
Length: 1,440,062,065 (1.3G) [application/octet-stream]

 0% [                                                                                                                  ] 262,144       --.--K/s ETA 44:27:40

 Это с 0. Затыкается частенько.. в среднем по виду показывал скорость
 10-17КБ в секунду.

 вот конфиг:

worker_processes  10;

events {
    worker_connections  1024;
}


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

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

    access_log off;

    sendfile        on;
    #sendfile_max_chunk 0;
    sendfile_max_chunk 256K;

    perl_modules  perl/lib;            
    perl_require  rewrite.pm;

    server {
        listen       64.72.127.195:80;

        location / {
           perl rewrite::handler;
        }

        location /ngx_stat {
            stub_status on;
            access_log   off;
        }

        location /test.file2 {
                root /mnt/tt;

        }
    }
} 

качал test.file2 с этой же машины....

---------------------------------
Igor V. Savchenko

http://webta.net

mailto: igor at webta.net
ICQ: 86915046






More information about the nginx-ru mailing list