...
- Make/Model: Apple iMac Mid 2011
- CPU: 3.4 Ghz Intel Core i7 (quad-core w/Hyperthreading)
- Memory: 8GB
- Disk: 1TB
- OS: Mac OS X v10.8.5
- Cache Size: 3GB32GB
Current Testing Regimen
The following settings have been tested against the following:
...
As I'm using ATS as purely a forward-only web proxy cache, I decided to turn these off.
I believe the default settings enable ATS as both a forward and reverse cache.
Code Block |
---|
CONFIG proxy.config.reverse_proxy.enabled INT 0
CONFIG proxy.config.url_remap.remap_required INT 0
|
...
I've since updated this setting.
Code Block |
---|
CONFIG proxy.config.http.background_fill_completed_threshold FLOAT 0.000000
|
...
I've since updated these settings. I now believe I'm enforcing a window of between 1 and 3 months
to keep objects in the cache, using ATS's built-in heuristics.
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.500000
|
...
An interesting notion, but not one I desire. The following setting disables this feature.
Code Block |
---|
CONFIG proxy.config.http.cache.fuzz.min_time INT 0
|
...
I have 4, but discovered over time that using all of them causes problems with iTunes, and World of Warcraft.
In the hopes of avoiding problems like that, I decided to configure my ATS to use just one core where possible.
Code Block |
---|
CONFIG proxy.config.exec_thread.autoconfig INT 0
CONFIG proxy.config.exec_thread.limit INT 1
|
...
From what I understand it's a balancing act between what Internet Radio will accept,
and throughput of the cache overall.
Code Block |
---|
CONFIG proxy.config.http.chunking.size INT 64K
|
...
I decided to use Mozilla Firefox's values here, along with one of my own.
It turns out proxy.config.http.transaction_active_timeout_in was essentially shutting down my
streaming Internet Radio connections. I increased that setting from 15 minutes to 12 hours.
Code Block |
---|
CONFIG proxy.config.http.keep_alive_no_activity_timeout_in INT 115
CONFIG proxy.config.http.keep_alive_no_activity_timeout_out INT 115
CONFIG proxy.config.http.transaction_no_activity_timeout_in INT 90
CONFIG proxy.config.http.transaction_no_activity_timeout_out INT 90
CONFIG proxy.config.http.transaction_active_timeout_in INT 43200
CONFIG proxy.config.http.transaction_active_timeout_out INT 43200
CONFIG proxy.config.http.accept_no_activity_timeout INT 30
|
...
I decided to go with 32 connections per origin server simultaneously.
Code Block |
---|
CONFIG proxy.config.http.origin_max_connections 32
|
...
The following specifies 1GB of RAM cache, with objects of unlimited size,
to be managed using LRU. During normal use, RAM utilization will rise and rise
until all 1GB is used, then the LRU algorithm should kick in. Also,
figure on at least 100MB of general RAM overhead for ATS in addition to this.
Code Block |
---|
CONFIG proxy.config.cache.ram_cache.size INT 1G
CONFIG proxy.config.cache.ram_cache_cutoff INT 0
CONFIG proxy.config.cache.ram_cache.algorithm INT 1
CONFIG proxy.config.cache.ram_cache.use_seen_filter INT 0
|
...
Average Internet Object Size: 32KB
Directory Entries Required Per Object(headroom): 2
Cache Minimum Average Object Size: 16384 (32768 / 2)
Code Block |
---|
CONFIG proxy.config.cache.min_average_object_size INT 16K
|
...
My setting here is somewhat of a rough guess. I've had issues in the past with Squid as a web cache
and increasing the threads dedicated to disk access definitely helped. However, with ATS I've actually
noticed a speed boost by decreasing this setting. My current theory is that this setting should allow
for one thread per CPU core.
Code Block |
---|
CONFIG proxy.config.cache.threads_per_disk INT 1
|
...
P.S. Since testing this explicitly, Microsoft Bing has done some backend work that has improved HTTP responses.
I currently believe this setting only really matters when TCP retries come into play.
Code Block |
---|
CONFIG proxy.config.cache.mutex_retry_delay INT 25
|
...
The default settings for ATS regarding DNS are set pretty high. I decided for my purposes to lower them,
Your Milage May Vary on these.
Code Block |
---|
CONFIG proxy.config.dns.max_dns_in_flight INT 512
|
...
I've no idea if this setting really helps or not, but I like to specify my preference for IPv6 over IPv4
as much as possible.
Code Block |
---|
CONFIG proxy.config.hostdb.ip_resolve STRING ipv6;ipv4
|
...
The default settings for ATS regarding DNS are set pretty high. I think the following represents a pretty
good balance between caching too much and caching too little in terms of DNS.
Code Block |
---|
CONFIG proxy.config.hostdb.size INT 8K
CONFIG proxy.config.hostdb.storage_size INT 4M
|
...
The default config for ATS leaves these disabled. I believe these to be somewhat useful
for HTTP streaming applications such as Internet Radio and YouTube. However,
setting these too large tends to slow down the cache overall.
Code Block |
---|
CONFIG proxy.config.net.sock_send_buffer_size_in INT 0
CONFIG proxy.config.net.sock_recv_buffer_size_in INT 0
CONFIG proxy.config.net.sock_send_buffer_size_out INT 0
CONFIG proxy.config.net.sock_recv_buffer_size_out INT 128K
|
...
The default config for ATS specifies that this server can handle up to 30,000 connections.
For my purposes, that's a bit excessive. I figure with 2,048 connections there's plenty
of "elbow room". Keep in mind this is a global connection limit, so don't forget about
outbound connections!
Code Block |
---|
CONFIG proxy.config.net.connections_throttle INT 2K
|
...