Apache Configuration for CVT Collector
This document describes the configurable Apache settings for the CVT Collector, designed to optimize performance for different cluster scales.
The CVT Collector uses Apache as its web server. Apache performance can be tuned via profiles that adjust concurrency, connection handling, and logging settings based on your deployment scale.
All Apache settings are configured in cvt_env.conf under the [apache] section:
[apache]
CVT_APACHE_PROFILE = small
CVT_APACHE_LOG_LEVEL = warn
CVT_APACHE_ACCESS_LOG = true
CVT_APACHE_PROFILE
Selects the Apache performance profile. Each profile includes MPM (Multi-Processing Module) settings and connection optimization settings.
Profile | Cores | RAM | Agents | MaxRequestWorkers |
| 2-16 | 8-64GB | < 1,000 | 150 |
| 32-128 | 128-512GB | 1,000-10,000 | 2,048 |
| 200-300 | 1TB+ | 10,000-20,000 | 12,800 |
| 400+ | 1.5TB+ | 20,000+ | 25,600 |
| - | - | - | Auto-detect based on CPU cores |
Default: small
CVT_APACHE_LOG_LEVEL
Controls the verbosity of Apache error logs. Higher levels reduce log volume.
Level | Description |
| Debug messages (very verbose) |
| Informational messages |
| Normal but significant conditions |
| Warning conditions (default) |
| Error conditions |
| Critical conditions |
| Action must be taken immediately |
| System is unusable |
Default: warn
Recommendation for large clusters: Use error or crit to reduce log I/O.
CVT_APACHE_ACCESS_LOG
Enable or disable Apache access logs (HTTP request logging).
Value | Description |
| Access logs enabled (default) |
| Access logs disabled |
Default: true
Recommendation for large clusters: Set to false to reduce disk I/O.
Small Profile (Default)
For development and small production deployments.
# MPM Settings
StartServers 2
MinSpareThreads 25
MaxSpareThreads 75
ThreadLimit 64
ThreadsPerChild 25
MaxRequestWorkers 150
# Connection Settings
KeepAlive On
KeepAliveTimeout 5
MaxKeepAliveRequests 100
Timeout 180
Medium Profile
For mid-size production clusters.
# MPM Settings
StartServers 4
MinSpareThreads 75
MaxSpareThreads 250
ThreadLimit 64
ThreadsPerChild 64
ServerLimit 32
MaxRequestWorkers 2048
AsyncRequestWorkerFactor 2
# Connection Settings
KeepAlive On
KeepAliveTimeout 3
MaxKeepAliveRequests 500
Timeout 150
EnableMMAP Off
Large Profile
For large-scale production deployments.
# MPM Settings
StartServers 8
MinSpareThreads 200
MaxSpareThreads 600
ThreadLimit 128
ThreadsPerChild 128
ServerLimit 100
MaxRequestWorkers 12800
AsyncRequestWorkerFactor 2
# Connection Settings
KeepAlive On
KeepAliveTimeout 2
MaxKeepAliveRequests 1000
Timeout 120
EnableMMAP Off
XLarge Profile
For very large-scale hyperscale deployments.
# MPM Settings
StartServers 8
MinSpareThreads 250
MaxSpareThreads 750
ThreadLimit 128
ThreadsPerChild 128
ServerLimit 200
MaxRequestWorkers 25600
AsyncRequestWorkerFactor 2
# Connection Settings
KeepAlive On
KeepAliveTimeout 2
MaxKeepAliveRequests 1000
Timeout 120
EnableMMAP Off
Via cvt_env.conf (Recommended)
Edit the configuration file (persisted across restarts):
[apache]
CVT_APACHE_PROFILE = large
CVT_APACHE_LOG_LEVEL = error
CVT_APACHE_ACCESS_LOG = false
The configuration file is located at:
Container: /cable_bringup_root/config/cvt_env.conf
Default: /etc/cablevalidation/cvt_env.conf
Via Environment Variables
Set environment variables when starting the container:
docker run \
-e CVT_APACHE_PROFILE=large \
-e CVT_APACHE_LOG_LEVEL=error \
-e CVT_APACHE_ACCESS_LOG=false \
...
Environment variables take precedence over cvt_env.conf settings.
Auto-Detection
Use auto to automatically select a profile based on available CPU cores: CVT_APACHE_PROFILE = auto
Auto-detection thresholds:
400+ cores →
xlarge200-399 cores →
large32-199 cores →
medium< 32 cores →
small
The Apache configuration is applied at container startup via apache2_wrapper.sh :
Setting Type | Destination File |
MPM settings | /etc/apache2/mods-available/mpm_event.conf |
Performance settings | /etc/apache2/conf-available/cvt_performance.conf |
Log level | /etc/apache2/apache2.conf |
Access logs | /etc/apache2/conf-available/*.conf /etc/apache2/sites-available/*.conf |
Profiles are defined in /etc/apache2/apache_profiles.conf (copied from conf/collector/apache_profiles.conf at build time).
To add a custom profile:
Edit the profiles file
Add a new section with MPM and Performance settings:
[custom] # custom - Description # === MPM === StartServers
6MinSpareThreads100... # === Performance === KeepAlive On KeepAliveTimeout4...Set CVT_APACHE_PROFILE = custom in cvt_env.conf
Apache fails to start with "already running"
This occurs when a stale PID file exists from a previous unclean shutdown. The wrapper script automatically cleans stale PID files, but if the issue persists:
rm -f /cable_bringup_root/config/run/apache2/apache2.pid
supervisorctl start apache
Check current configuration
# Verify profile was applied
cat /etc/apache2/mods-available/mpm_event.conf
cat /etc/apache2/conf-available/cvt_performance.conf
# Check Apache config syntax
apache2ctl configtest
# View current settings
apache2ctl -V
View Apache logs
# Error log
tail -f /cable_bringup_root/log/apache2/error.log
# Access log (if enabled)
tail -f /cable_bringup_root/log/apache2/access.log
Use appropriate profile: Match your hardware resources
Disable access logs: Reduces disk I/O significantly
Increase log level: Use error or crit instead of warn
Monitor resources: Watch CPU and memory usage after profile changes
Test before production: Validate configuration in staging environment
Example high-performance configuration:
[apache]
CVT_APACHE_PROFILE = large
CVT_APACHE_LOG_LEVEL =crit
CVT_APACHE_ACCESS_LOG = false