Re: [BUG] socket buffer size different then set

From: Andi Kleen (ak@suse.de)
Date: Sat Apr 22 2000 - 04:18:19 EDT

  • Next message: André Dahlqvist: "Re: fix: umount: device is busy"

    Kurt Roeckx <Q@ping.be> writes:

    > On Fri, Apr 21, 2000 at 10:48:10AM -0700, David S. Miller wrote:
    > > Date: Fri, 21 Apr 2000 19:37:17 +0200
    > > From: Kurt Roeckx <Q@ping.be>
    > >
    > > Is this a bug, or normal behaviour?
    > >
    > > This is normal behavior.
    >
    > May I ask why? Other OS's don't seem to do this.

    This must be a FAQ by now:

    Linux reserves half of the socket buffer for metadata (skbuff headers etc.)
    BSD doesn't do that. Most programs using SO_SNDBUF/SO_RCVBUF didn't expect
    this, because traditional BSD does not do metadata accounting, and on Linux
    they ended up with too small effective buffers. To fix this Linux always
    doubles the buffer internally to stay compatible.

    This is documented in socket(7) BTW, please next time to RTFM first.

    -Andi

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.tux.org/lkml/



    This archive was generated by hypermail 2b29 : Sat Apr 22 2000 - 03:25:13 EDT