14.2.5.2. Memory and disk usage of ZCV

ZCV has a number of options governing the memory and hard disk usage behavior of ZCV. These resources are mainly used to temporarily store the objects while being inspected, decompress archived files, and so on.

Configuring the memory and disk usage in ZCV

Figure 14.31. Configuring the memory and disk usage in ZCV

The following memory usage settings are available:

  • Max. disk usage: It defines the maximum amount of hard disk space that ZCV is allowed to use.

  • Max. memory usage: It sets the maximum amount of memory that ZCV is allowed to use.

  • Low and high water mark: ZCV tries to store everything in the memory if possible. If the memory usage of ZCV reaches high water mark, it starts to swap the data onto the hard disk, until the memory usage decreases to low water mark.

  • Max. non-swapped object size: Objects smaller than this value are never swapped to hard disk.

  • Content-type preview: This parameter determines the amount of data (in bytes) read from MIME objects to detect their MIME-type. Higher value increases the precision of MIME-type detection. Trying to detect the MIME-type of objects is required because there is no guarantee that a MIME object is indeed what it claims to be.

  • Thread limit: This value defines the number of threads ZCV can start. The graphical user interface now sets the ZCV default Thread limit to 100. It is possible though to set a different value for the Thread limit. Set this value according to the anticipated number of stacked connections. If the Thread limit is too low, the Zorp proxies stacking ZCV will experience delays and refused connection attempts. A suggested method to calculate this number, is to monitor the log for "Too many running threads, waiting for one to become free" line and to increase Zorp/ZAS/ZCV Thread limit parameter accordingly.

    Note, that if the Thread limit is already set with the ZCV "--threads=" option in the init script, then that option takes precedence. The value defined in the init script is cleared with each upgrade though, therefore this value can easily be updated at each upgrade to the preferred value, defined in the GUI.