Interview Prep/Linux/User Lifecycle, Auditing & Time Sync

What are the performance risks of auditd and how do you control them?

AdvancedProductionUser Lifecycle, Auditing & Time Sync
Answer

Broad syscall rules (e.g. auditing every execve or open system-wide) on busy servers generate huge volumes and can consume significant CPU. If the backlog fills, the kernel either drops events or, with -f 2, panics. Control it:

  • Scope rules with filters (-F auid>=1000, specific paths, -F exit=-EACCES).
  • Tune -b (backlog) and --backlog_wait_time.
  • Watch auditctl -s for lost and backlog.
  • Ship logs off-host (audisp plugins, Fluent Bit) and rotate (max_log_file, num_logs in auditd.conf).
All Linux questions Roadmap: Linux

More on User Lifecycle, Auditing & Time Sync