2

I'm testing harddisk performance, and would like to test writing to the outer tracks of my harddisk with ZFS. One way of doing this would be to create a pool/filesystem with a start point just a few Gigs away from the end of my harddisk.

Is this possible? If so, how do I do it? I've looked in zfs man pages and googled, but couldn't find what I'm looking for.

Furthermore, I'd like to create a RAIDZ1 using only the last part (outer tracks) of my HDDs the same way - for performance testing purposes.

poplitea
  • 457
  • 1
  • 5
  • 16

2 Answers2

5

The term you're referring to is "short-stroking". You can do this by creating a pool of disk slices rather than the whole disks. Use some small percentage of the disk (10%-12%) capacity for the slices.

This may not be worth it, though. Use faster disks and SSDs since ZFS can leverage them well.

ewwhite
  • 197,159
  • 92
  • 443
  • 809
  • Ah, so I create disk slices in the OS first, and then a ZFS using these slices? I thought ZFS pools had to be placed on top of entire disks. – poplitea Oct 08 '11 at 16:55
  • You can use disk slices in your ZFS pool. You just have to use the slice designation in your zpool create command. – ewwhite Oct 08 '11 at 16:58
  • You may actually end up with worse performance if you use slices instead of whole disks, due to the way ZFS handles the [disk write cache](http://www.solarisinternals.com/wiki/index.php/ZFS_Best_Practices_Guide#Storage_Pools) – Tom Shaw Oct 16 '11 at 05:08
2

In addition to slices already rightly suggested by ewwhite, you can also use plain primary partitions a ZFS low level device if you are running on x86 architecture, and even logical ones if on a recent OpenSolaris build, Solaris 11 Express or newer.

jlliagre
  • 8,861
  • 18
  • 36
  • Yes, thank you. Once I understood that zfs accepts block devices other than just entire disks, it opened up a lot more flexibility to me :-) – poplitea Oct 08 '11 at 21:11
  • 1
    ZFS even accepts plain files, although not recommended for anything but testing purposes. – jlliagre Oct 08 '11 at 21:31