Re: [PATCH] continous statistics

From: Willy Tarreau <w#1wt.eu>
Date: Mon, 26 Nov 2007 21:53:42 +0100


On Mon, Nov 26, 2007 at 08:58:27PM +0100, Krzysztof Oledzki wrote:
> Very nice, thank you. This hint about 64-bit @ 32-bit platform is very
> useful, I must check it on my projects. BTW: does it affect all gcc
> versions, even 4.1/4.2?

I've read somewhere that they have very recently optimized the 64-bit behaviour, I believe it was in 4.3. Till very recently, the compiler used couples of registers and was not able to manipulate them individually, hence the frequent useless reloads. At least that's what I have understood.

Generally, when I'm in doubt, I just check the asm code with objdump -d, and if I see stupid things such as below, I know there are tricks to help it :

    a = b
    c = d
    e = a | c    => could have been optimized
    a = b        => useless reload
    c = e

    ...

Another trick I sometimes use is to perform computations on two separate 32-bit integers. I tried here, and the code was 100% identical, but it would have been suboptimal on 64-bit platforms, so I preferred to keep the 64-bit version.

> >For your info, I finally managed to merge the dynamic weights code. It was
> >kind of hard, the initial code looked like a mine field! But now it works
> >(I added a quick and dirty patch to change a server's weight on the fly to
> >verify this). I'm currently merging the branches back to master. The
> >changes
> >are not yet well documented, but they only affect developpers. I still have
> >two features to implement this week (slowstart and server maintenance mode)
> >and I'll be able to release 1.3.14 with all of this.
> >
> >I'll keep you updated about this.
>
> Thanks. Is there a EAT defined for 1.3.14? I have two half-ready patches
> but I'm not sure if I manage to finish them this week.

I plan to release it for the first week of december (ie: next week), hoping it will be ready, but now that the hard part is passed, I think it should progress better. The ability to change a server's state from the unix socket will not be in though. It will be merged later, as well as leastconn on which I want to work too.

Best regards,
Willy Received on 2007/11/26 21:53

This archive was generated by hypermail 2.2.0 : 2007/11/26 22:45 CET