Summary:ASTERISK-18620: Asterisk eating more CPU after upgrade
Reporter:Ole Kaas (ole.kaas)Labels:
Date Opened:2011-09-26 08:01:00Date Closed:2011-09-30 05:57:05
Versions: Frequency of
Environment:Debian 2.6.32-5-amd64 #1 SMP Tue Jun 14 09:42:28 UTC 2011 x86_64 GNU/LinuxAttachments:( 0) backtrace.txt
( 1) cpu.png
Description:After upgrading from my munin graph shows significant change in cpu load (image attached)

Upgrade was simply ./configure. Copying compile opts form src tree to src tree and manually check the options. make. make bininstall. Restart *

top reveals that it is indeed asterisk that eats cpu. The LWP using most cpu:

Thread 25 (Thread 0x7f7a1658b700 (LWP 29853)):
#0  0x00007f7a3d1ea113 in poll () from /lib/libc.so.6
#1  0x00000000004e2222 in ast_io_wait (ioc=0xef780f8, howlong=109) at io.c:275
#2  0x00007f7a36b67346 in do_monitor (data=0x0) at chan_sip.c:25161
#3  0x000000000056c705 in dummy_start (data=0xefaa4f8) at utils.c:1004
#4  0x00007f7a3c9bc8ba in start_thread () from /lib/libpthread.so.0
#5  0x00007f7a3d1f502d in clone () from /lib/libc.so.6
#6  0x0000000000000000 in ?? ()

backtrace attached
Comments:By: David Vossel (dvossel) 2011-09-27 16:43:37.692-0500

Can you provide us more information about your network environment?  Is cpu consumption being monitored under some sort of stress test we can reproduce?  These sorts of issues can be difficult to address if there are not some definite steps we can use to reproduce your environment.

By: Ole Kaas (ole.kaas) 2011-09-30 05:56:03.462-0500

Actually - I did turn on DEBUG_THREADS. After turning it off and recompile, cpu load is normal again. Anyway the high load even while "idle" is most likely due to the fact that we monitor all sip peers and most sip peers also send NAT keepalive. This server instance is currently in "incubation state" as a virtual server (ESX). Last line of "sip show peers": 370 sip peers [Monitored: 254 online, 112 offline Unmonitored: 3 online, 1 offline]

By: Ole Kaas (ole.kaas) 2011-09-30 05:57:05.261-0500

DEBUG_THREADS was the cause of the increased load