Max-pending-packets and Ring-size relation

Hi there!

During my thesis research i came across this question that i hope some of you may answer me.

AF-PACKET ring-size configuration defines that “Ring size will be computed with respect to “max-pending-packets” and number of threads”.

Assuming that i have 3 configured interfaces, each one of them using all 16 available threads and max-pending-packet value is set to 10000: 16 x 10000 = 160000 (because max-pending-packets is calculated “per thread”).

Assuming that ring-size is computed with respect to max-pending-packets, ring-size value must be a value bigger than 160000? For example, 200000?

Is there any essential relation between this two variables?

The computation is done when you don’t set a hardcoded ring-size value. Besides that it is recommended to set a proper value based on those values. So setting a lower value as it would have been by default computation it might have negative impact but also higher value. It’s a deployment specific optmiziation in most cases.