Hello,
I tested all day both before and after patching.
I could not understand that it is a memory leak or not. Maybe it needs optimization. You lead, I follow.
1-) You are right, alloc_q is never bigger than 1024. But it always allocates 32 units then more than 1024 are being freed. Maybe it takes time, I don't know.
2-) I tested tx_rs_thresh via ping. After 210 sec , allocated memories are back to mempool (most of them). (driver virtio and eth-devices are binded via igb_uio) . It really takes time. So it is better to increase the size of the mempool. (
https://doc.dpdk.org/guides/prog_guide/poll_mode_drv.html)
3-) try to list mempool state in randomly
Test -1 -) (old code) ICMP testing. The whole mempool size is about 10350. So after FIFO reaches max-size -1024, %10 of the size of the mempool is in use. But little by little memory is waiting in use and doesn't go back to the pool. I could not find the reason.
MBUF_POOL 448 9,951 4.31% [|....................]
MBUF_POOL 1,947 8,452 18.72% [||||.................]
MBUF_POOL 1,803 8,596 17.34% [||||.................]
MBUF_POOL 1,941 8,458 18.67% [||||.................]
MBUF_POOL 1,900 8,499 18.27% [||||.................]
MBUF_POOL 1,999 8,400 19.22% [||||.................]
MBUF_POOL 1,724 8,675 16.58% [||||.................]
MBUF_POOL 1,811 8,588 17.42% [||||.................]
MBUF_POOL 1,978 8,421 19.02% [||||.................]
MBUF_POOL 2,008 8,391 19.31% [||||.................]
MBUF_POOL 1,854 8,545 17.83% [||||.................]
MBUF_POOL 1,922 8,477 18.48% [||||.................]
MBUF_POOL 1,892 8,507 18.19% [||||.................]
MBUF_POOL 1,957 8,442 18.82% [||||.................]
Test-2 -) (old code) run iperf3 udp testing that from Kernel to eth device. Waited to see what happens in 4 min. memory doesn't go back to the mempool. little by little, memory usage increases.
MBUF_POOL 512 9,887 4.92% [|....................]
MBUF_POOL 1,411 8,988 13.57% [|||..................]
MBUF_POOL 1,390 9,009 13.37% [|||..................]
MBUF_POOL 1,558 8,841 14.98% [|||..................]
MBUF_POOL 1,453 8,946 13.97% [|||..................]
MBUF_POOL 1,525 8,874 14.66% [|||..................]
MBUF_POOL 1,592 8,807 15.31% [||||.................]
MBUF_POOL 1,639 8,760 15.76% [||||.................]
MBUF_POOL 1,624 8,775 15.62% [||||.................]
MBUF_POOL 1,618 8,781 15.56% [||||.................]
MBUF_POOL 1,708 8,691 16.42% [||||.................]
iperf is STOPPED to tx_fresh for 4 min
MBUF_POOL 1,709 8,690 16.43% [||||.................]
iperf is STOPPED to tx_fresh for 4 min
MBUF_POOL 1,709 8,690 16.43% [||||.................]
MBUF_POOL 1,683 8,716 16.18% [||||.................]
MBUF_POOL 1,563 8,836 15.03% [||||.................]
MBUF_POOL 1,726 8,673 16.60% [||||.................]
MBUF_POOL 1,589 8,810 15.28% [||||.................]
MBUF_POOL 1,556 8,843 14.96% [|||..................]
MBUF_POOL 1,610 8,789 15.48% [||||.................]
MBUF_POOL 1,616 8,783 15.54% [||||.................]
MBUF_POOL 1,709 8,690 16.43% [||||.................]
MBUF_POOL 1,740 8,659 16.73% [||||.................]
MBUF_POOL 1,546 8,853 14.87% [|||..................]
MBUF_POOL 1,710 8,689 16.44% [||||.................]
MBUF_POOL 1,787 8,612 17.18% [||||.................]
MBUF_POOL 1,579 8,820 15.18% [||||.................]
MBUF_POOL 1,780 8,619 17.12% [||||.................]
MBUF_POOL 1,679 8,720 16.15% [||||.................]
MBUF_POOL 1,604 8,795 15.42% [||||.................]
MBUF_POOL 1,761 8,638 16.93% [||||.................]
MBUF_POOL 1,773 8,626 17.05% [||||.................]
Test-3 -) (after patching) run iperf3 udp testing that from Kernel to eth device. looks stable.
After patching ,
MBUF_POOL 76 10,323 0.73% [|....................]
MBUF_POOL 193 10,206 1.86% [|....................]
MBUF_POOL 96 10,303 0.92% [|....................]
MBUF_POOL 269 10,130 2.59% [|....................]
MBUF_POOL 102 10,297 0.98% [|....................]
MBUF_POOL 235 10,164 2.26% [|....................]
MBUF_POOL 87 10,312 0.84% [|....................]
MBUF_POOL 293 10,106 2.82% [|....................]
MBUF_POOL 99 10,300 0.95% [|....................]
MBUF_POOL 296 10,103 2.85% [|....................]
MBUF_POOL 90 10,309 0.87% [|....................]
MBUF_POOL 299 10,100 2.88% [|....................]
MBUF_POOL 86 10,313 0.83% [|....................]
MBUF_POOL 262 10,137 2.52% [|....................]
MBUF_POOL 81 10,318 0.78% [|....................]
MBUF_POOL 81 10,318 0.78% [|....................]
MBUF_POOL 87 10,312 0.84% [|....................]
MBUF_POOL 252 10,147 2.42% [|....................]
MBUF_POOL 97 10,302 0.93% [|....................]
iperf is STOPPED to tx_fresh for 4 min
MBUF_POOL 296 10,103 2.85% [|....................]
MBUF_POOL 95 10,304 0.91% [|....................]
MBUF_POOL 269 10,130 2.59% [|....................]
MBUF_POOL 302 10,097 2.90% [|....................]
MBUF_POOL 88 10,311 0.85% [|....................]
MBUF_POOL 305 10,094 2.93% [|....................]
MBUF_POOL 88 10,311 0.85% [|....................]
MBUF_POOL 290 10,109 2.79% [|....................]
MBUF_POOL 84 10,315 0.81% [|....................]
MBUF_POOL 85 10,314 0.82% [|....................]
MBUF_POOL 291 10,108 2.80% [|....................]
MBUF_POOL 303 10,096 2.91% [|....................]
MBUF_POOL 92 10,307 0.88% [|....................]
Best regards.