TestCacheRandom - make random client calls on the Vesta-2 cache server
TestCacheRandom [ -threads n ] [ -reqs numReqs ] [ -pks numPKs ] [ -kids ] [ -quiet ]
TestCacheRandom makes random calls on the Vesta-2 cache server VCache(1) named in the user's Vesta configuration file, as described below. It forks n threads, each of which makes a sequence of requests. A request consists of server calls of the following form:
( FreeVariables [ Lookup ] )+ [ AddEntry ]
That is, repeated calls are made to FreeVariables and Lookup until Lookup returns Hit or Miss (if FreeVariables returns an indication that there are no entries in the cache for the specified primary key, the call to Lookup is skipped altogether because it would return Miss as its result). A call is then made to AddEntry if Lookup returned Miss (or if no Lookup call was performed).
TestCacheRandom generates psuedo-random values for the arguments to calls it makes. The arguments to each call are generated independently. Hence, the arguments do not necessarily correspond to arguments that would be supplied by an actual client. In particular, the fingerprints for names supplied to Lookup will not necessarily correspond to the fingerprints for names supplied to the subsequent AddEntry call.
The command-line options are:
- -threads n
- Specifies the number of client threads to run simultaneously. Defaults to one thread.
- -reqs numReqs
- Specifies the number of requests to be made by each thread. If this option is not specified, each thread will make requests indefinitely.
- -pks numPKs
- On each request, a random primary key (PK) is chosen from a universe of values. By default, the random selection is made according to a uniform distribution over 10 different PKs. If -pks numPKs is specified, then the selection is made according to a uniform distribution over numPKs different PKs.
- Causes the program to generate cache entries with non-empty kids arguments. When the list of children is non-empty, the child entries will not have leases in the cache server, so any AddEntry request will fail. By default, TestCacheRandom sends an empty kids list.
- By default, arguments and results of all calls are printed on standard output. If -quiet is specified, this output is surpressed.
Like most Vesta-2 applications, TestCacheRandom reads site-specific configuration information from a Vesta-2 configuration file named vesta.cfg. The program first looks for this file in the current directory; if none is found there, it looks in your home directory.
The configuration file is divided into a number of sections, denoted in the file by [SectionName]. The variables used by TestCacheRandom are in the section denoted by [CacheServer]. Here are the variables and their meanings; the types of the variables are shown in parentheses.
- Host (string)
- The hostname of the machine on which the cache server is running.
- Port (integer)
- The port number on the host named by Host to contact. This allows multiple cache servers to be running on the same machine; each one listens on a different port for connections.
- The random fingerprints are generated from a small set, so the primary keys generated by TestCacheRandom will reside in the same MultiPKFile in the cache. There is no way to control the size of the primary key space.
- TestCacheRandom never checkpoints the cache. You can use the separate ChkptCache(1) or TestCache(1) program to do that while TestCacheRandom is running.
VCache(1), ChkptCache(1), TestCache(1)
This page was generated automatically by mtex software.
Allan Heydon (email@example.com)Last modified on Thu Nov 8 12:40:15 EST 2001 by firstname.lastname@example.org modified on Thu Jul 31 15:54:00 PDT 1997 by heydon