Repository navigation
Description
Every NethVoice instance starts the synchronization of external calendars every minute, exactly at second 0, even when no calendar is configured. On a node that hosts several instances all these jobs start together and keep the processor fully busy for a few seconds every minute. Instances with many calls in progress can have choppy audio in those seconds.
Steps to reproduce
- Install several NethVoice instances on the same node, for example 11 instances on a node with 4 CPUs
- Do not configure any calendar in the instances
- On the node, watch the processor load second by second with
vmstat 1across the start of a minute - List the timers of an instance with
runagent -m nethvoice1 systemctl --user list-timers
Expected behavior
An instance without calendars does not run the calendar synchronization. When the synchronization is needed, the instances of the same node do not start it all at the same second.
Actual behavior
The timer nethvoice-calendar-sync.timer runs fwconsole calendar --sync inside the freepbx container every minute at second 0, on every instance. The timer nethvoice-queue-stats-reset.timer starts at the same second.
On a node with 4 CPUs and 11 instances, none of them with a calendar, 22 jobs start together every minute. Each one takes about 1 second. The processor has no idle time for 3-4 seconds and up to 57 processes wait to run:
mm:ss waiting idle%
27:59 0 84
28:00 2 86
28:01 57 42
28:02 36 0
28:03 40 0
28:04 24 0
28:05 2 52
28:06 0 78
During those seconds the Asterisk process of a busy instance does not get the processor in time. In one measurement a single Asterisk thread waited 859 ms within one second. On calls answered through a queue Asterisk logs this warning, always in the first seconds of a minute:
WARNING[85077][C-0000022f] channel.c: Exceptionally long voice queue length (97 voice / 97 total) queuing to Local/218@from-queue-0000026c;2
The effect is audible only on instances with many calls at the same time. Instances with few calls on the same node log no warning.
Components
NethVoice 1.8.7 and 1.8.6. The timer exists since NethVoice 1.7.9. Measured on a NethServer 8 node with 4 CPUs and 11 NethVoice instances.
See also
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsTodo
Activity