Hi Hackers,
I encountered overflow of bgwriter's file-fsync request queue. It occurred
during checkpoints. Each backend would call fsync disorderly in such cases,
so that the checkpoint takes a long time and the performance has decreased.
It seems to happen frequently on the machines with a lot of memories and
poor disks.
I assume that the cause of this problem is that AbsorbFsyncRequests is not
called for a long time during checkpoints. The attached patch is one of
the solutions for it. It eliminates duplicate requests when the queue
is full, with a simple sort and unique technique.
I hope this problem will be solved by some methods.
---
ITAGAKI Takahiro
NTT Cyber Space Laboratories