comparison src/http/ngx_http_core_module.c @ 7950:e3dbd9449b14

Changed default value of sendfile_max_chunk to 2m. The "sendfile_max_chunk" directive is important to prevent worker monopolization by fast connections. The 2m value implies maximum 200ms delay with 100 Mbps links, 20ms delay with 1 Gbps links, and 2ms on 10 Gbps links. It also seems to be a good value for disks.
author Maxim Dounin <mdounin@mdounin.ru>
date Fri, 29 Oct 2021 20:21:57 +0300
parents 1bde031b59ff
children ae992b5a27b2 61d0fa67b55e
comparison
equal deleted inserted replaced
7949:862f6130d357 7950:e3dbd9449b14
3718 ngx_conf_merge_value(conf->client_body_in_single_buffer, 3718 ngx_conf_merge_value(conf->client_body_in_single_buffer,
3719 prev->client_body_in_single_buffer, 0); 3719 prev->client_body_in_single_buffer, 0);
3720 ngx_conf_merge_value(conf->internal, prev->internal, 0); 3720 ngx_conf_merge_value(conf->internal, prev->internal, 0);
3721 ngx_conf_merge_value(conf->sendfile, prev->sendfile, 0); 3721 ngx_conf_merge_value(conf->sendfile, prev->sendfile, 0);
3722 ngx_conf_merge_size_value(conf->sendfile_max_chunk, 3722 ngx_conf_merge_size_value(conf->sendfile_max_chunk,
3723 prev->sendfile_max_chunk, 0); 3723 prev->sendfile_max_chunk, 2 * 1024 * 1024);
3724 ngx_conf_merge_size_value(conf->subrequest_output_buffer_size, 3724 ngx_conf_merge_size_value(conf->subrequest_output_buffer_size,
3725 prev->subrequest_output_buffer_size, 3725 prev->subrequest_output_buffer_size,
3726 (size_t) ngx_pagesize); 3726 (size_t) ngx_pagesize);
3727 ngx_conf_merge_value(conf->aio, prev->aio, NGX_HTTP_AIO_OFF); 3727 ngx_conf_merge_value(conf->aio, prev->aio, NGX_HTTP_AIO_OFF);
3728 ngx_conf_merge_value(conf->aio_write, prev->aio_write, 0); 3728 ngx_conf_merge_value(conf->aio_write, prev->aio_write, 0);