Very slow writes on flash + msdosfs

Dmitry Marakasov amdmi3 at amdmi3.ru
Sun Oct 7 11:13:02 PDT 2007


* Bruce Evans (brde at optusnet.com.au) wrote:

> Try 512 bytes/cluster for real slowness.
Yep, I've tried. I had to use 32k clusters to get 8Mb/s.

>> So where is the problem? Why's there no caching and why's there 1 sector
>> writes?
> Old versions of msdosfs don't implement clustering.

>> PS. I use 6.1, has the situation changed in -CURRENT?
> Yes.
>
> However, clustering won't help much for small files, due to BSD's
> fundamental design error of per-vnode buffering.  With 340 files in a
>
> Async mounts would reduce the minimum number of writes per file to
> about 1 (for the data block).  msdosfs doesn't implement them yet.
Hm, true. I just found out that UFS is slow as well. Though it can write
large files at almost 11 MB/s, small files are even slower. Async mount
helps a lot, too bad msdosfs can't do it. So if this problem is
fundamenal, and msdosfs can't work async, isn't there some GEOM class
that does simple memory caching? I don't care what happens to data on
flash if the power goes down in the middle of writing, but I'm just too
jealous of how good Linux forks with the very same flash (I have 4Gb mem
Linux box on my work, and whatever you copy to flash - movies, or tons
of small files, cp finishes in a moment - all data is actually copied to
memory, and than flushed on umount or sync - I guess on the maximum
speed possible).

-- 
Best regards,
  Dmitry Marakasov               mailto:amdmi3 at amdmi3.ru


More information about the freebsd-fs mailing list