[Chilli] [PATCH] do not set bucket*size to BUCKET_SIZE_MIN if bandwithmax* is disabled
Peter Warasin
peter at endian.com
Fri Jun 3 10:29:00 UTC 2011
Hi David
Sorry for the delay.
On 18/05/11 10:25, David Bird wrote:
> But, there is:
> if (!conn->s_state.bucketupsize) {
> leaky_bucket_init(conn);
> }
> which if we allow bucketupsize to remain zero will keep being called.
yeah.
probably we should have some variable which stores if
leaky_bucket_init() was already called, or set it to -1 instead of 0 if
limitation should be disabled.
right now leaky_bucket_init() will be called all the time when
bucketupsize is 0 (if disabled), which is not efficient, but would be ok
from view of functionality.
Problem however is, that it will be set to BUCKET_SIZE_MIN when in fact
you chose to have it disabled (0). That limits to a small bandwidth when
you selected to have no limitation at all.
What happened to me is setting a download bandwidth limit and no upload
bandwidth limit, and in the end i had a correct download limitation but
a wrong (instead of no) upload limitation of BUCKET_SIZE_MIN.
peter
--
:: e n d i a n
:: open source - open minds
:: peter warasin
:: http://www.endian.com :: peter at endian.com
More information about the Chilli
mailing list