New: The vsock component triggers out of memory when sending small packets.
Subsystems (2)
Begin forwarded message:
Date: Wed, 15 Dec 2021 03:40:59 +0000
From: [email protected]
To: [email protected]
Subject: [Bug 215329] New: The vsock component triggers out of memory when sending small packets.
https://bugzilla.kernel.org/show_bug.cgi?id=215329
Bug ID: 215329
Summary: The vsock component triggers out of memory when
sending small packets.
Product: Networking
Version: 2.5
Kernel Version: 4.19.90
Hardware: All
OS: Linux
Tree: Mainline
Status: NEW
Severity: normal
Priority: P1
Component: Other
Assignee: [email protected]
Reporter: [email protected]
Regression: NoThe memory usage of the vsock component when sending small packets is much higher than that when sending large packets. When the VM memory is insufficient, the out of memory is triggered.
Server(host):iperf3 --vsock -s 2 Client(guest):iperf3 --vsock -c 2 -t 10000 -l 1 -P 100
Slab information of kernel kmalloc in the 1 KB data packet is sent. The values of kmalloc-256 and kmalloc-4096 are significantly higher than those in the normal environment.
Traffic sending environment:
kmalloc-8192 68 68 8192 4 8 : tunables 0 0 0 : slabdata 17 17 0 kmalloc-4096 1186 1224 4096 8 8 : tunables 0 0 0 : slabdata 153 153 0 kmalloc-2048 965 992 2048 16 8 : tunables 0 0 0 : slabdata 62 62 0 kmalloc-1024 967 1040 1024 16 4 : tunables 0 0 0 : slabdata 65 65 0 kmalloc-512 1120 1120 512 16 2 : tunables 0 0 0 : slabdata 70 70 0 kmalloc-256 19644992 19644992 256 16 1 : tunables 0 0 0 : slabdata 1227812 1227812 0
kmalloc-128 760027 762656 128 32 1 : tunables 0 0 0 : slabdata 23833 23833 0
Normal environment:
kmalloc-8192 68 68 8192 4 8 : tunables 0 0 0 : slabdata 17 17 0 kmalloc-4096 1248 1248 4096 8 8 : tunables 0 0 0 : slabdata 156 156 0 kmalloc-2048 1008 1040 2048 16 8 : tunables 0 0 0 : slabdata 65 65 0 kmalloc-1024 948 960 1024 16 4 : tunables 0 0 0 : slabdata 60 60 0 kmalloc-512 1072 1072 512 16 2 : tunables 0 0 0 : slabdata 67 67 0 kmalloc-256 3199 3264 256 16 1 : tunables 0 0 0 : slabdata 204 204 0 kmalloc-128 761575 762080 128 32 1 : tunables 0 0 0 : slabdata 23815 23815 0
Signature · 4 lines
You may reply to this email to add a comment. You are receiving this mail because: You are the assignee for the bug.
Quoted 11 lines · Stephen Hemminger
Begin forwarded message:
Date: Wed, 15 Dec 2021 03:40:59 +0000
From: [email protected]
To: [email protected]
Subject: [Bug 215329] New: The vsock component triggers out of memory when sending small packets.
Thanks for CC me. I think it's related to this issue: https://gitlab.com/vsock/vsock/-/issues/1
virtio-vsock provides a credit mechanism, but we need to improve the memory tracking, maybe reusing sk_sndbuf and sk_rcvbuf.
Unfortunately, when vsock was introduce it adds is own IOCTL to set the buffer size, so we need to clean up a bit that part.
I can't work on it right now, maybe in the next months I can, but I can help for sure if someone has time.
Thanks,
Stefano