...
- Server Host: Vultr (www.vultr.com)
- CPU: 3.6 Ghz Intel CPU (dual single core)
- Memory: 2GB1GB
- Disk: 40GB 20GB SSD
- OS: CentOS Linux 7.0
- Cache Size: 1GB
- Browser: Google Chrome v40v43
Testing Regimen
The following settings have been tested against the following:
...
Code Block |
---|
CONFIG proxy.config.http.keep_alive_no_activity_timeout_in INT 300900 CONFIG proxy.config.http.keep_alive_no_activity_timeout_out INT 300900 CONFIG proxy.config.http.transaction_no_activity_timeout_in INT 105 CONFIG proxy.config.http.transaction_no_activity_timeout_out INT 105 CONFIG proxy.config.http.transaction_active_timeout_in INT 14400 CONFIG proxy.config.http.transaction_active_timeout_out INT 14400 CONFIG proxy.config.http.accept_no_activity_timeout INT 105 CONFIG proxy.config.net.default_inactivity_timeout INT 105 |
Network
...
Settings
The following settings control various network-related settings within ATS.
The first This setting controls how often Traffic Server will internally poll to process network events. Even though I'm now on a machine that can handle 2-3% CPU load, I decided to reduce this. I haven't noticed any significant performance difference as a result of this.
The second and third/fourth settings relate more closely to OS-tuning that's documented in the next wiki page.
The second setting removes the TCP_NODELAY option from origin server connections. Once one has told Linux to optimize for latency, this appears to be no longer necessary.
The third/fourth settings specify the socket buffer sizes for origin server connections. I've found setting this to roughly my "average object size" as reported by "traffic_top" appears to be optimal.
Code Block |
---|
CONFIG proxy.config.net.poll_timeout INT 50
CONFIG proxy.config.net.sock_option_flag_out INT 0 |
Cache Control
The following configurations tell Traffic Server to be more aggressive than it would otherwise, with regard to caching overall as well as some speed-ups.
...
Code Block |
---|
CONFIG proxy.config.http.cache.cache_urls_that_look_dynamic INT 0 CONFIG proxy.config.http.chunking.size INT 256K64K CONFIG proxy.config.http.cache.ims_on_client_no_cache INT 0 CONFIG proxy.config.http.cache.ignore_server_no_cache INT 1 |
...
Code Block |
---|
CONFIG proxy.config.net.connections_throttle INT 2K1K |
RAM And Disk Cache Configuration
...
Code Block |
---|
CONFIG proxy.config.cache.ram_cache.size INT 64M8M CONFIG proxy.config.cache.ram_cache_cutoff INT 8M 1M CONFIG proxy.config.cache.ram_cache.algorithm INT 1 CONFIG proxy.config.cache.min_average_object_size INT 32K24K CONFIG proxy.config.cache.target_fragment_size INT 4M CONFIG proxy.config.cache.mutex_retry_delay INT 50 CONFIG proxy.config.cache.enable_read_while_writer INT 02 |
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.
...
Third, I also allow the cache to use stale DNS records for up to 15 minutes 60 seconds while they're being updated. This also contributes to cache speed.
...
Code Block |
---|
############################################################################## # HostDB ############################################################################## CONFIG proxy.config.hostdb.ip_resolve STRING ipv6;ipv4 CONFIG proxy.config.hostdb.size INT 48K CONFIG proxy.config.hostdb.storage_size INT 12M CONFIG proxy.config.hostdb.serve_stale_for INT 90060 CONFIG proxy.config.cache.hostdb.sync_frequency INT 900 |
...