freebsd-src/sys/ufs/ffs
Kirk McKusick 28702816d8 A performance problem was reported in PR kern/181226:
I have 25TB Dell PERC 6 RAID5 array. When it becomes almost
    full (10-20GB free), processes which write data to it start
    eating 100% CPU and write speed drops below 1MB/sec (normally
    to gives 400MB/sec). The revision at which it first became
    apparent was http://svnweb.freebsd.org/changeset/base/249782.

The offending change reserved an area in each cylinder group to
store metadata. The new algorithm attempts to save this area for
metadata and allows its use for non-metadata only after all the
data areas have been exhausted. The size of the reserved area
defaults to half of minfree, so the filesystem reports full before
the data area can completely fill. However, in this report, the
filesystem has had minfree reduced to 1% thus forcing the metadata
area to be used for data. As the filesystem approached full, it
had only metadata areas left to allocate. The result was that
every block allocation had to scan summary data for 30,000 cylinder
groups before falling back to searching up to 30,000 metadata areas.

The fix is to give up on saving the metadata areas once the free
space reserve drops below 2%. The effect of this change is to use
the old algorithm of just accepting the first available block that
we find. Since most filesystems use the default 5% minfree, this
will have no effect on their operation. For those that want to push
to the limit, they will get their crappy block placements quickly.

Submitted by:  Dmitry Sivachenko
Fix Tested by: Dmitry Sivachenko
PR:            kern/181226
MFC after:     2 weeks
2013-08-28 17:38:05 +00:00
..
ffs_alloc.c A performance problem was reported in PR kern/181226: 2013-08-28 17:38:05 +00:00
ffs_balloc.c Make better use of metadata area by avoiding using it for data blocks 2013-07-02 21:07:08 +00:00
ffs_extern.h Add UFS writesuspension mechanism, designed to allow userland processes 2012-11-18 18:57:19 +00:00
ffs_inode.c - Convert the bufobj lock to rwlock. 2013-05-31 00:43:41 +00:00
ffs_rawread.c Do not remap usermode pages into KVA for physio. 2013-03-19 14:43:57 +00:00
ffs_snapshot.c Only copy as much bytes as there in superblock, instead of the full 2013-07-12 18:52:33 +00:00
ffs_softdep.c With the addition of journalled soft updates, the "newblk" structures 2013-08-05 22:02:45 +00:00
ffs_subr.c - Merge soft-updates journaling from projects/suj/head into head. This 2010-04-24 07:05:35 +00:00
ffs_suspend.c There are several code sequences like 2013-07-09 20:49:32 +00:00
ffs_tables.c
ffs_vfsops.c There are several code sequences like 2013-07-09 20:49:32 +00:00
ffs_vnops.c UFS support of the unmapped i/o for the user data buffers. 2013-03-19 15:08:15 +00:00
fs.h The purpose of this change to the FFS layout policy is to reduce the 2013-03-22 21:45:28 +00:00
softdep.h - Speed up pendingblock processing again. Having too much delay between 2011-07-04 22:08:04 +00:00