LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: maxconns per real server

To: Roberto Nibali <ratz@xxxxxx>
Subject: Re: maxconns per real server
Cc: lvs-users@xxxxxxxxxxxxxxxxxxxxxx, Benoit Gaussen <ben@xxxxxxxxxx>
From: Julian Anastasov <ja@xxxxxx>
Date: Wed, 3 Jul 2002 00:50:55 +0000 (GMT)
        Hello,

On Tue, 2 Jul 2002, Roberto Nibali wrote:

> > May be something have to be done when the RS is edited?
>
> Yes. What do you have in mind?

        Sort of:

1. To avoid working atomic_* calls in the l_thresh check put the
'(dest->old_weight > 0)' check as first, after u_thresh != 0.
We assume the server is in default state.


2. On edit (in the currently patched place) we should make some checks
and to modify the weight assignment:


if (mm->u_thresh) {
        // Thresholds are used
        if (mm->weight) {       // Recommended weight
                if (dest->old_weight) {
                        // RS is autostopped, do not start it
                        // but remember the recommended weight
                        dest->old_weight = mm->weight;
                } else {
                        // RS is not autostopped
                        // The first conn will check for u_thresh
                        dest->weight = mm->weight;
                }
        } else {
                // Request to stop RS, it can be in any state,
                // forget the old state
                dest->old_weight = 0;
                dest->weight = 0;
        }
} else {
        // Default mode
        dest->old_weight = 0;
        dest->weight = mm->weight;
}


        And after optimization:

if (mm->u_thresh && mm->weight) {
        if (dest->old_weight) {
                dest->old_weight = mm->weight;
        } else {
                dest->weight = mm->weight;
        }
} else {
        dest->old_weight = 0;
        dest->weight = mm->weight;
}

        I'm still not sure if this is the final version.

> Cheers,
> Roberto Nibali, ratz

Regards

--
Julian Anastasov <ja@xxxxxx>



<Prev in Thread] Current Thread [Next in Thread>