LOG VDEV not being used

djaoifj92i90

Dabbler
Joined
Oct 5, 2022
Messages
18
First of all: I know my setup has some big disadvantages - this is only an experimental setup.

But I want to know to understand why my LOG VDEV is not being used

Full setup explanation:
HP Microserver 10Plus with 32 GB ECC
I run TrueNAS Scale on a VM in Proxmox
In Proxmox I create a 8TB HDD mirrored ZFS. I added a 32GB system drive on that ZFS for the TrueNAS VMs operating systen disk
Then I added a 7.5TB data disk on that pool as well.

Installed TrueNAS-SCALE-22.12.3.3

Create a ZPOOL of full size on the data disk (7.5TB virtual disk mounted from proxmox)
Created a SMB share on that

Copied some files onto that SMB share.

Then added a 500GB NVMe drive to the server with a USB enclosure.
Created a single disk zfs pool in proxmox

Put a 50G and 400G virtual disk on it, attached it to the TrueNAS VM. Used the 50GB as ZFS Dedup Table Storage and the 400G Drive as LOG VDEV on the already existent pool.

Now I started copiying 850GB worth of files of all kinds of sizes to the SMB share from my Windows 11 PC.
But looking at zpool iostat, the LOG device is not being filled - and as the copy progress is still quite slow I think the LOG VDEV is not being used at all.

Tried rebooting TrueNAS - nothing changed

Why is the LOG VDEV not being used?
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
LOG is only used for synchronous writes. SMB does not use these. Only iSCSI and to some extent NFS do.

LOG is not a write cache.
LOG is not a write cache.
LOG is not a write ca...
 

djaoifj92i90

Dabbler
Joined
Oct 5, 2022
Messages
18
Thanks for the clarification

I was already suspecting something like that.

Do you know a way around this (can SMB be configured to use sync writes? Is NFS a good choice still when most of the clients will be windows machines?)

Can I add a VDEV that is a write cache also for async IO?

Also what I saw is that even if the system was freshly booted and only like 4GB out of the 20 GB RAM the VM has are already used - copying is not fast. Is there a way I can have my files first all written to the RAM while there is still plenty of RAM free and then have the TrueNAS system write the new files in the RAM to the pool? Or is this also only possible with synchronous writes?

PS: You and the rest of the community are awesome. Asked 3 questions today and all were answered were quickly and detailed :) Keep up the good work :)
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Do you know a way around this (can SMB be configured to use sync writes?
Why would you want to do this? It's writing to RAM and the transaction groups are flushed to disk every couple of seconds. NO log device is faster than RAM. All asynchronous writes will go to RAM first.

ZFS and hence TrueNAS does have a write cache. It's in main memory. Need more? Use more RAM.

Please read the ZFS primer before we discuss this any further:


HTH,
Patrick
 

djaoifj92i90

Dabbler
Joined
Oct 5, 2022
Messages
18
Why would you want to do this? It's writing to RAM and the transaction groups are flushed to disk every couple of seconds. NO log device is faster than RAM. All asynchronous writes will go to RAM first.
For the sake of speed solely but yes that 5 second interval makes sense. But I see that the behaviour I was thinking of would not make sense for most of the workloads of the usual ZFS users - data loss would be a problem (so that's one of the reasons for the 5 second interval I guess) as not everyone might install a UPS (and a UPS can of course also fail)

ZFS and hence TrueNAS does have a write cache. It's in main memory. Need more? Use more RAM.

Please read the ZFS primer before we discuss this any further:


HTH,
Patrick
Thanks for the additional resources :)
 
Top