LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: Questions about the rate estimator: ip_vs_est.c

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: Questions about the rate estimator: ip_vs_est.c
From: Roberto Nibali <ratz@xxxxxx>
Date: Tue, 29 Jul 2003 11:15:46 +0200
Hello Wensong,

I wonder why it is done in such a complicated way? I know most of it is
It isn't complicated. :)

Ok.

from the net/sched/estimator.c but why not using the direct way of computing the average?

Something like following should work:

avg = ((time - timeframe) * avg + new) / time



Your formula is the same as avgrate = avgrate*(1-W) + rate*W, where W is timeframe/time. Oh, you miss something in your formula, it should be
        avg = ((time - timeframe) * avg + timeframe * new) / time

Yes, precisely. Thanks for the hint.

Why are the numbers scaled by 2^5?

For more precise numbers, we keep the 1/32 fraction numbers in the
counter.

Right, no FP in KS! :)

Would it make sense to use the ip_vs_estimator to write a scheduler which chooses the RS with either the least amount of bps or the least amount of pps?

Yes, it's possible, but it will make ipvsadm a little bit more complicated to set those bps/pps thresholds.

It isn't complicated. :)

Best regards,
Roberto Nibali, ratz
--
echo '[q]sa[ln0=aln256%Pln256/snlbx]sb3135071790101768542287578439snlbxq' | dc

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