[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[altq 1223] Re: Random number generator
On Tue, Dec 04, 2001 at 01:13:09AM +0900, Kenjiro Cho wrote:
>
> Nguyen-Tuong Long Le wrote:
> > > What makes you think random() isn't good enough for this purpose?
>
> > There is a paper entitled "Software for Uniform Random Number
> > Generation: Distinguishing the Good and the Bad" by Pierre L'Ecuyer
> > (available from www.iro.umontreal.ca./~lecuyer/myftp/papers/wsc01rng.pdf)
> > that claims that the algorithm LCG16807 used by random() is not
> > a good one.
>
> Thanks for the pointer.
>
> > I did a quick test that shows that if the drop probability of 0.05 is
> > applied to 1000 samples, the real loss rate can be anywhere from 0.037
> > to 0.064 and doesn't come close to the nominal value half of the times.
> > -- Long
>
> I also did a quick test. The result is good when I use 1,000,000
> samples (since 1,000 is too small to test stochastic properties).
not to mention that it is RED we are talking about... drop rates
need not to be precise, you just need to drop "some" packets and
pray you have chosen the right set of values (assuming there is
one) for your traffic mix.
cheers
luigi