Kernel Newbies archive on lore.kernel.org
 help / color / Atom feed
From: Jeno P <write2jeno@gmail.com>
To: kernelnewbies@kernelnewbies.org
Subject: fsync slowness + XFS -- Regd.
Date: Tue, 19 Mar 2019 07:40:29 +0530
Message-ID: <CAAsGhvRuaBqfmatoYRrjD+Hg8zWrs=PC25gMcfVtu1CiTXpH-A@mail.gmail.com> (raw)

[-- Attachment #1.1: Type: text/plain, Size: 1206 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 1773 bytes --]

<div dir="ltr">Dear folks,<div><br></div><div>Hoping all are doing good.</div><div><br></div><div><b>Issue</b>:- Slowness in fsync()</div><div><br></div><div><b>System details</b>:-</div><div><br></div><div>OS:- CentOS Linux <b>7.4</b><br></div><div>Linux Kernel:- <b>3.10.0-514 x86-64</b><br></div><div>File system:- <b>XFS</b></div><div><br></div><div><br></div><div>One of my module <i>(C/C++)</i> is writing to log files and periodically flushes it using <i>fsync()</i>. Even for small amount of data, <i>fsync</i> is taking more time <i>(&gt;15 seconds)</i> than expected. Consequently, the main process was timed-out and got killed. Confirmed the slowness through strace. Observed the same behavior with <i>fsync</i> alternatives - <i>fdatasync &amp; syncfs </i>as well<i>. </i>The odd thing is even with very very minimal disk I/O, same issue is happening. Did anybody face the issue ? </div><br class="gmail-m_-8681128221808104971gmail-Apple-interchange-newline"><div><br></div><div>I saw in this forum that performance improvements with respect to <i>fysnc</i> has already been made in file systems <i>ext2, ext3, brtfs</i> and <i>f2fs </i>in latest Kernels. I saw a similar improvement in quite old Kernel <i>(2.6.34)</i>  for <i>XFS</i>. But, I didn&#39;t see any such improvements <i>(for XFS)</i> in <b>newer Kernels</b>. 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 ?</div><div><br></div><div><br></div><div>Looking forward to hear back from you all.</div><div><b><br></b></div><div>Thanks,</div><div>Jeno</div><div class="gmail-yj6qo"></div><br class="gmail-Apple-interchange-newline"></div>

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

             reply index

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-19  2:10 Jeno P [this message]
2019-03-19  5:32 ` Valdis Klētnieks
2019-03-19  6:06   ` Alex Painemilla

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAAsGhvRuaBqfmatoYRrjD+Hg8zWrs=PC25gMcfVtu1CiTXpH-A@mail.gmail.com' \
    --to=write2jeno@gmail.com \
    --cc=kernelnewbies@kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Kernel Newbies archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/kernelnewbies/0 kernelnewbies/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 kernelnewbies kernelnewbies/ https://lore.kernel.org/kernelnewbies \
		kernelnewbies@kernelnewbies.org kernelnewbies@archiver.kernel.org
	public-inbox-index kernelnewbies


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernelnewbies.kernelnewbies


AGPL code for this site: git clone https://public-inbox.org/ public-inbox