Asterisk 13.2 dominates one core ( in 8 core system)

At about 1000 calls we see one core almost fully utilized. The box is just doing sip and rpt, basically just routing calls no VM etc …

Any way to help spread the load over all the cpus?

Thanks

Shane

Sar output looks like cpu 0 this time
10:51:31 PM CPU %user %nice %system %iowait %steal %idle
10:51:36 PM all 7.66 0.00 11.27 0.21 0.29 80.57
10:51:36 PM 0 22.43 0.00 55.15 0.00 0.92 21.51
10:51:36 PM 1 6.37 0.00 7.39 0.00 0.21 86.04
10:51:36 PM 2 6.88 0.00 4.58 0.00 0.21 88.33
10:51:36 PM 3 4.65 0.00 3.81 0.00 0.21 91.33
10:51:36 PM 4 5.75 0.00 5.75 0.21 0.41 87.89
10:51:36 PM 5 7.13 0.00 7.33 0.20 0.20 85.13
10:51:36 PM 6 3.33 0.00 5.62 0.83 0.21 90.00
10:51:36 PM 7 6.05 0.00 4.38 0.42 0.21 88.94

LWP 24447 is the one …

F S UID PID PPID LWP C NLWP PRI NI ADDR SZ WCHAN RSS PSR STIME TTY TIME CMD
4 - asterisk 24430 24427 - 99 843 - - - 1417969 - 276352 - Apr05 ? 5-08:43:15 /usr/sbin/asterisk -f -U asterisk -G asterisk -vvvg -c
4 S asterisk - - 24430 1 - 80 0 - - poll_s - 6 Apr05 - 00:55:27 -
1 S asterisk - - 24431 0 - 80 0 - - futex_ - 7 Apr05 - 00:00:00 -
1 S asterisk - - 24432 2 - 80 0 - - futex_ - 3 Apr05 - 02:00:47 -
1 S asterisk - - 24434 0 - 80 0 - - poll_s - 2 Apr05 - 00:00:00 -
1 S asterisk - - 24437 2 - 80 0 - - futex_ - 1 Apr05 - 02:34:25 -
1 S asterisk - - 24440 0 - 80 0 - - futex_ - 1 Apr05 - 00:04:01 -
1 S asterisk - - 24441 0 - 80 0 - - futex_ - 2 Apr05 - 00:00:00 -
1 S asterisk - - 24442 0 - 80 0 - - futex_ - 7 Apr05 - 00:00:00 -
1 S asterisk - - 24443 0 - 80 0 - - futex_ - 3 Apr05 - 00:00:49 -
1 S asterisk - - 24444 0 - 80 0 - - futex_ - 7 Apr05 - 00:10:58 -
1 S asterisk - - 24447 20 - 80 0 - - futex_ - 4 Apr05 - 17:32:38 -
1 S asterisk - - 24448 0 - 80 0 - - futex_ - 2 Apr05 - 00:00:01 -
1 S asterisk - - 24449 0 - 80 0 - - futex_ - 3 Apr05 - 00:03:56 -
1 S asterisk - - 24450 0 - 80 0 - - futex_ - 7 Apr05 - 00:00:00 -
1 S asterisk - - 24451 0 - 80 0 - - futex_ - 7 Apr05 - 00:00:00 -
1 S asterisk - - 24452 0 - 80 0 - - futex_ - 0 Apr05 - 00:00:00 -
1 S asterisk - - 24453 0 - 80 0 - - futex_ - 7 Apr05 - 00:00:00 -
1 S asterisk - - 24454 0 - 80 0 - - futex_ - 7 Apr05 - 00:00:00 -
1 S asterisk - - 24460 0 - 80 0 - - poll_s - 5 Apr05 - 00:06:56 -
1 S asterisk - - 24462 0 - 80 0 - - futex_ - 7 Apr05 - 00:00:00 -
1 S asterisk - - 24463 0 - 80 0 - - futex_ - 7 Apr05 - 00:00:00 -

Thread 777 (Thread 0x7fdace283700 (LWP 24447)):
#0 0x0000003e2620d930 in sem_wait () from /lib64/libpthread.so.0
#1 0x00000000005a9550 in default_tps_processing_function ()
#2 0x00000000005bb7eb in dummy_start ()
#3 0x0000003e262079d1 in start_thread () from /lib64/libpthread.so.0
#4 0x0000003e25ee886d in clone () from /lib64/libc.so.6

looks like this is the function

00169 {
00170 struct ast_taskprocessor_listener *listener = data;
00171 struct ast_taskprocessor *tps = listener->tps;
00172 struct default_taskprocessor_listener_pvt pvt = listener->user_data;
00173 int sem_value;
00174 int res;
00175
00176 while (!pvt->dead) {
00177 res = ast_sem_wait(&pvt->sem);
00178 if (res != 0 && errno != EINTR) {
00179 ast_log(LOG_ERROR, “ast_sem_wait(): %s\n”,
00180 strerror(errno));
00181 /
Just give up /
00182 break;
00183 }
00184 ast_taskprocessor_execute(tps);
00185 }
00186
00187 /
No posting to a dead taskprocessor! /
00188 res = ast_sem_getvalue(&pvt->sem, &sem_value);
00189 ast_assert(res == 0 && sem_value == 0);
00190
00191 /
Free the shutdown reference (see default_listener_shutdown) */
00192 ao2_t_ref(listener->tps, -1, “tps-shutdown”);
00193
00194 return NULL;
00195 }

The wait in sem_wait indicates that this is a system call the does not use any CPU.

Any idea what is eating up the CPU then ?

found some details here

chinanetcloud.com/blog/tech- … ingle-cpus

Ok looks like maybe my nic card is just using one cpu

03:14:20 PM CPU intr/s
03:14:21 PM all 92410.00
03:14:21 PM 0 33128.00
03:14:21 PM 1 4091.00
03:14:21 PM 2 4942.00
03:14:21 PM 3 4924.00
03:14:21 PM 4 4920.00
03:14:21 PM 5 4236.00
03:14:21 PM 6 4635.00
03:14:21 PM 7 4740.00