Many seasoned database administrators howl in protest at the mere suggestion of running native auditing functions due to the poor performance and log management headaches that often come with auditing.

Adrian Lane, Contributor

October 8, 2009

2 Min Read

Many seasoned database administrators howl in protest at the mere suggestion of running native auditing functions due to the poor performance and log management headaches that often come with auditing.What's with the stigma? And what kind of performance degradation given that database auditing is supposed to provide an accurate and complete source of information for a broad range of security and compliance requirements? In several series of performance tests I have conducted during the past four years, just turning on the audit decreased transactional throughput by 44 percent for an Oracle audit, 31 percent for IBM DB2, and 37 percent for SQL Server trace. This is not acceptable. And this decrease came just from creating the audit trail and doesn't include moving the data to an external analysis or reporting tool.

But once I tuned the process, the performance decrease was 6 percent for Oracle, 9 percent for DB2, and 4 percent for SQL Server.

How did I do this? By carefully selecting the right options at my disposal. Specifically, consider the following:

  • Different Audit Variants: Database vendors offer more than one way to collect audit data, and each variant has different performance characteristics. For example, DB2 event monitors performed worse than DBAudit, with increasing degradation as transaction rates increased.

  • Filtering: The more event types you want to collect, the more data the database must collect, assemble into an audit record, and then write. But you can direct SQL Server, for example, to only collect certain event types you need, often reducing total events to a fraction. By only collecting the events specific to your business need, you reduce processing overhead and disk I/O.

  • Audit Destinations: You can choose to keep audit data within the database, stored in a table, or write it externally. For example, with Oracle you can write to an internal audit table, write to disk files, and even stream the audit data as XML. Writing to external files is much faster.

  • Data Management and Clean-Up: If you process 1 million transactions, your audit log will contain 1 million or more rows. As the size of the data stored within the audit log grows, overhead increases. Try to purge audit records as fast as you can or move data to external platforms for analysis and reporting. You can write your own scripts to do this or leverage log management, system event management, or database activity monitoring products to assist.

In general, the relational database vendors know their customers rely on auditing to support compliance and security requirements, and they have greatly improved performance during the past four years. If you are smart with your setup, then auditing is no longer the performance nightmare it once was. Don't let a previous bad experience keep you from exploring database auditing as an option.

Adrian Lane is an analyst/CTO with Securosis LLC, an independent security consulting practice. Special to Dark Reading.

About the Author(s)

Adrian Lane

Contributor

Adrian Lane is a Security Strategist and brings over 25 years of industry experience to the Securosis team, much of it at the executive level. Adrian specializes in database security, data security, and secure software development. With experience at Ingres, Oracle, and Unisys, he has extensive experience in the vendor community, but brings a pragmatic perspective to selecting and deploying technologies having worked on "the other side" as CIO in the finance vertical. Prior to joining Securosis, Adrian served as the CTO/VP at companies such as IPLocks, Touchpoint, CPMi and Transactor/Brodia. He has been invited to present at dozens of security conferences, contributed articles to many major publications, and is easily recognizable by his "network hair" and propensity to wear loud colors.

Keep up with the latest cybersecurity threats, newly discovered vulnerabilities, data breach information, and emerging trends. Delivered daily or weekly right to your email inbox.

You May Also Like


More Insights