Re: interrupt counts

Matti E Aarnio (mea@mea.cc.utu.fi)
Mon, 19 Aug 1996 10:53:50 +0300 (EET DST)


[ about counter wrapping ]
> Yes, the same way IP-accounting wrapps pretty quickly as well. 4 gigs over
> a net isnt a lot today. Is this perhaps something that should be
> considered for 2.1, to convert more and more of these
> on-busy-machines-will-wrap-within-a-year counters into 64bit ones? I mean,
> as speed of machines goes up all the time, wouldnt it be nice to be ahead
> for a while?

It sure would be nice -- wrap within a year ?

Hmm.. ftp.funet.fi: Uptime now 32 days, FDDI interface output
packets count is 1.2 billion, average FTP payload dataflow per
day is 20-24 GB (weekends are around 15-17 GB per day).
TCP overheads, WWW, and several other services not counted.

So yes, if I were accounting interface BYTES (not packets),
I would want to use somewhat larger counters...
(32-bit unsigned counter warps 3-4 times per day.)

HOWEVER, I might want to have it as a configuration option.
At low-level 386/25 (my home machine) I am entirely happy
with 32-bit counters.

bool 'Do you want unwrappable (64 bit) network counters ?' \
CONFIG_LONG_NETWORK_COUNTERS

With documentation telling that at busy high-performance server
systems sending/receiving 20-30 GB per day a normal 32-bit
unsigned counter will wrap several times per day.
Selecting here 'N' at small desktops is propably preferrable.

And then have some 'netcounter_t' defined at the headers
for the kernel. However printing them out thru /proc/ should
most likely be done in %llu format with explicite cast to
u_int64. (I hope the kernel 'sprintf' understands "%lld".)

> Reminds me of Suns "fix" for the problem that the uptime-counter wraps at
> 256 days uptime. "Reset the machine at around 250 days uptime".. Great fix
> :)

I wish our university SPARC servers were up for that long...

/Matti Aarnio <mea@nic.funet.fi> <mea@utu.fi>