You can also test IO for subpar speed due to the physical server having too much activity from other customers on the same machine.
We use a command from the same package:
sudo apt install sysstat
Run the command:
Look at the
%util and
await columns.
If
%util is near 100% and
await times are more than 10 ms for SSDs (or 50 ms for HDDs), your disk is waiting in a shared queue, which points to a heavy I/O from other users. Good reason to find a new host.
Check for heavy network traffic from other users.
Code:
sudo apt install mtr
mtr -c 100 -w 1.1.1.1
Loss %: Consistent packet loss at the first few hops (your host's gateway router) shows consistent network saturation.
StDev (Standard Deviation): High deviation (e.g., pings jumping from 2ms to 120ms) proves high network jitter.
Both of these can impede Asterisk's ability to respond quickly to incoming calls.
Check for dropped packets.
Replace
eth0 with your network interface name that Asterisk is using.
Look at the
drop counters. If the RX drop counter is increasing while your personal traffic is low, the host hypervisor's network ring buffer is overflowing due to physical node traffic from other users.
rx_speed_drop or
rx_missed_errors increment when the host hypervisor drops a packet before your VM even gets it.
rx_queue_0_drops: If you see multi-queue drops increasing, your local virtual CPU cores aren't pulling packets out of the ring buffer fast enough because the physical CPU is busy with other tenants.
If the network card is fine but the OS network stack is overwhelmed by neighbor traffic spikes, packets will drop at the socket buffer layer. Check this with:
If you see high numbers or want to see UDP socket drops specifically (common during heavy traffic), run
and look for
"packet receive errors" or
"receive buffer errors".
Any of these could delay Asterisk's ability to get
SIP INVITE messages for incoming calls immediately, process them, and respond right away.
Test your Max Throughput
Find a
public iperf3 server near your location and run:
Code:
iperf3 -c [public_iperf_server] -R
For North and South America it's at Hurricane Electric:
Code:
iperf3 -c iperf.he.net -R
The
-R flag (for receive) tests your download speed.
If you have a 1 Gbps port and your VM's struggling to maintain 50 Mbps, and your CPU/RAM usage is idle, the physical node's network port is likely getting saturated by other VMs on the same node. Good reason to find a new node, or find a new host.