Hey there fellow TrueNAS users,
Recently, after having a few traditional HDD failures (well... not complete failures, but multiple drives with bad sector counts that are increasing); I've migrated my NAS to using 4x 4TB NVMe drives instead. The NAS specs are as follows:
CPU: 10700K
Mobo: ASRock Z490M-ITX/AC
RAM: 32gb DDR4 3600MT
Storage: 2x Crucial P3 Plus 4tb; 2x Lexar NM790 4tb.
Boot: 2x 120 gb sata SSD's (intel & sandisk)
Network: Mellanox ConnectX-3 (MCX311A-XCAT) 10 GB; using a DAC directly into the switch. Systems on the network are either 2.5GbE or 10 GbE.
Basically, the NAS is mainly used for general data storage (photos; media etc.), along with desktop system backups - nothing too intensive like databases (yet!).
All drives are each running at PCIe 3.0 x 4 lanes (ie. even though they're Gen4 drives, I'll be looking at around 3000-3500 mb/s read/write speeds, per drive). Obviously I won't achieve anywhere near this speed even with simultaneous writes, as I'll be capped by my network interface (around 1Gb/s).
What I did want to confirm however, is if there are any tangible benefits regarding settings for LBA size; Record Size, and ashift.
Currently, I've confirmed that the Crucial P3 Plus 4TB drives support 4096 byte LBA, running: sudo smartctl -c /dev/nvme2n1
Similarly, running: sudo nvme id-ns -H /dev/nvme2n1 | grep 'Relative Performance'
Repeating the above shows that the Lexar NM790 4TB drives appear to only handle LBA sizes of 512 natively? (or 512e, as some call it)
Based on the above, I guess it seems I could change the LBA to 4096 for the P3 Plus drives, but I'm not sure if this will cause some sort of incompatibility issue in the RAIDZ1 configuration with the NM790's running 512 bytes; and also, is the potential speed benefit even worth it? From what I could see online, the results (benchmarks) people ran seemed a bit ambiguous.
So that leads me to the next question regarding "ashift" (or from what I can gather, ZFS's block allocation size). To confirm the existing pool's (NVME-16TB-Z1) ashift value, running: sudo zpool get ashift NVME-16TB-Z1
Based on the above, I can see it's at 12 (corresponding to 2^12, or 4096 bytes). Many posts refer to running ashift=12 as a minimum, but some also run ashift=13 (8192 bytes) for things like Samsung NVMe's. Is this worth changing for an all NVMe setup, or is it literally device specific at this point as to whether there is any performance gain (ie. specific Samsung NVMe's).
Finally, I've read quite a few posts regarding Record Size, with many suggesting if the average data record is a larger file, to run a record size of 512kb to 1M, as opposed to the standard 128kb. I guess this is because as a "home user" I won't be writing a whole heap of small changes to things like a database? Rather, my data will largely be copied in chunks; sit on the server, and be largely read back. Has anyone noticed any performance difference in this like home use (system backups; media files etc).
Would I be better off setting the Record Size for a specific dataset (eg. Media) to 1M, while keeping the record size for alternative data sets (eg. Docker containers; VM's; desktop backups etc.) at something smaller, like the usual 128Kb?
I know it's a fair bit to sift through, but I'm sure there are some power users here who have gone through this, and can give me some pretty straight forward answers.
Hoping to get this sorted, so I can start migrating all my data over to the new drive setup!
Cheers,
Christian
Recently, after having a few traditional HDD failures (well... not complete failures, but multiple drives with bad sector counts that are increasing); I've migrated my NAS to using 4x 4TB NVMe drives instead. The NAS specs are as follows:
CPU: 10700K
Mobo: ASRock Z490M-ITX/AC
RAM: 32gb DDR4 3600MT
Storage: 2x Crucial P3 Plus 4tb; 2x Lexar NM790 4tb.
Boot: 2x 120 gb sata SSD's (intel & sandisk)
Network: Mellanox ConnectX-3 (MCX311A-XCAT) 10 GB; using a DAC directly into the switch. Systems on the network are either 2.5GbE or 10 GbE.
Basically, the NAS is mainly used for general data storage (photos; media etc.), along with desktop system backups - nothing too intensive like databases (yet!).
All drives are each running at PCIe 3.0 x 4 lanes (ie. even though they're Gen4 drives, I'll be looking at around 3000-3500 mb/s read/write speeds, per drive). Obviously I won't achieve anywhere near this speed even with simultaneous writes, as I'll be capped by my network interface (around 1Gb/s).
What I did want to confirm however, is if there are any tangible benefits regarding settings for LBA size; Record Size, and ashift.
Currently, I've confirmed that the Crucial P3 Plus 4TB drives support 4096 byte LBA, running: sudo smartctl -c /dev/nvme2n1
Code:
Supported LBA Sizes (NSID 0x1) Id Fmt Data Metadt Rel_Perf 0 + 512 0 1 1 - 4096 0 0
Similarly, running: sudo nvme id-ns -H /dev/nvme2n1 | grep 'Relative Performance'
Code:
LBA Format 0 : Metadata Size: 0 bytes - Data Size: 512 bytes - Relative Performance: 0x1 Better (in use) LBA Format 1 : Metadata Size: 0 bytes - Data Size: 4096 bytes - Relative Performance: 0 Best
Repeating the above shows that the Lexar NM790 4TB drives appear to only handle LBA sizes of 512 natively? (or 512e, as some call it)
Code:
Supported LBA Sizes (NSID 0x1) Id Fmt Data Metadt Rel_Perf 0 + 512 0 0 LBA Format 0 : Metadata Size: 0 bytes - Data Size: 512 bytes - Relative Performance: 0 Best (in use)
Based on the above, I guess it seems I could change the LBA to 4096 for the P3 Plus drives, but I'm not sure if this will cause some sort of incompatibility issue in the RAIDZ1 configuration with the NM790's running 512 bytes; and also, is the potential speed benefit even worth it? From what I could see online, the results (benchmarks) people ran seemed a bit ambiguous.
So that leads me to the next question regarding "ashift" (or from what I can gather, ZFS's block allocation size). To confirm the existing pool's (NVME-16TB-Z1) ashift value, running: sudo zpool get ashift NVME-16TB-Z1
Code:
NAME PROPERTY VALUE SOURCE NVME-16TB-Z1 ashift 12 local
Based on the above, I can see it's at 12 (corresponding to 2^12, or 4096 bytes). Many posts refer to running ashift=12 as a minimum, but some also run ashift=13 (8192 bytes) for things like Samsung NVMe's. Is this worth changing for an all NVMe setup, or is it literally device specific at this point as to whether there is any performance gain (ie. specific Samsung NVMe's).
Finally, I've read quite a few posts regarding Record Size, with many suggesting if the average data record is a larger file, to run a record size of 512kb to 1M, as opposed to the standard 128kb. I guess this is because as a "home user" I won't be writing a whole heap of small changes to things like a database? Rather, my data will largely be copied in chunks; sit on the server, and be largely read back. Has anyone noticed any performance difference in this like home use (system backups; media files etc).
Would I be better off setting the Record Size for a specific dataset (eg. Media) to 1M, while keeping the record size for alternative data sets (eg. Docker containers; VM's; desktop backups etc.) at something smaller, like the usual 128Kb?
I know it's a fair bit to sift through, but I'm sure there are some power users here who have gone through this, and can give me some pretty straight forward answers.
Hoping to get this sorted, so I can start migrating all my data over to the new drive setup!
Cheers,
Christian