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 ...
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?