VICIdial Performance Tuning: Scaling Server Infrastructure for 500+ Agents
These articles are AI-generated summaries. Please check the original sources for full details.
VICIdial Performance Tuning: Server Optimization for 500+ Agents
VICIdial deployments often hit performance walls at 300+ agents due to default OS settings rather than software limitations. Scaling to 500 agents requires managing over 2,000 concurrent SIP channels and high-frequency database hammering by Perl daemons. This technical guide provides production-tested configurations for the Linux kernel, Asterisk, and MySQL to sustain massive call volumes.
Why This Matters
The Linux kernel defaults are tuned for general-purpose workloads, but VICIdial requires massive file descriptor and socket limits to handle simultaneous recordings and SIP traffic. Without specific tuning, systems enter a swap death spiral where I/O contention for MyISAM files causes Perl daemons to queue, eventually freezing the agent interface. Technical reality necessitates prioritizing application memory over filesystem cache to maintain real-time performance. Setting vm.swappiness to 10 or lower ensures that the database server remains responsive even under heavy load by preventing the OS from aggressively swapping application data to disk. This is critical because a swapping telephony server leads to immediate jitter and dropped calls during peak traffic hours.
Key Insights
- G.711 codec is the correct choice for VICIdial outbound dialing as it allows 150-200 channels per core by avoiding transcoding overhead.
- MySQL query cache must be disabled (query_cache_size = 0) to prevent performance-killing invalidation cycles caused by VICIdial’s high write frequency.
- Converting core tables like vicidial_live_agents to the MEMORY storage engine eliminates disk I/O and reduces query latency to microseconds.
- Nginx with PHP-FPM uses 60-70% less memory than Apache mod_php by eliminating the overhead of embedding PHP in every web server child process.
- Increasing net.core.somaxconn to 8192 prevents SIP connection drops during high-traffic spikes or agent login storms.
- Setting vm.swappiness to 10 prevents the kernel from swapping application memory, which is a primary cause of VICIdial ‘swap death spirals’.
Working Examples
Essential sysctl.conf parameters for high-volume VICIdial telephony servers.
fs.file-max = 524288 net.core.somaxconn = 8192 net.core.rmem_max = 16777216 net.ipv4.tcp_tw_reuse = 1 vm.swappiness = 10
MySQL configuration to eliminate query cache overhead and support MEMORY tables.
[mysqld] query_cache_size = 0 query_cache_type = 0 concurrent_insert = 2 max_heap_table_size = 256M tmp_table_size = 256M
Practical Applications
- Use Case: Telephony servers using G.711 passthrough to maximize core utilization. Pitfall: Using G.729 without dedicated hardware, leading to CPU saturation and jitter at 400+ channels.
- Use Case: Deploying Nginx for agent web sessions to handle 500+ concurrent polling requests efficiently. Pitfall: Relying on default Apache prefork limits, which causes request queuing and agent interface timeouts.
- Use Case: Utilizing tmpfs for Asterisk temporary files to eliminate disk I/O during recording mixing. Pitfall: Storing temporary recording files on slow SATA disks, resulting in I/O wait spikes.
References:
Continue reading
Next article
Master VICIdial Real-Time Coaching: A Technical Guide to Whisper, Barge-In, and Performance Dashboards
Related Content
Master VICIdial Real-Time Coaching: A Technical Guide to Whisper, Barge-In, and Performance Dashboards
Optimize call center performance using VICIdial's real-time coaching tools to achieve a 400% ROI through data-driven intervention and automated monitoring.
ViciDial Lead Recycling and List Management Optimization Guide
Optimize ViciDial 2.14+ performance using production-tested SQL configurations and status-based recycling rules to boost contact center conversion rates.
Solved: The Ultimate WordPress Pagespeed Guide
This guide details WordPress performance optimization, achieving peak performance through server tuning, caching, and infrastructure scaling, resulting in faster load times.