Closed jmillan closed 11 months ago
Okay, I'm glad you've tested it with positive outcome! From my experience it is not always faster.
but it's also more stable
What does this mean exactly?
Okay, I'm glad you've tested it with positive outcome! From my experience it is not always faster.
In my tests you'll see the difference when larg-ish Routers, but not with small/normal ones. Testing with >200 consumers you'll see a noticeable difference.
In my tests you'll see the difference when larg-ish Routers, but not with small/normal ones. Testing with >200 consumers you'll see a noticeable difference.
That makes a lot of sense and is to be expected. Squeezing more performance out of the same CPU core is always nice.
The numbers are really positive. Not only the CPU usage is reduced but it's also more stable.
What does this mean exactly?
The CPU usage is more stable, it shows less spikes.
Sorry for so many comments, I thought I was creating a batch but it was not true.
Love it now. Is it ready? Are you gonna add those entries we discussed into the dump data? Or in another PR?
Thanks, I'll do few changes in this PR and add those dump data too. I'll notify you once done.
@ibc, the initial version of liburing is ready to merge. Can you please take a look at today's 4 commits?
IsSupported()
method for IsRuntimeSupported()
LibUring::Dump()
This greately reduces the number of system calls as just a single system call is needed to relay the incoming RTP packet to "every" Consumer
Hello, I'm working on udp syscall tunning on my local server, and trying lots of linux feature. IOUring seems to be a good solution, but how about sendmmsg
syscall, it seems to be able to reduce the syscall with less code?
but how about sendmmsg syscall, it seems to be able to reduce the syscall with less code?
You don't send multiple RTP packets in a raw to the same socket in mediasoup, but the "same" RTP packet from a Producer, to multiple sockets.
sendmmsg
is for sending multiple packets to the same socket.
This PR is about using liburing
when it's more convenient than libuv
.
Enable liburing usage for linux (kernel versions >= 6).
Use liburing to relay incoming RTP to Consumers. This greately reduces the number of system calls as just a single system call is needed to relay the incoming RTP packet to "every" Consumer, opposite to libuv which requires a system call to relay the RTP packet to "each" Consumer.
For efficiency, memory buffers are preallocated holding the data payload being sent.
NOTE: The numbers are really positive. Not only the CPU usage is reduced but it's also more stable.