Re: High usage of mbufs

From: Robert Watson (rwatson_at_FreeBSD.org)
Date: 05/29/05

  • Next message: Tulio Guimarães da Silva: "rmt as a bottleneck - Was: Weird behaviour of AIT-3 and (g)tar"
    Date: Sun, 29 May 2005 16:44:14 +0100 (BST)
    To: "Matthew D. Fuller" <fullermd@over-yonder.net>
    
    

    On Sat, 28 May 2005, Matthew D. Fuller wrote:

    > On Sat, May 28, 2005 at 01:17:24PM +1000 I heard the voice of
    > Michael VInce, and lo! it spake thus:
    >> On one of my web servers I have a really high usage of mbuf clusters in
    >> use on a web server that does about 3million hits a day.
    >> 4294914731/262144 mbuf clusters in use (current/max)
    >
    > No it doesn't (have really high usage, that is). It just has messed up
    > statistics, which is standard on SMP machines; see the archives.

    I have two sets of patches that correct this problem:

    - One uses atomic operations to synchronize access to the mbuf-related
       counters instead of performing non-atomic updates, which results in
       races.

    - One uses per-cpu statistics in the mbuf allocator, and critical sections
       to synchronize updates.

    Both encounter a several percent performance hit in packet-intensive
    workloads, so I've been reluctant to commit either. However, most of the
    information required for mbuf statistics is already gathered by UMA, which
    is now used as the back-end for the mbuf allocator. As such, the better
    answer is to use the UMA statistics and then see if we still need the mbuf
    layer stats. I haven't had a chance to investigate this in detail yet,
    but I'd like to get something in before 6.0.

    Robert N M Watson
    _______________________________________________
    freebsd-performance@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-performance
    To unsubscribe, send any mail to "freebsd-performance-unsubscribe@freebsd.org"


  • Next message: Tulio Guimarães da Silva: "rmt as a bottleneck - Was: Weird behaviour of AIT-3 and (g)tar"

    Relevant Pages

    • Re: MBUF statistics
      ... > can find out how many mbuf requests have been done, ... This statistic appears to have been lost during the conversion to UMA ... This would also eliminate SMP races present in the ... maintenance of mbuf statistics. ...
      (freebsd-hackers)
    • Re: Convert XP to Server
      ... googole search doesn't find one study that puts Linux ahead of ... Even there I couldn't find any statistics close to ... Linux is certainly a viable alternative to Windows for servers ... The second graph shows that for web servers Apache leads IIS ...
      (microsoft.public.windowsxp.help_and_support)