public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Brian Foster <bfoster@redhat.com>
To: Andrea del Monaco <andrea.delmonaco@clustervision.com>
Cc: linux-xfs@vger.kernel.org
Subject: Re: XFS and Memory allocation
Date: Tue, 24 Apr 2018 07:27:27 -0400	[thread overview]
Message-ID: <20180424112727.GB49785@bfoster.bfoster> (raw)
In-Reply-To: <CA+1g8segDPZo821caCX73ARLa3Ly9_u6O9iseqoE3b+LntqSLw@mail.gmail.com>

On Tue, Apr 24, 2018 at 09:25:41AM +0200, Andrea del Monaco wrote:
> Hi Brian,
> 
> I've been tunining some kernel parameters here and there. Seems that the
> reclaim_zone set to 1 has had a positive impact - or at least, the
> number of errors reduced drastically.
> 
> Do you now if and when will it be available?
> I am very tempted to get the packages from Fedora repos (Which seems
> to be available there), but you know, it might get messy.
> 

Not really.

> I guess that in order to reduce the extent counts of the files, would
> mean re-create the FS. Wouldn't it?
> 

Not necessarily. You may have to recreate individual files so they are
not as fragmented or sparse (via preallocation, extent size hints,
etc.), but this probably depends on the specifics of your use case,
workload, current fs layout, etc.

For example, if the use case is large virtual disk image files, I
believe it is fairly common for random access via the guest to cause
huge extent counts due to the random/sparse and smallish nature of the
writes. XFS has extent size hints (see the 'extsize' command in 'man
xfs_io') to combat this particular behavior, which creates a minimum
size allocation/alignment (i.e., I think 1MB is a common setting) for
writes that helps prevent the proliferation of tiny extents. IIRC, an
extent size hint can only be set on a file before any extents are
allocated, however. It is thus not a retroactive fix, but doesn't
necessarily require to recreate the entire fs. If you had hundreds or
thousands of such files to deal with, however, then it may very well be
easier to create a new fs and set a recursive hint on the appropriate
directory.

Brian

> Regards,
> --
> 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

      reply	other threads:[~2018-04-24 11:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-23 13:19 XFS and Memory allocation Andrea del Monaco
2018-04-23 14:36 ` Brian Foster
2018-04-23 15:21   ` Andrea del Monaco
2018-04-23 15:34     ` Brian Foster
2018-04-24  7:25       ` Andrea del Monaco
2018-04-24 11:27         ` Brian Foster [this message]

Reply instructions:

You may reply publicly 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=20180424112727.GB49785@bfoster.bfoster \
    --to=bfoster@redhat.com \
    --cc=andrea.delmonaco@clustervision.com \
    --cc=linux-xfs@vger.kernel.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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox