I’m experiencing *frame queue congestion* in a VPP plugin that uses 
vlib_buffer_enqueue_to_thread() to hand off packets to worker threads.

Initially, I was calling:

vlib_frame_queue_main_init(handoff_node_index, 0 );

This resulted in *severe packet drops* :

* 

~600K pps (~5%) with *1 worker queue*

* 

~150K pps with *2 worker queues*

* 

~30–50K pps with *3 worker queues*

After reviewing the source code, I discovered that passing 0 causes VPP to use 
FRAME_QUEUE_MAX_NELTS (64), which is extremely small for high packet rates.

After explicitly setting:

vlib_frame_queue_main_init(handoff_node_index, 2048 );

the congestion-related drops were almost completely eliminated. However, I 
still observe *occasional drop spikes* , typically around *200 packets per 
second* , and in rare cases larger spikes of about *1 Kpps* (still with a 
single queue).

My questions:
-------------

* 

*Is a frame queue size of 2048 appropriate for high packet rates* , or should 
it be increased further for production deployments (for example, to 4096)?

* 

*Are there recommended approaches beyond simply increasing the queue size* , 
for example:

* 

grouping buffers per target worker, and

* 

calling vlib_frame_queue_main_init() separately for each target worker?

* 

*Do I need to use more than one frame queue* , or is a single, sufficiently 
sized queue the preferred approach?
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#26669): https://lists.fd.io/g/vpp-dev/message/26669
Mute This Topic: https://lists.fd.io/mt/116856661/21656
Group Owner: [email protected]
Unsubscribe: https://lists.fd.io/g/vpp-dev/leave/14379924/21656/631435203/xyzzy 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to