turnserver use too much CPU and memory

164 views
Skip to first unread message

李欣

unread,
Oct 26, 2018, 5:39:36 AM10/26/18
to TURN Server (Open-Source project)
hi all:
       I use turnserver in a WebRTC app. we just use stun, not use turn relay service. When In flow reach 100 Mbps, the CPU  usage will reach 1400% , and 
the memory will linear growth.
      I find allocate spend too much memory, so I start the turnserver by:
/usr/local/coturn/bin/turnserver --max-allocate-timeout 1   --stun-only  --no-stdout-log --simple-log --log-file /usr/local/coturn/log/turnserver.log --pidfile /usr/local/coturn/var/run/turnserver/turnserver.pid  

     The memory will stay a certain amount.But cpu still reach 600%.When flow is 100Mbps, the turnserver will receive 211406 packets(each packet length is 62 bytes) every second. 
How to reduce cpu usage? Thank you. 

btw:
CPU info:
Intel(R) Xeon(R) CPU E5-2420 v2 @ 2.20GHz   and 24 processors

Settings for eth0:
Supported ports: [ TP ]
Supported link modes:   10baseT/Half 10baseT/Full 
                        100baseT/Half 100baseT/Full 
                        1000baseT/Full 
Supported pause frame use: Symmetric
Supports auto-negotiation: Yes
Advertised link modes:  10baseT/Half 10baseT/Full 
                        100baseT/Half 100baseT/Full 
                        1000baseT/Full 
Advertised pause frame use: Symmetric
Advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
MDI-X: on
Supports Wake-on: pumbg
Wake-on: g
Current message level: 0x00000007 (7)
       drv probe link
Link detected: yes

Reply all
Reply to author
Forward
0 new messages