BMv2 port congestion packet drops analysis using egress_spec counters shared buffer queue behavior

BMv2 is good for debugging P4 program behavior, in terms of what packets come in, and how they are modified, what tables they look up and the resulting actions, what counters are updated, what headers are modified, and perhaps a few other things like that.

In terms of real-time performance behavior as compared to a switch ASIC, BMv2 was never designed to mimic the performance of any real switch ASIC.

I give that response as part of the answer to your question “So this behavior is just a characteristic of the simulation software, right?”. BMv2 is a functional simulator for packet-in and packet-out, but not a performance simulator.

See this earlier answer to a different question for a possible lead on other software that might lead to something that is good for both P4 packet-in/packet-out behavior, and also may more realistically model the performance behavior of some real switch ASICs: Unexpected Queue Depth Spikes in BMv2 (v1model) During Congestion Control - #5 by kmftangchaoyang