The server_audit plugin uses the lock_operations mutex to perform various operations in a mutually exclusive manner:
As far as I can tell, this mutex is locked for every audit event, even when server_audit_logging=OFF is set. We can see that the mutex is locked here:
And the code doesn't check whether logging is enabled until a few lines later:
Is it absolutely necessary to do it this way? It seems as though users would pay a performance penalty to have the audit plugin installed if they have a lot of concurrent connections, even if server_audit_logging=OFF is set.
It looks like the only way to prevent the mutex from being locked for every audit event is to uninstall the plugin with UNINSTALL PLUGIN / UNINSTALL SONAME: