Hi guys,
I'm using rtpengine (compiled from source) and I see a lot of difference in cpu usage comparing with rtpproxy. Is this normal?
With 600 calls:
cpu *41.7%* rtpengine
#rtpengine threads 4
# lscpu Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian *CPU(s): 2* On-line CPU(s) list: 0,1 Thread(s) per core: 1 Core(s) per socket: 1 Socket(s): 2 NUMA node(s): 1 Vendor ID: GenuineIntel CPU family: 6 Model: 26 Model name: Intel(R) Xeon(R) CPU X7560 @ 2.27GHz Stepping: 4 CPU MHz: 2259.955 BogoMIPS: 4522.00 Hypervisor vendor: VMware Virtualization type: full L1d cache: 32K L1i cache: 32K L2 cache: 256K L3 cache: 24576K NUMA node0 CPU(s): 0,1
Calls established with a=rtpmap:0 PCMU/8000
Thanks in advance!
Diego.
On Wed, May 03, 2017 at 12:10:57PM -0300, Diego Nadares wrote:
I'm using rtpengine (compiled from source) and I see a lot of difference in cpu usage comparing with rtpproxy. Is this normal?
Yes, rtpengine uses less cpu (when configured correctly)
Hypervisor vendor: VMware Virtualization type: full
This says nothing since your guest might be throttled.
You neglected to mention this explicitly, but I guess you are trying to say that rtpproxy uses less during normal operation?
Have you configured the kernel module correctly?
Thanks for your replies.
System CPU or User CPU?
Well, it's cpu from top. %Cpu0 : 8.3 us, 6.2 sy, 0.0 ni, 84.4 id, 0.0 wa, 0.0 hi, 1.0 si, 0.0 st %Cpu1 : 6.2 us, 5.2 sy, 0.0 ni, 86.5 id, 0.0 wa, 0.0 hi, 2.1 si, 0.0 st PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 5671 root 15 -5 779912 13856 1556 S 14.9 0.7 0:22.73 rtpengine
This says nothing since your guest might be throttled.
You neglected to mention this explicitly, but I guess you are trying to say that rtpproxy uses less during normal operation?
Yes, rtpproxy uses less than rtpengine. Right now, with 300 calls, rtpproxy is using 7% and rtpengine almost 13% of cpu.
If kernel forwarding is not in use, I would strongly suggest to enable it.
I compiled just daemon mode with no kernel module. I think I will try this too, eventually. I have to see how to compile it here.
This is my cfg. Could you check if this is ok?
route[NATMANAGE] { xlog("L_ERR", "NATMANAGE $Ri $rd $du $avp(rtpengine)");
#Just replies if (!is_pure_ip($rd)){ if ( $avp(rtpengine) == "1"){ xlog("L_ERR", "NATMANAGE $rd Not a valid ip - rtpengine active"); rtpengine_manage("replace-origin replace-session-connection ICE=remove"); } exit; }
if (is_ip_rfc1918($Ri)){ if (is_ip_rfc1918($rd)){ xlog("L_ERR", "NATMANAGE Priv -> Priv"); #Not proxying for now $avp(rtpengine) = "1"; rtpengine_manage("direction=priv direction=priv replace-origin replace-session-connection RTP/AVP"); } else{ xlog("L_ERR", "NATMANAGE Priv -> Pub"); $avp(rtpengine) = "1"; #rtpengine_manage("direction=priv direction=pub replace-origin replace-session-connection ICE=remove RTP/AVP"); rtpengine_manage("direction=priv direction=pub replace-origin replace-session-connection ICE=remove"); } } else{ if (is_ip_rfc1918($rd)){ xlog("L_ERR", "NATMANAGE Pub -> Priv"); $avp(rtpengine) = "1"; #rtpengine_manage("direction=pub direction=priv replace-origin replace-session-connection RTP/AVP ICE=remove"); rtpengine_manage("direction=pub direction=priv replace-origin replace-session-connection ICE=remove"); } else{ xlog("L_ERR", "NATMANAGE Pub -> Pub"); $avp(rtpengine) = "1"; #rtpengine_manage("direction=pub direction=pub replace-origin replace-session-connection RTP/AVP ICE=remove"); rtpengine_manage("direction=pub direction=pub replace-origin replace-session-connection ICE=remove"); }
}
return; }
Thanks!
Diego.
2017-05-03 13:01 GMT-03:00 Richard Fuchs rfuchs@sipwise.com: