disk devices speed is ugly

Adrian Chadd adrian at freebsd.org
Mon Feb 13 20:21:13 UTC 2012

I tend to say "the right solution to a problem is to not do it wrong."

But.. given that Linux is fine with all the unaligned accesses, is the
major sticking point here the fact that Linux's block dev layer is
doing all the caching that FreeBSD's direct device layer isn't, and
all of those (cached) accesses are what is improving performance?

So perhaps it'd be worthwhile investing some time in a geom caching
layer to see if that's at all feasible.

I had the same problem with userland cyclic filesystems on FreeBSD
versus Linux - the Linux FS performed better in synthetic tests
because it did caching of the blockdev data. FreeBSD was doing direct
IO. Tuning the direct IO sizes and fixing the filesystem code to do
everything correctly aligned eliminated a lot of the ridiculous
issues. Making Squid cache reads from disk would've improved it too.

Finally - I've seen this same issue under linux, especially when you
stick a filesystem on a RAID device with the stripe/alignment all
wrong. It's not just a BSD problem. :)


More information about the freebsd-stable mailing list