Overloading the server obj.conf with too many assign-name directives can have an adverse effect on performance. Each assign-name directive involves a regular expression comparison which can prove CPU intensive.
The following tables contains the performance results with varying number of assign-name directives in the server obj.conf.
The first set of data is for a server with cache enabled, and the content server present in the local network. Note that the response time is for a single request.
Number of assign-name directives in obj.conf |
Response time in milliseconds |
10 |
1.05 |
100 |
1.45 |
250 |
1.8 |
1000 |
4.3 |
2000 |
7.35 |
4000 |
13.65 |
6000 |
20.0 |
8000 |
26.15 |
10000 |
32.5 |
As can be seen from the performance numbers, the response times show a marked increase once the number of assign-name directives cross 100.
The following data was obtained with the cache disabled, and the remote server residing in a remote network.
Number of assign-name directives in obj.conf |
Response time in milliseconds |
10 |
238.5 |
100 |
239.7 |
250 |
240.3 |
1000 |
242.2 |
2000 |
245.3 |
4000 |
252.3 |
6000 |
258.2 |
8000 |
264.3 |
10000 |
271.2 |
In the above data, a combination of network delay and the absence of a disk cache tend to hide any performance drop due to the computational delay caused by the high number of assign-name directives.
Recommendations:
Do not let the assign-name directives run into hundreds
Those assign-name directives that match commonly accessed URLs should appear earlier in the obj.conf