Customers may observe a significant number of open() and unlink() operations through the strace command when performing truncate operations on the database. Additionally, most of these system calls may return ENOENT errors ("No such file or directory"). This behavior might lead customers to question why the database exhibits such behavior and whether it would be more efficient to directly delete the files instead of generating numerous "No such file or directory" errors via strace.
strace: Process 26605 attached with 2 threads
[pid 26610] 07:38:16.589647 restart_syscall(<... resuming interrupted read ...> <unfinished ...>
[pid 26605] 07:38:16.595774 unlink("base/16384/xxxxxxx.19") = -1 ENOENT (No such file or directory) <0.000876>
[pid 26605] 07:38:16.606202 unlink("base/16384/xxxxxxx.20") = -1 ENOENT (No such file or directory) <0.000733>
[pid 26605] 07:38:16.607012 unlink("base/16384/xxxxxx.21") = -1 ENOENT (No such file or directory) <0.000923>
[pid 26605] 07:38:16.607997 unlink("base/16384/xxxxxxx.22") = -1 ENOENT (No such file or directory) <0.000821>
[pid 26605] 07:38:16.608887 unlink("base/16384/xxxxxxx.23") = -1 ENOENT (No such file or directory) <0.000562>
[pid 26605] 07:38:16.609509 unlink("base/16384/xxxxxxx.24") = -1 ENOENT (No such file or directory) <0.000580>
[pid 26605] 07:38:16.610145 unlink("base/16384/xxxxxxxx.25") = -1 ENOENT (No such file or directory) <0.000622>
Also, customers might see a lot of audit-related processes taking a lot of CPU
If we observe that numerous audit system calls in the process list are significantly impacting the database performance, we can temporarily disable the audit process to assess whether it improves performance. Here's a refined version:
sudo auditctl -e 0
To disable it permanently :
sudo systemctl disable auditd
sudo systemctl stop auditd