File write caching

Top 

 

File write caching considerably improves the performance of the "Log to file" action under heavy message load.

 

When enabled, the "Log to File" action will cache the output data for X seconds or X messages before writing to the log file. The data is cached in memory until the log file is updated in bulk. This is more efficient than writing a single message to a file as it arrives.

 

There is a separate memory cache for each output file. In most cases there is only a single output file, but if AutoSplit or filters are used to split the messages into separate files, there could be additional active output files.

 

When an output file cache is not being used X seconds, the cache is destroyed to save resources.

 

When the program shuts down, all the caches are written to the appropriate files so that no data is lost.

 

 

Enable File write caching

 

Section: HKEY_LOCAL_MACHINE\SOFTWARE\Kiwi Enterprises\Syslogd\Properties

 

Key: FileWriteCacheEnabled

 

Min value:        0

Max value:        1

Default value:        1

Type:                Enabled = 1, Disabled = 0

 

When enabled, the "Log to File" action will cache the output data for X seconds or X messages before writing to the log file. The data is cached in memory and the log file is updated in bulk. This is more efficient than writing a single message to a file as it arrives.

 

 

Cache timeout

 

Section: HKEY_LOCAL_MACHINE\SOFTWARE\Kiwi Enterprises\Syslogd\Properties

 

Key: FileWriteCacheTimeout

 

Min value:        1

Max value:        120

Default value:        5

Type:                Timeout in seconds

 

After the timeout period the contents of the cache are written to disk. The timer is started when the first message arrives in the cache. If the cache is not full and has not been flushed before the timeout period has expired, the cache will be flushed automatically. This value sets the maximum time that the cache will hold a message before writing it to disk. The less frequently the disk is written to, the more efficient the file logging process becomes.

 

 

Maximum number of Cache entries

 

Section: HKEY_LOCAL_MACHINE\SOFTWARE\Kiwi Enterprises\Syslogd\Properties

 

Key: FileWriteCacheEntries

 

Min value:        10

Max value:        100,000

Default value:        1000

Type:                Maximum number of cache entries (messages)

 

Sets the maximum number of messages to be cached for each output file before being written to file.

 

Messages are added to the cache until the maximum is reached or the timeout period elapses.  The less frequently the disk is written to, the more efficient the file logging process becomes. The messages are stored in memory in UNICODE which requires two bytes for each character in the message. For example, a 100 character message requires 200 bytes of memory for storage.

 

 

Cache cleanup time

 

Section: HKEY_LOCAL_MACHINE\SOFTWARE\Kiwi Enterprises\Syslogd\Properties

 

Key: FileWriteCacheCleanup

 

Min value:        10

Max value:        60

Default value:        10

Type:                Time (in minutes) that a cache can inactive before being destroyed

 

When a cache becomes inactive and is not receiving any further messages, the cleanup process will destroy the cache to free up resources. No data is lost because the cleanup process only destroys inactive caches that have already been written to file.