To obtain cache instrumentation from a running instance of ZWS, there is a utility supplied with the product in
To see cache usage data, run
$ZEUSHOME/webadmin/bin/cacheinfo <machinename> - where
machinename is one of the hostnames from
$ZEUSHOME/webamdin/conf/hosts, without any associated port number, e.g.
... which would output, for example:
Cache status localhost:9080
cryptcache: No cache
frequency: 92008 7806 187 0 0 0 0 0 0 0 0 0 0 0 0
frequency: 100001 0 0 0 0 0 0 0 0 0 0 0 0 0 0
pwhashcache: No cache
frequency: 22422 6999 561 19 0 0 0 0 0 0 0 0 0 0 0
If the machine is running more than one Zeus child process, then statistics are given for each child.
The cache sections provide data on each of Zeus' internal caches. For best performance, a website would ideally be served entirely from ZWS' cache. In the real world, the overall size of the site or limitations on the available memory will reduce the possibility of this happening. For each cache, the following information is available:
- Hits / lookups
While the caches are filling, during warmup, cache misses are going to occur, so the number of hits will never exactly equal number of lookups. Once the test is past the warmup period, no more misses should occur. This can be checked by reloading the page and watching how the two counts increase.
The size of this cache. Check that this is the same as the value given in
$ZEUSHOME/web/global.cfg. If it isn't, the configuration was probably incorrectly typed in.
Here there is a list of 15 numbers, detailing the layout of information in the cache. The first number shows the number of cache buckets which are empty. The second number shows the number of cache buckets containing one item. The third number counts the buckets containing two items, and so on. An efficient cache should spread its contents out as much as possible, with no entries in the larger buckets since buckets containing many items are slower to search through.
Ideally, this should contain at least as many entries as there are files in the document root. In the example above, it contains 8180 entries.
This cache contains files which have been cached by Zeus using mmap. The given example cache was exclusively using sendfile, as a result its meminfomapping cache was empty.
Here, file descriptors reserved for sendfile are cached, so this cache may be empty if sendfile is not enabled.
For all the above caches, if they are in use, then make sure that they have an adequate size. For best performance, cache misses should not ideally occur after website has warmed up. If a particular cache has buckets containing lots of files, it is worthwhile increasing the cache size to spread the cache contents out further.