Welcome! Log In Create A New Profile

Advanced

[PATCH 1 of 2] Fixed throughput problems with large limit_rate

Maxim Dounin
December 20, 2011 12:50PM
# HG changeset patch
# User Maxim Dounin <mdounin@mdounin.ru>
# Date 1324314500 -10800
# Node ID 77a59d0863ef59a5ddce4322d94b325a923a7624
# Parent 52194af4217ad48e290058ba133e3cbf74b2d28f
Fixed throughput problems with large limit_rate.

Previous attempt to fix this was in r1658 (0.6.18), though that one wasn't
enough (it was a noop).

diff --git a/src/http/ngx_http_write_filter_module.c b/src/http/ngx_http_write_filter_module.c
--- a/src/http/ngx_http_write_filter_module.c
+++ b/src/http/ngx_http_write_filter_module.c
@@ -262,7 +262,7 @@ ngx_http_write_filter(ngx_http_request_t
}
}

- delay = (ngx_msec_t) ((nsent - sent) * 1000 / r->limit_rate + 1);
+ delay = (ngx_msec_t) ((nsent - sent) * 1000 / r->limit_rate);

if (delay > 0) {
c->write->delayed = 1;

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

[PATCH 0 of 2] limit_rate fixes

Maxim Dounin 1566 December 20, 2011 12:50PM

[PATCH 1 of 2] Fixed throughput problems with large limit_rate

Maxim Dounin 524 December 20, 2011 12:50PM

[PATCH 2 of 2] Fixed interaction of limit_rate and sendfile_max_chunk

Maxim Dounin 519 December 20, 2011 12:50PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 281
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