I have been trying to run a few performance tests on my recent ZFS setup, but I'm getting strange performance over NFS via ESXi. I don't seem to have any issues from other O/S's (CentOS) when mounting via NFS... so this is curious.
Quick background: I have a 20-disk setup (10k 300gb SAS drives) configured as 10 mirrored vdevs connected via a Supermicro JBOD enclosure that uses built-in SAS expanders. I'm connecting to an LSI 9200-8e running on a 2x E5420 Xeon @ 2.5GHz w/ 16GB ram. OpenIndiana + Napp-It with basically default settings.
bonnie++ results show that the current setup should be able to do at least around 480MB/s writes and 705MB/s reads, so the drives + expanders shouldn't be an issue.
The slowdown appears to be related to synchronization, but I can't quite figure out how to fix it. When I migrate a Virtual Machine to the NFS share via ESXi, I am seeing what I consider fairly slow performance, see below:
I am unable to even come close to maxing out a single GbE link. Compare this to if I do a simple: dd bs=8k count=30000 && sync from the same pool mounted from a linux machine, I get the following results:
At this point, I am limited only by the network speed, which is what I originally expected.
While not recommended, as a test I tried disabling sycn on the pool to see if that would fix anything. It appears to give me better burst speeds, but has it's own performance quirks:
The pool seems to burst write, then lag, then burst write, then lag.
As somewhat of a last-ditch effort, I even tried adding an SSD that I had laying around (256 Crucial M4) as a write cache:
Yes, it's not an awesome SLC SSD, but it should be better than nothing. However, even with the SSD as a write cache, the performance increase seemed very lackluster from ESXi. The measured IOPS via iostat had the same high/low, but it was higher overall with 200MB/80MB high/low's it appears:
However, I think this is misleading, as it's picking up both the write to the log and to the drives when it pushes out to the drives.
Leaving a basic iftop window open, I saw that I averaged 60-80 MB/s. While this is an improvement over the 40-45 MB/s that I saw without the SSD, it's still worse than the 85-110 MB/s I saw with sync=disabled, and I figured with an SSD that boasts over 40k IOPS, that I would be able to at least see better than ~1k IOPS @ 65MB/s with a write cache.
Are there some tweaks I can do to improve performance? Or is this to be expected and I just had unrealistic expectations?
Any thoughts/suggestions?
Quick background: I have a 20-disk setup (10k 300gb SAS drives) configured as 10 mirrored vdevs connected via a Supermicro JBOD enclosure that uses built-in SAS expanders. I'm connecting to an LSI 9200-8e running on a 2x E5420 Xeon @ 2.5GHz w/ 16GB ram. OpenIndiana + Napp-It with basically default settings.
bonnie++ results show that the current setup should be able to do at least around 480MB/s writes and 705MB/s reads, so the drives + expanders shouldn't be an issue.
Code:
NAME SIZE Bonnie Date(y.m.d) File Seq-Wr-Chr %CPU Seq-Write %CPU Seq-Rewr %CPU Seq-Rd-Chr %CPU Seq-Read %CPU Rnd Seeks %CPU Files Seq-Create Rnd-Create
rpool 544G start -
storage 2.71T start 2012.04.04 32G 105 MB/s 98 479 MB/s 94 223 MB/s 53 82 MB/s 96 705 MB/s 67 2651.6/s 7 16 24977/s 13558/s
The slowdown appears to be related to synchronization, but I can't quite figure out how to fix it. When I migrate a Virtual Machine to the NFS share via ESXi, I am seeing what I consider fairly slow performance, see below:
Code:
root@storage:~# zfs set sync=standard storage/test
root@storage:~# zpool iostat 2 | grep storage
capacity operations bandwidth
pool alloc free read write read write
---------- ----- ----- ----- ----- ----- -----
storage 424G 2.30T 10 276 1.13M 27.7M
storage 424G 2.30T 0 746 0 70.5M
storage 424G 2.30T 0 398 0 41.2M
storage 424G 2.30T 0 405 0 41.8M
storage 424G 2.30T 0 491 0 43.5M
storage 424G 2.30T 0 423 0 44.4M
storage 424G 2.30T 0 521 0 40.7M
storage 424G 2.30T 0 412 0 43.1M
storage 424G 2.30T 0 426 0 44.4M
storage 425G 2.30T 0 489 0 43.6M
storage 425G 2.30T 0 355 0 36.8M
storage 425G 2.30T 0 446 0 39.2M
storage 425G 2.30T 0 403 0 41.8M
I am unable to even come close to maxing out a single GbE link. Compare this to if I do a simple: dd bs=8k count=30000 && sync from the same pool mounted from a linux machine, I get the following results:
Code:
root@storage:~# zfs set sync=standard storage/test
root@storage:~# zpool iostat 2 | grep storage
capacity operations bandwidth
pool alloc free read write read write
---------- ----- ----- ----- ----- ----- -----
storage 433G 2.29T 0 495 0 43.9M
storage 433G 2.29T 0 657 0 82.0M
storage 433G 2.29T 0 924 0 92.9M
storage 434G 2.29T 0 988 0 110M
storage 434G 2.29T 0 753 0 94.2M
storage 434G 2.29T 0 816 0 101M
At this point, I am limited only by the network speed, which is what I originally expected.
While not recommended, as a test I tried disabling sycn on the pool to see if that would fix anything. It appears to give me better burst speeds, but has it's own performance quirks:
Code:
root@storage:~# zfs set sync=disabled storage/test
root@storage:~# zpool iostat 2 | grep storage
capacity operations bandwidth
pool alloc free read write read write
---------- ----- ----- ----- ----- ----- -----
storage 419G 2.31T 10 267 1.15M 26.5M
storage 419G 2.31T 0 2.04K 0 250M
storage 419G 2.31T 0 0 0 0
storage 419G 2.31T 0 1.53K 0 192M
storage 420G 2.30T 0 443 0 48.3M
storage 420G 2.30T 0 0 0 0
storage 420G 2.30T 0 2.01K 0 246M
storage 420G 2.30T 0 0 0 0
storage 420G 2.30T 0 1.65K 0 209M
storage 421G 2.30T 0 0 63.9K 0
storage 421G 2.30T 0 1.98K 0 243M
storage 421G 2.30T 0 0 0 0
storage 422G 2.30T 0 1.20K 0 135M
The pool seems to burst write, then lag, then burst write, then lag.
As somewhat of a last-ditch effort, I even tried adding an SSD that I had laying around (256 Crucial M4) as a write cache:
Code:
NAME STATE READ WRITE CKSUM CAP Product
storage ONLINE 0 0 0
logs
cxtxd0 ONLINE 0 0 0 256.06 GB M4-CT256M4SSD2
Yes, it's not an awesome SLC SSD, but it should be better than nothing. However, even with the SSD as a write cache, the performance increase seemed very lackluster from ESXi. The measured IOPS via iostat had the same high/low, but it was higher overall with 200MB/80MB high/low's it appears:
Code:
root@storage:~# zfs set sync=standard storage/test
root@storage:~# zpool iostat 2 | grep storage
capacity operations bandwidth
pool alloc free read write read write
---------- ----- ----- ----- ----- ----- -----
storage 436G 2.29T 0 2.00K 0 182M
storage 436G 2.29T 0 1.21K 0 82.3M
storage 436G 2.29T 0 2.32K 0 216M
storage 436G 2.29T 0 1.24K 0 84.6M
storage 436G 2.29T 0 2.25K 0 229M
storage 437G 2.29T 0 1.42K 0 93.1M
storage 437G 2.29T 0 1.19K 0 81.0M
storage 437G 2.29T 0 2.49K 0 239M
storage 437G 2.29T 0 1.16K 0 79.1M
storage 437G 2.29T 0 2.29K 0 232M
However, I think this is misleading, as it's picking up both the write to the log and to the drives when it pushes out to the drives.
Leaving a basic iftop window open, I saw that I averaged 60-80 MB/s. While this is an improvement over the 40-45 MB/s that I saw without the SSD, it's still worse than the 85-110 MB/s I saw with sync=disabled, and I figured with an SSD that boasts over 40k IOPS, that I would be able to at least see better than ~1k IOPS @ 65MB/s with a write cache.
Are there some tweaks I can do to improve performance? Or is this to be expected and I just had unrealistic expectations?
Any thoughts/suggestions?