Skip to contentSkip to conversation

Should we keep the advice to increase queue max length?

DISCUSSION Duncan Roe 2 participants 2 messages Dec 12, 2023 netfilter

lore
Share & tools
lore

Duncan Roe

author
#0 lore raw

Hi Everyone,

Under the title "Performance", libnetfilter_queue main page advises

Quoted 1 line

increase queue max length with nfq_set_queue_maxlen() to resist to packets burst

but from experimenting it seems to me this does no good at all.

/proc/net/netfilter/nfnetlink_queue has a line for every active queue. The 3rd field is the number of queued packets. The max length is not in these lines but kernel source suggests it is 1024 by default. Anyway, I updated nfq6 to be able to set the max (using mnl functions).

And I found the maximum number of queued packets is: 238. Further packets are dropped.

If I lower the max below 238, limiting occurs at the new max.

So I propose to drop the advice to increase the queue max length when I revise the libnetfilter_queue main page as part of the project to stop using libnfnetlink.

Anyone have any comments?

Cheers ... Duncan.

maintainer
#1 lore raw
Quoted 8 lines · Duncan Roe

/proc/net/netfilter/nfnetlink_queue has a line for every active queue. The 3rd field is the number of queued packets. The max length is not in these lines but kernel source suggests it is 1024 by default. Anyway, I updated nfq6 to be able to set the max (using mnl functions).

And I found the maximum number of queued packets is: 238. Further packets are dropped.

Quoted 7 lines

If I lower the max below 238, limiting occurs at the new max.

So I propose to drop the advice to increase the queue max length when I revise the libnetfilter_queue main page as part of the project to stop using libnfnetlink.

Anyone have any comments?

This code is very old, it stems from a time where the network stack did not do any kind of packet aggregation.

I think the hint should be removed as you suggest.