UF filesystem performance

Oliver Lehmann lehmann at ans-netz.de
Sat Jan 16 16:58:15 UTC 2010


Hi,

I had to recreate my /usr filesystem so I played around with the -f and
-b switches of newfs.

======>  newfs -U -o time  -f 8192 -b 65536 /dev/ada1s1f
Version  1.96       ------Sequential Output------ --Sequential Input- --Random-
Concurrency   1     -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
nudel.salatschue 6G    96  99 50529  26 24165  17   251  99 57469  16 174.7  10
Latency             88795us     380ms     682ms   63203us   39098us    2737ms
Version  1.96       ------Sequential Create------ --------Random Create--------
nudel.salatschuesse -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
              files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
                 16   962   9 +++++ +++  2310  15   931   8 +++++ +++  2268  15
Latency               248ms      66us   12908us   26791us      57us   32782us


Then I created a RAID-1 with gmirror - the 2nd disk is of the same type
and started bonnie++ again:


Version  1.96       ------Sequential Output------ --Sequential Input- --Random-
Concurrency   1     -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
nudel.salatschue 6G    89  99 59174  31 27738  18   250  99 63858  17 308.5  17
Latency               172ms     200ms    1763ms   44152us     123ms     308ms
Version  1.96       ------Sequential Create------ --------Random Create--------
nudel.salatschuesse -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
              files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
                 16 12276  90 +++++ +++ 12796  96 14750  94 +++++ +++ 10542  97
Latency             18836us      72us     258us   18891us      82us     312us


Then I've read tuning(7) and I thought that maybe newfs with standard -f
and -b would be better because of 

     FreeBSD performs best when using 8K or 16K file system block sizes.  The
     default file system block size is 16K, which provides best performance
     for most applications, [...]                   ...] Using a block size
     larger than 16K can cause fragmentation of the buffer cache and lead to
     lower performance.

Then I recreated the filesystem (still mirrored):


======>  newfs -U -o time  /dev/mirror/gm0s1f
Version  1.96       ------Sequential Output------ --Sequential Input- --Random-
Concurrency   1     -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
nudel.salatschue 6G    96  99 42068  23 21395  18   251  99 43891  12 308.8  13
Latency             86066us     132ms     361ms   54776us     120ms     295ms
Version  1.96       ------Sequential Create------ --------Random Create--------
nudel.salatschuesse -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
              files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
                 16  7817  72 +++++ +++ 30164  99  6111  41 +++++ +++ 29030  96
Latency               562ms      56us      72us     284ms      78us      98us

So... why is it now massivly slower?



-- 
 Oliver Lehmann
  http://www.pofo.de/
  http://wishlist.ans-netz.de/


More information about the freebsd-fs mailing list