The /usr/local/cpanel/bin/splitlogs binary helps in optimizing one’s resources and performance when the Apache logs are created. Apache’s default behaviour is opened and writen to both a byte log file and an access log file for each virtual host in Apache’s configuration file. The cPanel & WHM runs on two instances of the splitlogs binary: to manage the byte log files, and to manage the access log files and extracts the domain name and port from the Apache logs which is used as a space-separated line in the log file.
One can use this syntax in order to call the splitlogs binary from the command line:
If it is set on a low value, the binary will open and close files more often and reduce the performance. If set on a high vale, binary will require more system resources and operating system file handle, increasing the overall system load. One can use the current pattern of access to sites on one’s system for determining the –maxopen value.
It helps in specifying the need to enable buffered file writing. If enabled, binary will write to individual log files faster. In that case, it will require more memory for each open log file. If disabled, binary will require substantially less memory.
When Apache’s configuration file is rebuilt, the system will examine the /var/cpanel/conf/splitlogs.conf file and will use the contents of this file to set command line arguments for CustomLog directives in Apache’s /usr/local/apache/conf/httpd.conf file. The file will contain line-delimited key=value pairs.
If not encountered, it will reduce the –maxopen value, and if encountered, it will increase the –maxopen value. It is recommended to re-evaluate these values while changes in load occurs or the number of domains changes that the system hosts.
All information about split logs binary to tweak performance is outlined in this article.