To estimate the number of concurrent G.711 u-law VoIP sessions your FreeSWITCH setup should handle, let's consider the resources you've allocated and some general guidelines.
Here's a breakdown of factors and an estimated range:
- CPU: 4 vCPUs is a decent amount for a VoIP server. G.711 u-law is a relatively low-overhead codec.
- RAM: 8 GB of RAM should be sufficient, unless you're running other memory-intensive applications on the same VM.
- Network: The network bandwidth is critical. Each G.711 u-law call consumes approximately 80-90 kbps (including IP/UDP/RTP overhead).
- Disk I/O: 100 GB is likely more than enough disk space, as VoIP servers don't typically have heavy disk I/O requirements unless you're recording calls extensively.
- FreeSWITCH Configuration: Complex dialplans, extensive logging, and other features can increase CPU usage.
- VMware Overhead: Remember that VMware adds some overhead.
Now, let's estimate. A single vCPU could handle a significant number of G.711 calls if it was only doing that. However, FreeSWITCH has other tasks, and the OS needs resources. Considering your setup, a reasonable estimate would be in the range of 300-600 concurrent G.711 calls.
To get a more precise number, it is highly recommended to perform load testing with a tool like sofia_reg or a dedicated SIP testing tool. Monitor the CPU usage, memory usage, and network bandwidth during the tests. When CPU usage consistently exceeds 75-80%, you're likely approaching the limit. Also, keep an eye on packet loss and latency, as these will degrade call quality.
To get a more precise estimate of the capacity of your FreeSWITCH server, I will perform a search for tools and methodologies for load testing a FreeSWITCH server.
Based on the search results, here's a refined approach to estimating and validating your FreeSWITCH capacity:
-
Understand Bandwidth Requirements: G.711 u-law consumes approximately 80-100 kbps per call (including overhead). This translates to roughly 0.1 Mbps per call.[[1]]
-
Assess Network Capacity: Determine the upload and download bandwidth of your internet connection.[[2]] Your concurrent call capacity will be limited by whichever is smaller. For example, a 10 Mbps connection could theoretically support around 100 concurrent G.711 calls (10 Mbps / 0.1 Mbps per call). Realistically, you'll want to leave some headroom for other network traffic.
-
Load Testing Tools: Use tools like SIPp, WinSIP, or the FreeSWITCH dialer (freeswitch-perf-dialer) to simulate concurrent calls and measure the performance of your server. SIPp appears to be a popular open-source choice. There are also some commercial options like WinSIP.
-
Performance Metrics to Monitor:
- CPU Usage: Keep CPU usage below 75-80% to avoid performance degradation.
- Memory Usage: Ensure you have enough free RAM to handle the concurrent calls.
- Network Bandwidth: Monitor network usage to ensure you're not exceeding your available bandwidth.
- Packet Loss and Jitter: High packet loss or jitter will negatively impact call quality.[[3]]
-
FreeSWITCH Configuration:
ulimit Settings: Adjust the ulimit settings in your FreeSWITCH init script to allow a large number of open files and processes. Specifically, increase the maximum number of open file descriptors (ulimit -n 999999).[[4]]
switch.conf.xml: Review the max-sessions and sessions-per-second parameters in switch.conf.xml.[[5]] The default limit for sessions per second is 30.[[6]]
- Logging: Reduce the verbosity of logging to minimize the performance impact.
-
Codec Choice: While you specified G.711, be aware that G.729 uses significantly less bandwidth (around 8 kbps), allowing for more concurrent calls on a limited bandwidth connection, at the cost of slightly lower audio quality.[[3]]
-
Virtualization Overhead: A bare metal installation will generally provide better and more consistent performance than a virtualized environment. Take the VMWare overhead into consideration when estimating capacity.
Revised Estimate and Testing Strategy:
Given your 4 vCPUs, 8 GB of RAM, and Debian 11 on VMware, I'd still estimate in the range of 300-600 concurrent G.711 calls if your network bandwidth is sufficient. However, this is just an initial guess. You must perform load testing to determine the actual capacity of your specific setup.
Here’s how to proceed:
- Set up a testing environment: Use SIPp or another load testing tool on a separate machine.
- Configure realistic call scenarios: Simulate typical call flows, including hold, transfer, and other features you use.
- Gradually increase the load: Start with a small number of concurrent calls and gradually increase the number until you observe performance degradation (high CPU usage, packet loss, latency).
- Monitor resources: Use tools like
top, htop, and network monitoring tools to track CPU, memory, and network usage.
- Analyze results: Determine the maximum number of concurrent calls your system can handle while maintaining acceptable call quality.