2013/7/21 Godbach <[email protected]>

> On 2013-7-21 21:17, Willy Tarreau wrote:
>
>> No, I really mean UWGHT_MAX set to UWGHT_RANGE since it is used to
>> fix set highest user weight that can be set.
>>
>> Willy
>>
>>
>>
> Yeah, I get what you meant now. With the following fix:
>
> diff --git a/include/types/server.h b/include/types/server.h
> index b58a062..062b06e 100644
> --- a/include/types/server.h
> +++ b/include/types/server.h
> @@ -72,7 +72,7 @@
>
>  /* various constants */
>  #define SRV_UWGHT_RANGE 256
> -#define SRV_UWGHT_MAX   (SRV_UWGHT_RANGE - 1)
> +#define SRV_UWGHT_MAX   SRV_UWGHT_RANGE
>  #define SRV_EWGHT_RANGE (SRV_UWGHT_RANGE * BE_WEIGHT_SCALE)
>  #define SRV_EWGHT_MAX   (SRV_UWGHT_MAX   * BE_WEIGHT_SCALE)
>
> Roundrobin can work well with server's weight 256 after testing again.
>
> So I should post two patches, one for source code and the other one for
> documentation.
> There are also related comments of roundrobin and/or leastconn to be fixed
> together.
>
> I will finish this job carefully and post patches ASAP.
>
> --
> Best Regards,
> Godbach
>
>
Hi Willy,

There are four patches for your information. Some additional information
about these four
patches is as below:

Patch 0001
The main patch to fix the bug what we have talked about. Since FWRR can not
work well
with server's weight 256, the level of this bug should be MEDIUM in my
opinion. You can
modify the level if any other level is better.

Patch 0002
Change the max number of servers for roundrobin. The value is 4096 in my
opinion with
the formula:
2^32/256^2/16 = 65536/16 = 4096
If what I understand is not correct, I will appreciate that you tell me the
reason.

Patch 0003
Use SRV_UWGHT_MAX to check the weight of server instead of magic number 256

Patch 0004
fix typo in lb_fwrr.c, maybe non-ASCII chars are intruduced into.

Best Regards,
Godbach

Attachment: 0001-BUG-MEDIUM-server-set-the-macro-for-server-s-max-wei.patch
Description: Binary data

Attachment: 0002-DOC-modify-the-max-number-of-servers-per-backend-for.patch
Description: Binary data

Attachment: 0003-OPTIM-server-use-SRV_UWGHT_MAX-to-check-the-weight-o.patch
Description: Binary data

Attachment: 0004-BUG-MINOR-fwrr-fix-typo-in-comment.patch
Description: Binary data

Reply via email to