Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Jan 2002 11:57:39 -0800
From:      David Greenman <dg@root.com>
To:        Terry Lambert <tlambert2@mindspring.com>
Cc:        "James E. Housley" <jeh@FreeBSD.org>, Thomas Hurst <tom.hurst@clara.net>, arch@FreeBSD.org
Subject:   Re: 64 bit counters again
Message-ID:  <20020114115739.E8955@nexus.root.com>
In-Reply-To: <3C43355D.8C9A35A0@mindspring.com>; from tlambert2@mindspring.com on Mon, Jan 14, 2002 at 11:45:33AM -0800
References:  <Pine.BSF.4.41.0201132057560.62182-100000@prg.traveller.cz> <3C41F3FD.4ECC8CD@mindspring.com> <20020113231459.GA30349@voi.aagh.net> <3C42390A.F9E9F533@mindspring.com> <3C42E899.CB21BD0A@FreeBSD.org> <3C431EE5.1CFF557B@mindspring.com> <20020114100633.B8955@nexus.root.com> <3C43355D.8C9A35A0@mindspring.com>

next in thread | previous in thread | raw e-mail | index | archive | help
>David Greenman wrote:
>> >Actually, I was thinking that if what you are counting overflowed
>> >in such a short period of time, then you are counting the wrong
>> >thing.
>> >
>> >Instead of bytes, try counting K or frames, instead of frames,
>> >count packets, etc..
>> 
>>    Kbytes doesn't have enough resolution to provide accurate results since
>> the packets themselves are not integer multiples of Kbytes.
>
>Use a modular counter; count bytes, and reflect them out at 1K
>boundaries.  Thus the accuracy is 1K, but the precision is 1
>byte.

   It's not how we "reflect them out" that's the problem. It's the overflow
on the internal 32bit precision that's the problem. You could export the
data in Kbps for all I care, but that has nothing to do with the problem.

-DG

David Greenman
Co-founder, The FreeBSD Project - http://www.freebsd.org
President, TeraSolutions, Inc. - http://www.terasolutions.com
President, Download Technologies, Inc. - http://www.downloadtech.com
Pave the road of life with opportunities.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020114115739.E8955>