[lkml]   [2003]   [Jul]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH - RFC] [1/5] 64-bit network statistics - generic net
    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.


    - --
    Only two things are infinite, the universe and human stupidity, and I'm
    not sure about the former.
    - Albert Einstein
    Version: GnuPG v1.2.2 (GNU/Linux)

    -----END PGP SIGNATURE-----

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:46    [W:0.022 / U:110.800 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site