This alert is triggered when the number of sync()
system calls is greater than 6. The sync()
system call writes any data buffered in memory out to disk, including modified superblocks, modified inodes, and delayed reads and writes. A higher number of sync()
calls indicates that the system is often trying to flush buffered data to disk, which can cause performance issues.
Use bpftrace
to identify which processes are causing the sync events. Make sure you have bpftrace
installed on your system; if not, follow the instructions here: Installing bpftrace
Run the syncsnoop.bt
script from the bpftrace
tools:
sudo bpftrace /path/to/syncsnoop.bt
This script will trace sync events and display the process ID (PID), process name, and the stack trace.
Focus on processes with a high number of sync events, and investigate whether you can optimize these processes or reduce their impact on the system.
sync()
calls.Keep an eye on overall I/O performance using tools like iostat
, iotop
, or vmstat
.
For example, you can use iostat
to monitor disk I/O:
iostat -xz 1
This command displays extended disk I/O statistics with a 1-second sampling interval.
Check for high await
values, which indicate the average time taken for I/O requests to be completed. Look for high %util
values, representing the percentage of time the device was busy servicing requests.