From: Jeff Sipek <jeffpc@optonline.net>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Kernel Mailing List <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@digeo.com>,
Dave Jones <davej@codemonkey.org.uk>,
Jeff Garzik <jgarzik@pobox.com>,
netdev@oss.sgi.com
Subject: Re: [PATCH - RFC] [1/5] 64-bit network statistics - generic net
Date: Fri, 04 Jul 2003 01:27:56 -0400 [thread overview]
Message-ID: <200307040128.11894.jeffpc@optonline.net> (raw)
In-Reply-To: <Pine.LNX.4.44.0307032005340.8468-100000@home.osdl.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Thursday 03 July 2003 23:08, Linus Torvalds wrote:
> Please do this in user space. The "overflow every 2^32 packets" thing is
> _not_ a problem, if you just gather the statistics at any kind of
> reasonable interval.
The packet counters are fine (for now, that is), but the tx_bytes and rx_bytes
counters need those 64-bits. 4GB (= 2^32 bytes) is not enough. For example:
- - gigabit ethernet will cause 32-bit counters to overflow about every 34
seconds (at full speed.)
- - 10Gb/s ethernet will only take about 3.4 seconds
- - a user like me, who has 5Mbit/s connection to the net can cause the counter
to overflow in 1 hour 54 minutes
(Most of the time, the devices are not maxed out, but we have to check the
worst case scenario.) Now, how often should the user space
statistics-gathering program should run? Well, at least every 30 seconds, for
now that should be good, but the rein of 10Gb/s is approaching...
> I'd hate to penalise performance for something like this. We have
> generally avoided locking _entirely_ for statistics, exactly because
> people felt that there are major performance issues wrt network packet
> handling, and that "perfect statistics" aren't important enough to
> penalize performance over.
I agree with you, that is why I made it optional so the user may choose to
sacrifice performace for statistics when needed.
Additionally, I am sure there is a way of optimizing the patch I wrote (i.e.
actual transmition is locked with a lock from struct net_device.) I am aware
that this patch is a major undertaking, but it is only a matter of time
before someone will have to do it anyway.
> Remember: "perfect is the enemy of good".
Very true.
Jeff.
- --
Only two things are infinite, the universe and human stupidity, and I'm
not sure about the former.
- Albert Einstein
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
iD8DBQE/BRBjwFP0+seVj/4RAnDSAJ90uOIpgtk0O7YLSsdj97kNbhr/jgCgrmlS
GYbA4luLnY7bli1jYVuZD3s=
=7zXz
-----END PGP SIGNATURE-----
next parent reply other threads:[~2003-07-04 5:27 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Pine.LNX.4.44.0307032005340.8468-100000@home.osdl.org>
2003-07-04 5:27 ` Jeff Sipek [this message]
2003-07-05 18:49 ` [PATCH - RFC] [1/5] 64-bit network statistics - generic net Jeff Sipek
2003-07-05 21:46 ` Ben Greear
[not found] <E19YtAq-0006Xf-00@calista.inka.de>
2003-07-05 20:37 ` Jeff Sipek
2003-07-05 20:40 ` Jeff Garzik
2003-07-05 20:59 ` Jeff Sipek
2003-07-05 21:51 ` Francois Romieu
2003-07-05 22:39 ` Jeff Sipek
2003-07-05 23:44 ` Francois Romieu
2003-07-05 22:54 ` Roland Dreier
2003-07-05 21:41 ` Ben Greear
2003-07-06 7:27 ` Alan Cox
[not found] <200307032231.39842.jeffpc@optonline.net>
2003-07-04 2:46 ` Jeff Garzik
2003-07-04 6:02 ` Jeff Sipek
[not found] ` <20030704094745.GG29233@lug-owl.de>
2003-07-04 17:57 ` Jeff Sipek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200307040128.11894.jeffpc@optonline.net \
--to=jeffpc@optonline.net \
--cc=akpm@digeo.com \
--cc=davej@codemonkey.org.uk \
--cc=jgarzik@pobox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@oss.sgi.com \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).