Bug 198313 - UFS write becomes very slow in some cases
Summary: UFS write becomes very slow in some cases
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 10.1-STABLE
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-fs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-05 13:46 UTC by Dmitry Sivachenko
Modified: 2015-03-07 15:14 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Sivachenko freebsd_committer freebsd_triage 2015-03-05 13:46:56 UTC
Hello,

I have 94TB h/w raid6 volume with UFS filesystem on it:

tunefs: POSIX.1e ACLs: (-a)                                disabled
tunefs: NFSv4 ACLs: (-N)                                   disabled
tunefs: MAC multilabel: (-l)                               disabled
tunefs: soft updates: (-n)                                 enabled
tunefs: soft update journaling: (-j)                       disabled
tunefs: gjournal: (-J)                                     disabled
tunefs: trim: (-t)                                         disabled
tunefs: maximum blocks per file in a cylinder group: (-e)  4096
tunefs: average file size: (-f)                            16384
tunefs: average number of files in a directory: (-s)       64
tunefs: minimum percentage of free space: (-m)             8%
tunefs: space to hold for metadata blocks: (-k)            9136
tunefs: optimization preference: (-o)                      time
tunefs: volume label: (-L)                                 


When it is about 5TB free on it (which does not count 8% of reserved space)
/dev/mfid0p1         94T     82T    5.1T    94%    /opt

all write operations on it become very-very slow (1-2 MB/sec).  The process which writes data consumes 100% of CPU in system state:

{agata}/home/mitya% ps -p 58796 -o systime,usertime
SYSTIME USERTIME
0:59.56  0:00.08

58796 mitya           1 103    0 27808K  4820K CPU11  11   0:53 100.00% bsdtar

As soon as I free some space, the problem disappears until space fills up again.

Since I have the recommended 8% of reserved free space, I expect writes to work well until all free space is exhausted.