Re: MBUF statistics

From: Don Lewis (truckman_at_FreeBSD.org)
Date: 02/16/05

  • Next message: Kathy Quinlan: "Finding variables"
    Date: Wed, 16 Feb 2005 02:22:50 -0800 (PST)
    To: max@love2party.net
    
    

    On 15 Feb, Max Laier wrote:
    > On Tuesday 15 February 2005 12:38, Borja Marcos wrote:
    >> Hello,
    >>
    >> Looking at the mbuf statistics available in FreeBSD 4 and FreeBSD 5 I
    >> can see that the statistics available in FreeBSD 5 are, surprisingly,
    >> much less comprehensive. Is there any other place where I can find out
    >> how many mbuf requests have been done, how many of them have waited,
    >> how many have failed, etc?
    >
    > I use "$vmstat -z | grep Mbuf". The netstat -m output is broken, because
    > fixing this would impose an additional atomic operation on each alloc/free
    > which is a real performance killer.

    Why not maintain the statistics on a per-CPU basis, and sum up the
    per-CPU statistics in the sysctl handler? The handler might not get an
    exact snapshot, but that shouldn't matter.

    In the case of counters that are wider than 32 bits, it might be
    necessary to break the counters up into chunks that can be incremented
    atomically, and grab a lock when the least significant chunk overflows.

    _______________________________________________
    freebsd-hackers@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
    To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"


  • Next message: Kathy Quinlan: "Finding variables"

    Relevant Pages

    • Re: network statistics in SMP
      ... JB>> I'm working on our network statistics and wonder, ... reliably without locking to sum them up, ... it all the time would more than defeat the point of having per-CPU counters ... while a lost race for a 32-bit counter only makes the sum ...
      (freebsd-arch)
    • Re: [patch 21/21] slab defrag: Obsolete SLAB
      ... help text provided when enabling statistics). ... Exactly how does collecting these stats work? ... There is no way of zeroing the counters. ... operating system, ...
      (Linux-Kernel)
    • Re: statistics infrastructure (in -mm tree) review
      ... to specify the way data aggregation should be done, and which, ... Any device driver or whatever gathering statistics data currently ... we can achieve a common format for statistics data. ... counters, like histograms, an on/off state makes sense. ...
      (Linux-Kernel)
    • RE: Kernel statistic counters
      ... platform consisting of 4 RHEL machines and I'm having a hard time ... finding some system statistics. ... I'm used to Solaris where you have the kstats counters with basically ... Imagine I want to see sd0 disk error statistic: ...
      (RedHat)
    • Re: statistics infrastructure (in -mm tree) review
      ... Agreed with complexity. ... Requirements for other statistics ... No bursts of zillions of incremental updates relayed to user space. ... counters, like histograms, an on/off state makes sense. ...
      (Linux-Kernel)