[Linux-cluster] GFS2 and fragmentation

Scooter Morris scooter at cgl.ucsf.edu
Wed Aug 8 16:28:31 UTC 2012


Bob,
     Thanks for the information and the pointer, that really helps.

-- scooter

On 08/08/2012 05:50 AM, Bob Peterson wrote:
> ----- Original Message -----
> | Hi All,
> |      We have a RedHat 6.2 cluster with 4 nodes using GFS2 for shared
> | filesystems.  One of the filesystems we need to share is
> | /var/spool/mail.  In general, with recent upgrades and improvements
> | to
> | GFS2, which has been working really, really well.  We're starting to
> | see
> | some significant fragmentation on files in the filesystem, though,
> | even
> | after recreating the filesystem after the RHEL 6 upgrade.  My
> | understanding was that there were fixes in RHEL 6 that made
> | defragmentation un-(or less?) necessary, but we're seeing a
> | disturbing
> | increase in the amount of fragmentation since the upgrade.  By the
> | way,
> | we're seeing numbers in the range of 4,000-6,000 extents/GB for some
> | of
> | these files, which seems a bit large.
> |      So, I've got two questions:
> |
> |      1. At what point should we be worried about the number of
> |      extents?
> |      2. Are there plans for a defragmentation tool?
> |
> |
> | Thanks!
> |
> | -- scooter
> Hi Scooter,
>
> GFS2 has never really managed file fragmentation, so it's not a new problem.
> Simultaneous writes to GFS2 will cause fragmentation.
> There's nothing different in 6.2 regarding file fragmentation from any
> other release of the kernel, so perhaps you can give us more details
> about what you're seeing?
>
> Having said that, Red Hat's GFS2 team HAS been actively developing code in
> the GFS2 kernel code to reduce file fragmentation. Many of these patches
> have already been sent upstream (to the kernel.org kernel), and we have
> working prototypes for 6.4. Here's an upstream link to one of our major
> defrag patches (there are others related to it scheduled for the next
> merge window):
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commitdiff;h=8e2e00473598dd5379d8408cb974dade000acafc
>
> We currently don't have any plans for defrag tool for GFS2. In theory, you
> can always copy the data from an old file system to a new one using this
> new kernel code, and it should be less fragmented.
>
> Regards,
>
> Bob Peterson
> Red Hat File Systems
>
> --
> Linux-cluster mailing list
> Linux-cluster at redhat.com
> https://www.redhat.com/mailman/listinfo/linux-cluster




More information about the Linux-cluster mailing list