Performance considerations with auditing
The effect of auditing on system performance depends on a three main factors, as described below.
- Transaction volume
- For typical warehouse scenarios the auditing process may not generate enough audit records to cause any overhead. Note that a SELECT statement that takes five minutes to run will typically have the same number of audit records as one that takes less than a second.
- Speed of the disks
- Disk speed can affect performance. It is important for the data path for active log records to be on fast disks.
- Use of buffering
- The audit buffer size configuration parameter audit_buf_sz configures how large of a buffer is used before records are written to disk. A zero value means that each record must be written to disk before the agent can continue with the query, which can have a negative impact on performace.
The following monitor elements can help tune system performance with regard to auditing:
- audit_events_total
- Returns the total number of audit events generated.
- audit_file_write_wait_time
- Returns the time spent waiting to write an audit record. The value is given in milliseconds.
- audit_subsystem_wait_time
- Returns the time spent waiting for space in the audit buffer. Waiting occurs when the audit buffer is full and the agent must wait for the audit daemon to write the buffer to disk. The value is given in milliseconds.