change play_pcap_audio raw socket to udp socket #571
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
./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>
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
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.