14.2.5.2. Memory and disk usage of CF

CF has a number of options governing the memory and hard disk usage behavior of CF. 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 CF

Figure 14.31. Configuring the memory and disk usage in CF

The following memory usage settings are available:

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

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

  • Low and high water mark: CF tries to store everything in the memory if possible. If the memory usage of CF 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 CF can start. The graphical user interface now sets the CF 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 PNS proxies stacking CF 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 PNS/AS/CF Thread limit parameter accordingly.

    Note, that if the Thread limit is already set with the CF "--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.