...
NOTE: Please use the following with Apache Traffic Server v5.0.0 and higher.
Home Server Virtual Machine
- Make/Model: Apple iMac Mid 2011Server Host: Vultr (www.vultr.com)
- CPU: 3.4 6 Ghz Intel Core i7 CPU(quad-single core w/Hyperthreading)
- Memory: 16GB1GB
- Disk: 1TB20GB SSD
- OS: Mac OS X v10.9.3CentOS Linux 7.0
- Cache Size: 1GB
- Browser: Google Chrome v37v38
Testing Regimen
The following settings have been tested against the following:
...
I decided to go with 32 connections per origin server simultaneously. I also found keeping a few extra connections connection open for additional requests speeds things up.
The third setting controls how often Traffic Server will internally poll to process network events. As Even though I'm now on a machine that can 't easily handle 2-3% CPU load constantly, I reduced this.
Code Block |
---|
CONFIG proxy.config.http.origin_max_connections INT 32 CONFIG proxy.config.http.origin_min_keep_alive_connections INT 21 CONFIG proxy.config.net.poll_timeout INT 50 |
...
Code Block |
---|
CONFIG proxy.config.http.cache.heuristic_min_lifetime INT 2592000
CONFIG proxy.config.http.cache.heuristic_max_lifetime INT 7776000
CONFIG proxy.config.http.cache.heuristic_lm_factor FLOAT 0.75 |
Network Configuration
The default config for Traffic Server allows for up to 30,000 simultaneous connections.
...
NOTE: These settings require one to refresh the disk cache to take effect. Simply remove /usr/local/var/trafficserver/cache.db and restart Traffic Server to refresh the disk cache.
Fourth, I discovered that backing off the cache directory's sync frequency helps populate the RAM cache under low load. I definitely recommend trying this.
Code Block |
---|
CONFIG proxy.config.cache.ram_cache.size INT 64M128M CONFIG proxy.config.cache.ram_cache_cutoff INT 8M16M CONFIG proxy.config.cache.ram_cache.algorithm INT 1 CONFIG proxy.config.cache.min_average_object_size INT 64K CONFIG proxy.config.cache.target_fragment_size INT 262144 CONFIG proxy.config.cache.mutex_retry_delay INT 50 CONFIG proxy.config.cache.enable_read_while_writer INT 0 CONFIG proxy.config.cache.dir.sync_frequency INT 1200 |
Logging Configuration
The defaults for Traffic Server specify a squid-compatible logfile that's binary in nature. I prefer to have the file readable so I'm overriding this.
...
Code Block |
---|
############################################################################## # HostDB ############################################################################## CONFIG proxy.config.hostdb.ip_resolve STRING ipv6;ipv4 CONFIG proxy.config.hostdb.size INT 96K32K CONFIG proxy.config.hostdb.storage_size INT 24M8M CONFIG proxy.config.hostdb.serve_stale_for INT 300 |
...