Do I need SLOG?

Fastline

Patron
Joined
Jul 7, 2023
Messages
358
Hello,

So, i've 8x10TB HDD and i wanted to know whether i would need to setup a SLOG device to accelerate the write speeds. I will be using the server for normal Time Machine backup and also some specific video files to it frequently.

Thanks
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
If you have to ask, the answer is "no" :wink:

SLOG only has a use for synchronous writes like NFS or iSCSI for VMFS.
 

Fastline

Patron
Joined
Jul 7, 2023
Messages
358
If you have to ask, the answer is "no" :wink:
Yes, had a confusion ;)

SLOG only has a use for synchronous writes like NFS or iSCSI for VMFS.
So, it is not beneficial for SMB right? Can you please tell me what is syncrhornius writes? I have heard a lot about it.

Should i use synchronous or asynchronous write?

Also, i have heard about compression. Any info that?

The transfer speeds via SMB is so slow on my Mac. But it is fast on a same speced PC on Windows.

Would it be any better to use NFS instead of SMB?
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
So, it is not beneficial for SMB right? Can you please tell me what is syncrhornius writes? I have heard a lot about it.

 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
So, it is not beneficial for SMB right?
Right.

Can you please tell me what is syncrhornius writes? I have heard a lot about it.
It means the client waits with returning the "write done" back to the application until the server has confirmed that data is committed to disk.
Which means it's orders of magnitude slower than asynchronous where the server just commits the data to RAM, acknowledges the write to the client, the client OS says "write OK" to the application and everybody happily moves on. ZFS then commits the data to storage every 5 seconds in what is called a transaction group.

Should i use synchronous or asynchronous write?
With synchronous writes you know your data is safe on disk. That's why hypervisors like VMware use it because the guest operating systems themselves cache data in memory and once they write to what they think is a disk they need to rely on the storage system not lying to them.

So if you want your writes to go at an order of magnitude slower than with asynchronous, go ahead. An SLOG just makes synchronous writes suck less. They are still an order of magnitude slower than asynchronous.

Also, i have heard about compression. Any info that?
ZFS compresses your data on the fly. It's the default. No need to tinker with that.

The transfer speeds via SMB is so slow on my Mac. But it is fast on a same speced PC on Windows.
Would it be any better to use NFS instead of SMB?
NFS sucks even more on the Mac in my experience and various desktop applications like e.g. MS Office might just crash when using files on an NFS volume. Besides if you are thinking about "synchronous writes plus SLOG" ... even with SLOG that will be orders of magnitudes slower than asynchronous.

You don't want synchronous writes unless you are hosting VMs.
 

Fastline

Patron
Joined
Jul 7, 2023
Messages
358
Thanks man. I was going to buy like 2xOptane 905P for that. I got few $$$ saved :)

It means the client waits with returning the "write done" back to the application until the server has confirmed that data is committed to disk.
Which means it's orders of magnitude slower than asynchronous where the server just commits the data to RAM, acknowledges the write to the client, the client OS says "write OK" to the application and everybody happily moves on. ZFS then commits the data to storage every 5 seconds in what is called a transaction group.
Oh, i see. Is this what TrueNAS has by default?

With synchronous writes you know your data is safe on disk.
Does that mean one should use synchronous writes for the highest data reliability/integrity?

That's why hypervisors like VMware use it because the guest operating systems themselves cache data in memory and once they write to what they think is a disk they need to rely on the storage system not lying to them.
Wow. I didn't know. You don't know how much Thankful i am for all these :)

ZFS compresses your data on the fly. It's the default. No need to tinker with that.
Gotcha

NFS sucks even more on the Mac in my experience and various desktop applications like e.g. MS Office might just crash when using files on an NFS volume.
Dang shit.

Besides if you are thinking about "synchronous writes plus SLOG" ... even with SLOG that will be orders of magnitudes slower than asynchronous.
Bummer. So, the synchronous writes are generally slower than asynchronous writes? What's the default settings provided by TrueNAS? How much is the impact between these two in terms of speed?

You don't want synchronous writes unless you are hosting VMs.
Bingo!

Thanks for making it clear dude. Really appreciate that!

BTW, as it will be a Time Machine and rendering output directly to this NAS box, do you think it would be beneficial to use a metadata drive? As Time Machine will have a lot of directories and i wonder if it will make it difficult during the restore time.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Bummer. So, the synchronous writes are generally slower than asynchronous writes? What's the default settings provided by TrueNAS? How much is the impact between these two in terms of speed?
Yes. The default is asynchronous for SMB and synchronous for iSCSI. I don't know from the top of my head for NFS what the default is. If you use it to store VMs for ESXi, it's synchronous.

As for the impact: factor of 10? As I wrote "an order of magnitude".

BTW, as it will be a Time Machine and rendering output directly to this NAS box, do you think it would be beneficial to use a metadata drive? As Time Machine will have a lot of directories and i wonder if it will make it difficult during the restore time.
I found a metadata special vdev beneficial but I am here in a corporate environment with 10 people using the NAS concurrently, all for time machine backups. If this is just for you personally I doubt there will be much of a benefit, but I don't have hard numbers.

You can buy two or three of some "prosumer" SSDs and use these in a mirrored vdev for metadata. No need to go Optane for that. So it's not that big of an investment even if the benefit should be marginal. Make sure to use enough redundancy. Capacity on the other hand is not an issue, so small & reliable > large capacity.
 

Fastline

Patron
Joined
Jul 7, 2023
Messages
358
Yes. The default is asynchronous for SMB and synchronous for iSCSI. I don't know from the top of my head for NFS what the default is. If you use it to store VMs for ESXi, it's synchronous.
Got it!

As for the impact: factor of 10? As I wrote "an order of magnitude".
Got it!

I found a metadata special vdev beneficial but I am here in a corporate environment with 10 people using the NAS concurrently, all for time machine backups. If this is just for you personally I doubt there will be much of a benefit, but I don't have hard numbers.
Hmm. I see. There will be three users in total. Not that much. Do you think it will make any benefit when adding the metadata drive? Currently, testing the newly build NAS box and the directories takes times when searching and sometimes it just takes longer to calculate the number of files (Get Info). So, if it makes any real difference, it would be cool to add it up. Honestly, i had never set it up but when searching for the issue, i got it to know on this forum what it is used for!

You can buy two or three of some "prosumer" SSDs and use these in a mirrored vdev for metadata. No need to go Optane for that. So it's not that big of an investment even if the benefit should be marginal. Make sure to use enough redundancy. Capacity on the other hand is not an issue, so small & reliable > large capacity.
Got it. I'll see if it fits my budget. If it does, I'll really consider buying optane due to the endurance and latency factor. Or Optane will be just overkill for a metadata drive? Unlike SLOG and L2ARC, where Optane is highly recommended, I'm not sure what's the general recommendation for the metadata drives. Also, how do i calculate what capacity would i require for the metadata drive? Regarding the redundancy, would it be really okay to use 2xDrives for the metadata? As I've generally seen 3xDrives normally on the forum. I've currently 8x10TB Drives and it has 10GbE network and i get the full speed. I might consider upgrading it to 10x10TB Drive anytime soon or it could be 10x14TB or 10x16TB.


On a side note, i recently came to know about Snapshot feature (a couple of months ago when some random folder got deleted from my other NAS). I'm still clueless what it was. What happened was i extracted some zip files and deleted them, but seems like something else was in cache and other bunch of directories got deleted. Not sure what were they or it was the same extracted files as I've all the important data. When i setup my first NAS two years ago, i came to know about the Snapshot in the UI but i didn't have much knowledge back then so didn't even consider setting up. I'm just also not sure why the zip file had such issue. Maybe this is an indication that i need to setup metadata drive?

Regarding the Snapshot, is it same how the Time Machine is? Sorry, but i have never used Snapshot feature on TrueNAS. Would it be really beneficial to setup a Snapshot drive? If so, what capacity should i look for? Does it has to be an SSD or HDD can work fine? More importantly, how is the capacity calculated for the Snapshot drive?
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
There is no such thing as a snapshot drive. Snapshots are simply states of the ZFS at a certain point in time that are not deleted but kept until you manually delete them or roll back.

Don't have the time right now to answer everything. You might want to read the ZFS primer. And hopefully someone else will also step in.

Time Machine creates a snapshot for each single successful time machine backup, BTW.
 

Davvo

MVP
Joined
Jul 12, 2022
Messages
3,222

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
I remember MacOS using syncwrites with SMB though.
That might explain the perceived performance :smile:

But then I never felt the need to complain and I have been using a Mac for the last two decades. I'll have to check.
 

Fastline

Patron
Joined
Jul 7, 2023
Messages
358
There is no such thing as a snapshot drive. Snapshots are simply states of the ZFS at a certain point in time that are not deleted but kept until you manually delete them or roll back.
Hmm. Seems like i need more learning on it!

Don't have the time right now to answer everything. You might want to read the ZFS primer. And hopefully someone else will also step in.
Surely. Not in a rush. I'm still testing and exploring the NAS and related features. If you find time, please answer. Really appreciate your participation. Helped me to learn new things today! Kudos

Time Machine creates a snapshot for each single successful time machine backup, BTW.
Yes, I'm aware of it. Been a Mac user since a long time. But what i meant is the Snapshot feature of the ZFS/TrueNAS is same as the Time Machine?

Also, i would like to know if the Snapshot feature makes the following thing possible.
Let's say i have two files X and Y. At a point of time i delete them and let's say after 10 days, i need that file. If i roll back the Snapshot, would i be able to get that file?

Whats the file size of a typical Snapshot?
 

Fastline

Patron
Joined
Jul 7, 2023
Messages
358
I remember MacOS using syncwrites with SMB as default though.
Umm, where i can change this settings? On the Windows side, using the same hardware, same NAS and network, i get like 850-900MB/s and on Mac side, it's like 250-300MB/s max.
 

Fastline

Patron
Joined
Jul 7, 2023
Messages
358
That might explain the perceived performance :smile:

But then I never felt the need to complain and I have been using a Mac for the last two decades. I'll have to check.
Hmm. I think so. I'll testing using older Macs just to check. As when i checked, a lot of people said that changing signing_required=no can fix it. Haven't tested it yet. Will have to backup and then check if that really works. Me using Mac since last 10yrs :)
 
Joined
Oct 22, 2019
Messages
3,641
Thanks man. I was going to buy like 2xOptane 905P for that. I got few $$$ saved :)
Go ahead and purchase these anyways. Then you can deliver them to me for extensive longterm testing. :wink::wink::wink::wink::wink: I'll let you know if they can work a SLOGs. I like to help out my fellow community members.

(You have to pay for shipping costs.) :tongue::tongue::tongue::tongue::tongue::tongue::tongue:


Edited post the include emojis to denote sarcasm.
 
Last edited:

Fastline

Patron
Joined
Jul 7, 2023
Messages
358
Go ahead and purchase these anyways. Then you can deliver them to me for extensive longterm testing. I'll let you know if they can work a SLOGs. I like to help out my fellow community members.
Sounds great :)

Of course, i know they're ideal for SLOG. What my question was whether i would need to setup a SLOG or not for my use case ;)

(You have to pay for shipping costs.)
Not a fair deal. I get you the drives for testing. You keep the drives. I think you can pay the shipping cost ;)
 

dak180

Patron
Joined
Nov 22, 2017
Messages
310
I remember MacOS using syncwrites with SMB as default though.
Not exactly correct; Macs will use it for TimeMachine operations but not most things; TimeMachine performance though has much more to do with the low priory assigned to it. Since most macs are going to be operating over wifi I would suggest an SLOG not for performance centric reasons but data consistency biased ones (faster sync writes is useful when wifi might suddenly cut out for a moment or two).

Thanks man. I was going to buy like 2xOptane 905P for that. I got few $$$ saved :)
2 of these would be more than enough for an SLOG for TimeMachine use: https://www.newegg.com/intel-optane-ssd-p1600x-58gb/p/N82E16820167488 (much less expensive).
 

Fastline

Patron
Joined
Jul 7, 2023
Messages
358
Not exactly correct; Macs will use it for TimeMachine operations but not most things; TimeMachine performance though has much more to do with the low priory assigned to it. Since most macs are going to be operating over wifi I would suggest an SLOG not for performance centric reasons but data consistency biased ones (faster sync writes is useful when wifi might suddenly cut out for a moment or two).
Any idea why the Read and Write speeds are much slower on the Mac side? Its quite fast on the Windows side.

2 of these would be more than enough for an SLOG for TimeMachine use: https://www.newegg.com/intel-optane-ssd-p1600x-58gb/p/N82E16820167488 (much less expensive).
As stated in the post, the NAS will be used mainly for Time Machine backup and the video will be rendered directly to the NAS. It has 8x10TB HDD and 10GbE network. Will SLOG be beneficial for my use case? Will it help me to accelerate the write speeds?
 
Top