linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* XFS long delays on disk full
@ 2018-07-18 21:22 Andi Kleen
  2018-07-18 23:25 ` Darrick J. Wong
  0 siblings, 1 reply; 5+ messages in thread
From: Andi Kleen @ 2018-07-18 21:22 UTC (permalink / raw)
  To: linux-xfs, darrick.wong

Hi,

I was doing some testing on a 4.18-rc1 kernel, and a single threaded
test wrote a fairly large file to a XFS file system, causing it to
fill up.

After that the process hung in D state for a long time, and only
recovered after several minutes. Here's the backtrace during
the hang:

[<0>] wb_wait_for_completion+0x5e/0x90
[<0>] sync_inodes_sb+0xc9/0x290
[<0>] xfs_flush_inodes+0x25/0x30 [xfs]
[<0>] xfs_file_buffered_aio_write+0x2be/0x300 [xfs]
[<0>] __vfs_write+0x114/0x1a0
[<0>] vfs_write+0xad/0x1a0
[<0>] ksys_write+0x52/0xc0
[<0>] do_syscall_64+0x5b/0x160
[<0>] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[<0>] 0xffffffffffffffff

There were no IO errors or similar.

Expected? Already fixed?

Thanks,
-Andi


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: XFS long delays on disk full
  2018-07-18 21:22 XFS long delays on disk full Andi Kleen
@ 2018-07-18 23:25 ` Darrick J. Wong
  2018-07-20 17:58   ` Andi Kleen
  0 siblings, 1 reply; 5+ messages in thread
From: Darrick J. Wong @ 2018-07-18 23:25 UTC (permalink / raw)
  To: Andi Kleen; +Cc: linux-xfs

On Wed, Jul 18, 2018 at 02:22:40PM -0700, Andi Kleen wrote:
> Hi,
> 
> I was doing some testing on a 4.18-rc1 kernel, and a single threaded
> test wrote a fairly large file to a XFS file system, causing it to
> fill up.
> 
> After that the process hung in D state for a long time, and only
> recovered after several minutes. Here's the backtrace during
> the hang:
> 
> [<0>] wb_wait_for_completion+0x5e/0x90
> [<0>] sync_inodes_sb+0xc9/0x290

Hmm, these two:

> [<0>] xfs_flush_inodes+0x25/0x30 [xfs]
> [<0>] xfs_file_buffered_aio_write+0x2be/0x300 [xfs]

Offhand I'd guess (while awayish at OSCON) that the fs hit ENOSPC while
trying to write() the file so now we're scanning the fs like mad trying
to free up space preallocations from any open file in the fs.

How big is the fs, how big is the file, how many inodes, how many are
open, which kernel?

--D

> [<0>] __vfs_write+0x114/0x1a0
> [<0>] vfs_write+0xad/0x1a0
> [<0>] ksys_write+0x52/0xc0
> [<0>] do_syscall_64+0x5b/0x160
> [<0>] entry_SYSCALL_64_after_hwframe+0x44/0xa9
> [<0>] 0xffffffffffffffff
> 
> There were no IO errors or similar.
> 
> Expected? Already fixed?
> 
> Thanks,
> -Andi
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: XFS long delays on disk full
  2018-07-18 23:25 ` Darrick J. Wong
@ 2018-07-20 17:58   ` Andi Kleen
  2018-07-24 18:16     ` Darrick J. Wong
  0 siblings, 1 reply; 5+ messages in thread
From: Andi Kleen @ 2018-07-20 17:58 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: Andi Kleen, linux-xfs

On Wed, Jul 18, 2018 at 04:25:33PM -0700, Darrick J. Wong wrote:
> On Wed, Jul 18, 2018 at 02:22:40PM -0700, Andi Kleen wrote:
> > Hi,
> > 
> > I was doing some testing on a 4.18-rc1 kernel, and a single threaded
> > test wrote a fairly large file to a XFS file system, causing it to
> > fill up.
> > 
> > After that the process hung in D state for a long time, and only
> > recovered after several minutes. Here's the backtrace during
> > the hang:
> > 
> > [<0>] wb_wait_for_completion+0x5e/0x90
> > [<0>] sync_inodes_sb+0xc9/0x290
> 
> Hmm, these two:
> 
> > [<0>] xfs_flush_inodes+0x25/0x30 [xfs]
> > [<0>] xfs_file_buffered_aio_write+0x2be/0x300 [xfs]
> 
> Offhand I'd guess (while awayish at OSCON) that the fs hit ENOSPC while
> trying to write() the file so now we're scanning the fs like mad trying
> to free up space preallocations from any open file in the fs.
> 
> How big is the fs, how big is the file, how many inodes, how many are
> open, which kernel?

Kernel 2.18-rc1

/dev/sdb1       233G  211G   23G  91% /data
Filesystem     Inodes IUsed IFree IUse% Mounted on
/dev/sdb1         90M   59K   89M    1% /data

Very few files were open. The file was ~23G as it filled up
the file (I now deleted it)

-Andi


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: XFS long delays on disk full
  2018-07-20 17:58   ` Andi Kleen
@ 2018-07-24 18:16     ` Darrick J. Wong
  2018-07-25 17:00       ` Andi Kleen
  0 siblings, 1 reply; 5+ messages in thread
From: Darrick J. Wong @ 2018-07-24 18:16 UTC (permalink / raw)
  To: Andi Kleen; +Cc: linux-xfs

On Fri, Jul 20, 2018 at 10:58:37AM -0700, Andi Kleen wrote:
> On Wed, Jul 18, 2018 at 04:25:33PM -0700, Darrick J. Wong wrote:
> > On Wed, Jul 18, 2018 at 02:22:40PM -0700, Andi Kleen wrote:
> > > Hi,
> > > 
> > > I was doing some testing on a 4.18-rc1 kernel, and a single threaded
> > > test wrote a fairly large file to a XFS file system, causing it to
> > > fill up.
> > > 
> > > After that the process hung in D state for a long time, and only
> > > recovered after several minutes. Here's the backtrace during
> > > the hang:
> > > 
> > > [<0>] wb_wait_for_completion+0x5e/0x90
> > > [<0>] sync_inodes_sb+0xc9/0x290
> > 
> > Hmm, these two:
> > 
> > > [<0>] xfs_flush_inodes+0x25/0x30 [xfs]
> > > [<0>] xfs_file_buffered_aio_write+0x2be/0x300 [xfs]
> > 
> > Offhand I'd guess (while awayish at OSCON) that the fs hit ENOSPC while
> > trying to write() the file so now we're scanning the fs like mad trying
> > to free up space preallocations from any open file in the fs.
> > 
> > How big is the fs, how big is the file, how many inodes, how many are
> > open, which kernel?
> 
> Kernel 2.18-rc1
> 
> /dev/sdb1       233G  211G   23G  91% /data
> Filesystem     Inodes IUsed IFree IUse% Mounted on
> /dev/sdb1         90M   59K   89M    1% /data
> 
> Very few files were open. The file was ~23G as it filled up
> the file (I now deleted it)

Yep, that looks like xfs scraping around trying to find space when the
fs is nearly full.

--D

> 
> -Andi
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: XFS long delays on disk full
  2018-07-24 18:16     ` Darrick J. Wong
@ 2018-07-25 17:00       ` Andi Kleen
  0 siblings, 0 replies; 5+ messages in thread
From: Andi Kleen @ 2018-07-25 17:00 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: Andi Kleen, linux-xfs

> Yep, that looks like xfs scraping around trying to find space when the
> fs is nearly full.

Okay. Not sure what it is doing. The disk isn't that large after all,
and it's not clear why it takes that long to check a few AGs.

Can something be done about it?

It would be good enough for me if it was interruptible, so that 
Ctrl-C just worked.

-Andi

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-07-25 18:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-18 21:22 XFS long delays on disk full Andi Kleen
2018-07-18 23:25 ` Darrick J. Wong
2018-07-20 17:58   ` Andi Kleen
2018-07-24 18:16     ` Darrick J. Wong
2018-07-25 17:00       ` Andi Kleen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).