How to obtain cache instrumentation from ZWS

To obtain cache instrumentation from a running instance of ZWS, there is a utility supplied with the product in $ZEUSHOME/webadmin/bin/ named cacheinfo.

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.

$ZEUSHOME/webadmin/bin/cacheinfo localhost

... which would output, for example:

Cache status   localhost:9080
child:
    id: 0
    cachestatus:
        cryptcache: No cache
        statcache:
            lrucache:
                entries: 8180
                hits: 2153572
                buckets: 100001
                lookups: 2161752
                expire: 864000
                numexpired: 0
                frequency: 92008 7806 187 0 0 0 0 0 0 0 0 0 0 0 0
        meminfomapping:
            lrucacheref:
                entries: 0
                hits: 0
                buckets: 100001
                lookups: 0
                numpinned: 0
                frequency: 100001 0 0 0 0 0 0 0 0 0 0 0 0 0 0
        pwhashcache: No cache
        fdinfomapping:
            lrucacheref:
                hits: 753770
                entries: 8178
                buckets: 30001
                lookups: 761948
                numpinned: 0
                frequency: 22422 6999 561 19 0 0 0 0 0 0 0 0 0 0 0
    pid: 1625

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.
  • Buckets
    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.
  • Frequency
    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.

Caches in detail

  • statcache
    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.
  • Meminfomapping
    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.
  • fdinfomapping
    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.

Content Manager [Administrator] 11 January 2006  Permalink  
Leave a comment ...
Your email address will not be displayed.
Your URL will be displayed.
This public messageboard is not a forum for technical support. To report technical support problems, please contact our dedicated Support team using the instructions at the bottom of this page.
Options:
 
(Line breaks become <br />)
(Set cookies for name, email & url)
Download Free Trial

Recent Articles

Other Resources



www.zeus.com