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.