Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Jan 2012 14:52:25 +0100
From:      Alex Samorukov <ml@os2.kiev.ua>
To:        freebsd-stable@freebsd.org
Subject:   disk devices speed is ugly
Message-ID:  <4F215A99.8020003@os2.kiev.ua>

next in thread | raw e-mail | index | archive | help
Hi,

I ported exfat fuse module to FreeBSD (PR 164473) and found that it 
works much slower then on Linux. I found 2 reasons for this:

1) FreeBSD kernel do not allow to have nonalignment access to device 
with standard read/write commands. mmap to the entire disk (/dev/da0s1) 
doesn`t work also (EINVAL).

When its not a big deal for read requests, for write it becomes a real 
issue - to write non-aligned data i need to read beginning and end of 
the block. So in fact for one write request i can get 2 reads.

2) It seems that there is a very simple read caching on such devices 
without write caching at all. It makes write performance enormously 
slow. I found geom_cache module, but it provides only read optimization.


I decided to compare speed on Linux and FreeBSD and below are my 
results. I used old USB flash drive to do the tests.

Read Speed of 100Mb:

Linux 3.0.0:  22.7 Mb/sec
FreeBSD: 10.22 Mb/sec
FreeBSD + gcache: 18.75 Mb/sec (!)

Write speed of 100Mb file:
Linux: 90Mb/sec (cache, much higher then device speed)
FreeBSD: 0.52 Mb/sec (!)
FreeBSD + gcache: 0.52 Mb/sec

As you could see write performance is enormously slow. May be we need to 
create some geom provider for such caching or i am missing something? I 
think, that other fuse modules like ntfs-3g and fuse-ext4 having same 
issue. Also i found that fuse4bsd itself is non stable and may crash the 
system without any visible reasons.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4F215A99.8020003>