fsync slowness + XFS -- Regd.

Jeno P write2jeno at gmail.com
Mon Mar 18 22:10:29 EDT 2019


Dear folks,

Hoping all are doing good.

*Issue*:- Slowness in fsync()

*System details*:-

OS:- CentOS Linux *7.4*
Linux Kernel:- *3.10.0-514 x86-64*
File system:- *XFS*


One of my module *(C/C++)* is writing to log files and periodically flushes
it using *fsync()*. Even for small amount of data, *fsync* is taking more
time *(>15 seconds)* than expected. Consequently, the main process was
timed-out and got killed. Confirmed the slowness through strace. Observed
the same behavior with *fsync* alternatives - *fdatasync & syncfs *as well
*. *The odd thing is even with very very minimal disk I/O, same issue is
happening. Did anybody face the issue ?


I saw in this forum that performance improvements with respect to *fysnc* has
already been made in file systems *ext2, ext3, brtfs* and *f2fs *in latest
Kernels. I saw a similar improvement in quite old Kernel *(2.6.34)*  for
*XFS*. But, I didn't see any such improvements *(for XFS)* in *newer
Kernels*. Should I need to downgrade my Kernel and observe the issue ? I
fear that downgrading may lead to other performance issues. Is there a
patch being planned in latest Kernel for CentOS ?


Looking forward to hear back from you all.

Thanks,
Jeno
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20190319/0fd7e2b9/attachment.html>


More information about the Kernelnewbies mailing list