Find the answer to your Linux question:
Results 1 to 4 of 4
Is there a way to find out how many UDP packets, of a particular size, the system (kernel) will buffer for me before it starts throwing things away? Sure, I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2005
    Posts
    2

    Nr of UDP packets that fit in to the kernel buffer


    Is there a way to find out how many UDP packets, of a particular size, the system (kernel) will buffer for me before it starts throwing things away?

    Sure, I can find out by experimenting with a client/server benchmarking test proggie. But since we (our company) potentially need to deploy software on different Linux systems it would be nice to be able to read this off somewhere. System call, config file, reading info from network driver or ...

    Some background:

    We need to send a fair amount of small sized udp packets at a steady rate.
    I've done experiments on different systems with diffrent kernels and NIC's
    From what I gather, there is a certain amount of memory overhead for each packet buffered in the kernel. This overhead (in bytes) differs between "systems". I've seen 148 byte or ~1k

    So I cannot simply divide the buffer size (SO_RCVBUF) with the size of my packets to answer my inital question. I know the kernel eats up half of the buffer and that there is a limit you can change with sysctl.
    From a quick survey of online linux kernel forums packets are put into sk_buffs by the network driver and these can vary in size?

    /Mattias

  2. #2
    Linux User
    Join Date
    Jul 2005
    Posts
    369
    if the udp packets are a problem can i ask what network cards your using. mostly becuase cards such as real tek ones tend to do some funky when dealing with masses of udp packets...regardless of the os
    All i want for christmas is a new liver....a second chance to get afflicted with Cirrhosis

  3. #3
    Just Joined!
    Join Date
    Dec 2005
    Posts
    2
    Quote Originally Posted by winter
    if the udp packets are a problem can i ask what network cards your using. mostly becuase cards such as real tek ones tend to do some funky when dealing with masses of udp packets...regardless of the os
    There is no problem, really. I would expect there to be a limit on the number of "unreliable" UDP packets queued. I just want to be able to find out what the limit is.

    I've done tests on a 3C509 and some onboard Intel Gigabit card

    /Mattias.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux User
    Join Date
    Jul 2005
    Posts
    369
    Quote Originally Posted by swenove
    Quote Originally Posted by winter
    if the udp packets are a problem can i ask what network cards your using. mostly becuase cards such as real tek ones tend to do some funky when dealing with masses of udp packets...regardless of the os
    There is no problem, really. I would expect there to be a limit on the number of "unreliable" UDP packets queued. I just want to be able to find out what the limit is.

    I've done tests on a 3C509 and some onboard Intel Gigabit card

    /Mattias.
    unfortunatly not usaully the kernel socks just passes data on to the aplication usally, i do belive the kernel has some options in the firewall to block certain nasty udp packets. but that has to be enabled with ip tables.
    All i want for christmas is a new liver....a second chance to get afflicted with Cirrhosis

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •