This page describes KOTETU 1.5 and later installation over Linux 2.x .
You should do object cache file setup to archive better performance. You can run the program without these procedures, however the performance of that situation will be bad. See end of this document about performance without this setup procedure.
Makefile | configuration file | operation | |
---|---|---|---|
Single-disk |
|
|
|
Multi-disks |
|
|
|
Kotetu accesses many files via filesystem. Kotetu requires specification of directory for WWW cache. Edit configuration file as your site.
In besically, cache capacity is solved OFILE_NBLK_FILE x (OFILE_BLKSIZE + sizeof(skcache_entry_t)) x BucketNumber x RadixH2 . In addition, real filesystem needs more area for superblock, directory and some reason (aligements, fragmentation and others).
When compiling, OFILE_NBLK_FILE, OFILE_BLKSIZE and sizeof(skcache_entry_t) are decided. If you want to change these parameters, you have to compile the program. OFILE_NBLK_FILE and OFILE_BLKSIZE is described in Makefile. skecache_entry_t is defined in xsk.h . range.h will helps your tunning.
BucketNumber and RadixH2 are specified by configuration file. If you change these parameters, you have to run 'cppack' (it is shown below).
Example:
OFILE_NBLK_FILE | OFILE_BLKSIZE | *entrysize | BucketNumber | RadixH2 | total |
1027 | 12K (12288B) | 208 | 509 | 3 | 18.25G |
1027 | 12K (12288B) | 2128 | 509 | 3 | 21.05G |
1027 | 12K (12288B) | 2128 | 223 | 7 | 21.52G |
1027 | 12K (12288B) | 2128 | 509 | 11 | 77.20G |
Since Kotetu 1.2 handles several thousands files, file overhead (creation and seeking) is occured. In addtionaly, its random access makes block holed file. By disk initialization before running, the overhead can improved.
Kotetu use 2 file. First, INDEX consists control blocks for cache object. In default, it is 2128 bytes per object (which means sizeof(skcache_entry_t)). Second, BODY consists data blocks for cache object. In default, it is 12288 bytes (which is defined xsk.h or Makefile). mkpack make INDEX and BODY with specified parameters.
However, 2128 is long. You should change length as tunning.
copy INDEX and BODY to all directories over filesystems. 'kotetu.conf' means configuration filename.
If '-n' option is setted, this program does not make directroy and files, only print what do.
Since a mix of disk access for WWW caching and others causes latency, Kotetu recommends using disk(s) which is separated from other I/Os (but it is not required). Add yet another disk contoller for WWW caching, if possible.
Performance of Kotetu depends disk I/O. Especially, most filesystems are very slow than the bare speed of disks. You should use multipul disks to archive better performance. In addition, multipul partitions over single disk will cause interesting effects. You have to set 'CacheDir' in configuration file as using multipul prefix. For example, if you want to use 2 partitions, you have to name them as '/cache0' and '/cache1', and edit configuration file as following line:
The letter '@' means using multiple prefix. '2' means two partitions.
If your disk controller has logical disk feature, your system will brings more performance by that. In this case, you shoulde configure according to above example, also.
To archive better performance, you shoulde use a faster filesystem and tune them. Of couse, filesystem initialization (newfs) is recommended before run the program, because the fragmentation of file system cause overhead.
We use ReiserFS for cache areas with options-"noatime,nolog,notail" .