Depending on the traffic volume and the variety of traffic to your website, you might need to tweak the settings for the self-pruning cache. Finding an appropriate setting for these two parameters is paramount for optimum performance of your pipeline when you are using extended user agent parsing.
Pruning interval
You can define the interval at which the self-pruning cache is updated to reflect the most
recently detected user agents. The PruningInterval
setting is the number of seconds
between updates. Adjust the setting after extended user agent parsing is in operation.
By changing the PruningInterval
value of
the cache, you are affecting how likely it is that a user agent is
removed from the cache due to inactivity. When this value is large,
a user agent can be in the cache for a long time before it is removed.
When it is small, the user agent must be seen frequently, or it is
more likely to be removed.
Maximum cache size
The MaxCacheSize
setting is the maximum number of entries in the cache. Adjust
the setting after extended user agent parsing is in operation.
For websites with a core set of user agents, the cache performs
well with a relatively small MaxCacheSize setting. Set this value
to 2000
. This value size effectively means that up
to 2000 different user agents are stored for quick lookup.
If you begin to see spooling due to the user agent cache, increasing the
MaxCacheSize
value decreases the likelihood that an incoming user agent string is
not already cached. Increasing this number also use more memory, as more data must be stored.