Le 15 déc. 08 à 01:13, Ahmed Kamal a écrit : > Hi, > > I have been doing some basic performance tests, and I am getting a > big hit when I run UFS over a zvol, instead of directly using zfs. > Any hints or explanations is very welcome. Here's the scenario. The > machine has 30G RAM, and two IDE disks attached. The disks have 2 > fdisk partitons (c4d0p2, c3d0p2) that are mirrored and form a zpool. > When using filebench with 20G files writing directly on the zfs > filesystem, I get the following results: > > RandomWrite-8k: 0.8M/s > SingleStreamWriteDirect1m: 50M/s > MultiStreamWrite1m: 51M/s > MultiStreamWriteDirect1m: 50M/s > > Pretty consistent and lovely. The 50M/s rate sounds pretty > reasonable, while the random 0.8M/s is a bit too low ? All in all, > things look ok to me though here > > The second step, is to create a 100G zvol, format it with UFS, then > bench that under same conditions. Note that this zvol lives on the > exact same zpool used previously. I get the following: > > RandomWrite-8k: 0.9M/s > SingleStreamWriteDirect1m: 5.8M/s (??) > MultiStreamWrite1m: 33M/s > MultiStreamWriteDirect1m: 11M/s > > Obviously, there's a major hit. Can someone please shed some light > as to why this is happening ? If more info is required, I'd be happy > to test some more ... This is all running on osol 2008.11 release. >
UFS/DIO is not great at allocating files. It does so 1 x 8K page at a time. That might well be the cause of the bad direct I/O results. Multistream write might be the result of sw overhead using the 2 layers. For the randomwrite case, if the writes are not page aligned, then they straddle 2 pages which will be read (before the write). So we wait for a disk I/O before every 8K write. Normal performance here. Aligning the writes on 8K boundary and setting the ZFS recordsize would help a lot here. > Note: I know ZFS autodisables disk-caches when running on partitions > (is that slices, or fdisk partitions?!) Could this be causing what > I'm seeing ? > Nope. ZFS can at time enables disk caches, but will never disables them. If you wanted to run UFS on the same drives (not zvol), be sure to disable the write caches by hand after having destroyed the pool. -r > Thanks for the help > Regards > _______________________________________________ > zfs-discuss mailing list > zfs-discuss@opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss _______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss