Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change play_pcap_audio raw socket to udp socket #571

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

stars-in-darkness
Copy link

@stars-in-darkness stars-in-darkness commented Mar 4, 2022

At first I must say is forgive my pool english, thanks for read this pull-request text.

There ia a bug with sipp when use play_pcap_audio to play pcap audio files in sipp stressing test, first give some report on the internet,here is the hyperlink weburl:
https://sourceforge.net/p/sipp/mailman/message/27432688/

https://sourceforge.net/p/sipp/mailman/message/35015333/

Unfortunately, we trip in the bug one night when we begin stressing test on our voip system, as a result we changed to use rtp_stream to avoid the problem with had tried almost any ways the whole night on work. And now I wannt to fix the bug.
the syndrome is below:

Snipaste_2022-03-04_11-50-58

./sipp 192.168.2.112:10000 -i 192.168.9.138 -sf call_ivr_send.xml -inf call_ivr_send.csv -m 400 -l 400

<nop> <action> <exec play_pcap_audio="pcap/cityinsky_u.pcap"/> </action> </nop>

Snipaste_2022-03-04_13-41-58

Our network card has RSS(Receive Side Scaling) queue, but for the reason RSS do not hash the port or the other reason, it all foward to cpu12 and then 100% si to lost packages. Cause this one-half is network card RSS not ideal and the other half is the use of RAW sockets.

when the sipp run, we monitor the system performance use

perf top -C 12 --call-graph=dwarf

Snipaste_2022-03-04_14-07-56

lookup the document of linux kernel network stack, the function raw_local_deliver is deliver the packets to raw sockets. what's more, a raw sockets will receive the whole prototype's packets, what means if sipp calls 400, each of 400 raw sockets will receive the whole 400 calls' packets. In this situation, although sipp do not received the packets, but the kernel network stack still do the copy opearation, queue operation and intent to deliver to the applicational layer and release the skb later. Cause the softirq high especially when all packets to one cpu irq. Except for the fault of uncompleted network card RSS, use raw socket for sipp performance test is not a ideal way.

At last ,what I do is change the raw socket use to udp socket when use play_pcap_audio, and then the top si is very low, the bug is been fixd.

@wdoekes
Copy link
Member

wdoekes commented Mar 4, 2022

Thanks for your PR. At first glance, the PR looks okay, but there is one problem: the pcap support allows for multiple source/destination ports to be used (commonly for RTCP on port+1 or a simultaneous video stream on port+2).

When simply switching to UDP sockets, without catering for multiple source/destination ports, you will remove that functionality.

From the quick look, I don't know what the real problem you're facing is.

Maybe you're better of using the RTPSTREAM functionality instead?

@stars-in-darkness
Copy link
Author

stars-in-darkness commented Mar 8, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants