Software logging does require system resources, in particular the actual writing of the log file does consume resources. With multiple application threads attempting to write to the same log file, access must be synchronized such that threads do not interfere with each other, essentially creating a single threaded logging process. PingFederate has been designed to support concurrent threads writing to log files such as the server.log and audit.log. As the PingFederate server processes an increasing number of transactions, contention to the log files also increases thus contributing to degradation of performance since each thread must wait to write to the log file.
One strategy to overcome the degradation in performance is to decrease the amount of logging. We find that this is not very practical for support as the log files are the source of truth with respect to the system, as well as the main source of information for troubleshooting. The best method is to log to a database rather than to the file system (e.g. PingFederate default configuration). Databases are optimized for concurrent access and can more easily support multiple threads/clients writing information concurrently. Logging to a database also has the benefit of implementing a single repository for all PingFederate runtime engines.
PingFederate provides a simple way to solve these problems in your datacenter. The Ping Identity Knowledge Center provides instructions for configuring your environment to log to a database. PingFederate supports MySQL, Oracle, and Microsoft SQL Server for database logging. You will need to perform these steps on each of your PingFederate engine nodes.
Getting back to some of the key questions we encounter with respect to logging.
What strategies are best for the management of log files? Logging to a database is always a good strategy as it centralizes log records and improves performance.
How often to roll the log files? When logging to a database, this comes down to a database retention policy for information.
How long to keep the log files around? For audit log files, it is quite common to keep a minimum of 90 days of audit records and have the maximum defined by the amount of disk capacity. The answer for the maximum number of days for audit log file online retention is defined in the corporate data retention policy, where we have seen 2 to 3 years. For server log files, we have found anywhere between 3 and 10 days to be sufficient for supporting incident reports. Server log files tend to be very large and thus disk space and number of days retention is engineered as well as driven by the incident reporting timelines.
I hope you found this article helpful and utilize the recommendation to leverage a database for logging when additional performance is needed within your PingFederate deployment. If you have comments or questions, please contact us.
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
The _ga cookie, installed by Google Analytics, calculates visitor, session and campaign data and also keeps track of site usage for the site's analytics report. The cookie stores information anonymously and assigns a randomly generated number to recognize unique visitors.
Set by Google to distinguish users.
Installed by Google Analytics, _gid cookie stores information on how visitors use a website, while also creating an analytics report of the website's performance. Some of the data that are collected include the number of visitors, their source, and the pages they visit anonymously.