Looking for dedicated, slightly masochistic BETA testers!

Status
Not open for further replies.

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
In the real world it isn't very practical to force a server to be quiescent for any length of time; I suppose if you're hosting a big View environment and you're doing it at 3AM or something that'd be a different issue. That's also a Windows thing IIRC, whereas most people prefer to virtualize Linux or FreeBSD instances where possible in order to provide services, as it is cheaper.

As far as a snapshot penalty, there are other penalties involved in running VM's, but no, as long as the snapshot count isn't up in the hundreds, there's no significant snapshot penalty.
 

reqlez

Explorer
Joined
Mar 15, 2014
Messages
84
WOW I feel like we totally hijacked Jordan's thread. Back to the beta testing, I guess ill have to find out a way to see if any data is being lost with this new "multithread" option. I could copy several files at same time and then run a hash check on them I guess...
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
I wouldn't expect data to be lost. Also I would expect that each connection would be a thread or something like that.
 

reqlez

Explorer
Joined
Mar 15, 2014
Messages
84
Okay ... installed 2x 15K RPM drives in ZFS mirror ( using ESXi PCI passthru with an M1015 flashed to LSI IT P16 )

Was monitoring by installing win8.1 and running some updates... did see up to 3000ms latency from the windows task manager but that thing could be lying since i didn't see any latency warnings from ESXi logs, i didn't enable sync=always yet )

So far so good ! Gonna load up iometer and give that iscsi some spanking! So far i only saw the iscsi service jump to 15% CPU usage... so not sure if the multithreading is working yet ... ill try to load it up with iometer and see.

EDIT: yea that windows must be on crack, average of 0.6 milliseconds latency on the iscsi datastore
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
jgreco and I have discussed the whole sync write fiasco to death. I'm sure someone is about to pop in here and start a fight over the iscsi and nfs thing, but I'll say this....

NFS with VMWare sucks solely because of the sync writes. NFS supports them and ZFS will, by design, honor them to the bitter end and at any and all consequences. In fact, you see the consequences when the pool becomes so slow it is useless.

iSCSI with VMWare sucks much much less because it doesn't have sync writes. iSCSI doesn't support them so ZFS' design isn't important.. too much. Except for one scenario.(I'll discuss this one scenario in a second).

Normally every write is a sync write with VMWare ESXi. Some say that is stupid. Other's call it the only safe bet. I think it is the most conservative as well as the only safe bet. There is no mechanism in ESXi that determines what host writes are sync writes and chooses to pass only those through NFS as sync writes. I can bet that there isn't likely to be for the forseeable future unless the guest OS adds that feature and allows VMWare to piggy-back that feature in the OS itself.

Take your standard Windows machine. *some* of your writes are sync writes. Most(damn near 100%) aren't(with some exceptions of course). We've all had that accidental power loss, bumped the power cord, etc and had our desktop turn off. Sometimes we boot back up and keep going. Sometimes we boot back up and stuff is extremely broken. It's pretty obvious in the latter that some write wasn't completed and resulted in file or file system corruption of some magnitude. Anyone remember when Windows 95, 98, and Me all would do a scandisk on bootup if you didn't do a proper shutdown? That was to try and mitigate the harm from that improper shutdown. How many of us had tons of files that ended up in the C:\FOUND.ooo folder? Every single one of us saw that first hand or we didn't use Windows. That's how frequent it happened.

Now considering the previous paragraph, keep this in mind.. do you *really* want to deal with the potential that 10+ VMs may have that kind of corruption, may or may not boot up, and you may have to restore multiple VMs from backup at the cost of data lost since the last backup was performed.

1. Would *you* deliberately disable sync writes?
2. Would *you* want to force all writes to sync writes if you could?
3. Would *you* want to take the most conservative path with your data in terms of protecting it?

Now back to that one scenario I talked about. Normally all NFS writes are sync writes. This is good and is obviously the most conservative. But, all iSCSI writes are non-sync. So you're looking at a situation that is only marginally more dangerous than choosing to unplug your desktop regularly. There are also new variables because it's possible for 10 writes to come into the iSCSI extent but ZFS actually writes them to the pool out of order resulting in some weird wacked out situation that normally wouldn't be possible. I'll ignore this scenario because I can't validate that is even possible since ZFS appears to handle the writes for a given file in order. So I'll assume this isn't possible.

Anyway, we all know that unplugging your computer with it powered on is bad, right? So naturally you want and should be mitigating this risk. For a pool that is strictly for NFS over ESXi sync=standard means the same thing in the big picture as sync=enabled since all writes are sync, right? But for iSCSI sync=standard effectively means the same as sync=disabled in the big picture since there is no such thing as sync writes for iSCSI.

So this is where things get *really* messy. After tons of research I'm convinced that doing NFS with sync=disabled is about the same danger level as using iSCSI with sync=standard or sync=disabled. Also, if you want to use iSCSI with approximately(keyword: approximately) the same level of protection as NFS with its sync writes, then you must set sync=enabled when using iSCSI. The reason for the "approximately" is that iSCSI may internally return the write as complete to the iSCSI initiator *before* issuing the write to ZFS. So there may be a chance that you could lose data even with sync=enabled. Keep in mind that in a properly operating system we are talking fractions of a millisecond, but that is the "write hole" that ZFS is supposed to prevent. But its still not quite the same as using NFS with sync writes. The safest is to use NFS with its sync writes.

There's 2 things to realize about the sync=disabled situation:

1. This will tell the system to never honor sync writes(this is obviously not recommended, but you may want to take that risk). If you have other services that are dependent on that sync write being honored and performed, you may be in for serious trouble.
2. There is no significant possibility of harm to the pool if you recognize that every write to the file system is an atomic write. That is to say that any single write to the file system either hasn't been performed or has been performed and completed. There is no such thing as a "partial" transaction. ZFS will automatically discard any incomplete transaction when the pool is remounted after a "partial" transaction. Obviously if ZFS discards a partial transaction then that data is lost.

So, if so many people are using sync=standard with iSCSI and not having problems, why am I hesitant to turn around and start recommending setting sync=disabled? I just said they are the same thing, right? Well, a few reasons come to mind:

1. I could be wrong. I think this is extremely likely because when I ask ZFS gurus they will basically call you out as a fool if you do that.
2. I could be write(get it?) in that I've properly assessed the situation and come to the conclusion that when comparing 2 exact situations and ignoring all other situations.
3. I could be both right and wrong, but not right and wrong for the right reasons. Think "dumb luck at getting to the right answer". People always say you shouldn't go around your elbow to get to your ass, right? But if you still get to your ass does it really matter how you got there? The destination is what matters, right?
4. I'm a major forum presence. I don't feel I should be ever making recommendations that aren't the most conservative. I shouldn't be making recommendations that I would do(or haven't done) myself. I also don't think I should be making recommendations that haven't been tested extensively by tons of users.

Let me expound on #4 for a minute.

I read almost every post that comes into and out of this forum. Because of this I can easily identify commonalities between problems and users. For example, the ECC RAM recommendation that I've recently introduced to the manual and a few other things I've added to the manual are all the result of finding common problems that have cost people their data. We(being the forums' relative general opinion) was not to really force ECC down people's throats 2 years ago. When I started in this forum in March 2012 ECC RAM was recommended, but there was very little evidence that it really mattered. I even built my best friend's first FreeNAS box with non-ECC RAM. He now runs ECC RAM though. The attitude towards RAM has made a major change. Mostly because I've seen so many people that have ended up being victims of bad non-ECC RAM and I've seen the consequences. rEvery single user has a horrible story to tell that's so hard to believe I sometimes don't believe it. But when dozens of users have the same problems and they all tell the same story I have to assume they are actually telling me the truth and things really are that bad.

When you see the same problem causing data loss regularly you see that there's a gap in either the software, the manual, or the hardware that needs to be addressed. I can't fix hardware problems but I can recommend against some hardware, and I do so without hesitation. I can provide recommendations for the software and I do edit the manual. But, the one thing that I have as a continuous reader of the forums is seeing the patterns of what works and what doesn't. I don't even have to know why something works or doesn't. I can't solidly explain why AMD based systems statistically have more problems than Intel. I have seen tons of evidence of it, and there are definitely exceptions. But if you gave me 100 random Intel based machines and 100 random AMD based machines the statistics say more AMD machines won't work than Intel based machines. I just have to recognize the pattern enough to tell people not to do something. I do like to know why, and I definitely spend significant time trying to understand why so I can determine if I can preemptively identify other scenarios that might have the same problem that we don't know about yet. But if I tell you not to jump off that cliff and you don't jump off the cliff I've saved your life even if neither of us understood gravity enough to realize it would kill you. The saved life is what matters.

My unpaid job here is to keep people from losing data. 99.9% of users that come to FreeNAS want the stability and reliability that ZFS offers. It's not my place to then tell you how to do things that are stupid or even be an experimental guinea pig. If you want to be that stupid, you can. I won't help you do it though.

Anyway, to finish up my hate speech for sync=disabled I am 99% certain that if everyone in this forum set sync=disabled right now most of us would probably never see any consequence of it. But that means that 1% of you reading this might suffer a consequences. I'm not going to take that 1% chance and tell people something that I can't really validate myself.

But, I will tell you that if/when I build my next ESXi box I will probably try doing sync=disabled for my home use(definitely not at work) and experiment with it to figure out how dangerous it really is.

As my last paragraph to my wall of text that wasn't supposed to be this long I want to make it very clear. I do not condone, recommend, endorse or approve of someone setting sync=disabled ever. Even more so in a work environment. I *do* think you are a worthless bottom feeder and that this forum doesn't need you if you really want to do that. If you are doing that, you should be a ZFS ninja. If you were that much of a ninja you wouldn't even be poking around a forum because you are already so pro you have better things to do. If your company can't afford to do ZFS properly you shouldn't be using ZFS. PERIOD.
 

reqlez

Explorer
Joined
Mar 15, 2014
Messages
84
hahahaa... very nice post, cyberjock ... I agree with the whole "keep your data safe", especially if you don't recall i had ECC CORR warnings coming up on one of my boxes a little while ago, and ECC did save my ass ... And trust me, i give me co-workers a ton of shit about making sure that DATA PROTECTION > SAVING MONEY FOR THE CUSTOMER and i'm a firm believer that if you cheap out on mission critical equipment, and then go out and pay 20K for your company to join some stupid golf event, you are a complete utter retard...

You said " iSCSI doesn't support them" but what i'm trying to figure out is THIS:

is NFS=Standard ( or enabled ) the same level of data protection as iSCSI=Enabled

You mentioned that iSCSI doesn't support Sync Writes... so does that mean if I force it thru making a datastore property for sync=enabled that iSCSI support sync writes now ? i'm confused here ... and my original post when i said that there is a "Myth" going around was exactly this ... IS NFS SYNC=STANDARD ( or ENABLE ) the same as iSCSI SYNC=ENABLE
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
is NFS=Standard ( or enabled ) the same level of data protection as iSCSI=Enabled

You mentioned that iSCSI doesn't support Sync Writes... so does that mean if I force it thru making a datastore property for sync=enabled that iSCSI support sync writes now ? i'm confused here ... and my original post when i said that there is a "Myth" going around was exactly this ... IS NFS SYNC=STANDARD ( or ENABLE ) the same as iSCSI SYNC=ENABLE

Oops. I removed that paragraph from my post. I just readded it. Scroll up for the answer. ;)

Yes, I have a writeup on why ZILs may be useful for CIFS.. which is another somewhat true and somewhat false story. But I'll save that for another day.
 
J

jkh

Guest
Wow, quite a lot of verbiage on this topic. Let me see if I can be more succinct. It is possible to set async or sync writes with NFS or iSCSI, and anyone claiming that it's only supported by one or the other hasn't looked. With NFS, it's a mount option. With iSCSI, it's controlled by sync=always. You can even set it at the ZFS dataset layer, such that *every* write to that dataset, regardless of origin, will be flushed immediately to disk with "zfs set sync=always pool/dataset". All of this will, of course, come at a substantial cost in performance. You make the call.

It's also important to be aware, since we're being paranoid here, that even many disks do not properly flush their track caches when explicitly told to do so. Performance increasingly trumps reliability in the world of storage (just look at write leveling in flash sometime) and you have to be willing to accept a certain amount of risk no matter what you do, though doing frequent replication to another physical rig is certainly one way of mitigating that somewhat (which is what I do - I have a pair of FreeNAS boxes).

As always, your mileage may vary with all of the above, and not all data is created equal in terms of how fungible it is, so I tend to shy away from extremely black-and-white statements of fact where all of this is concerned. Use your best judgement, folks!
 

reqlez

Explorer
Joined
Mar 15, 2014
Messages
84
Sorry to be a noob... but i though that setting iSCSI to sync=always was done by setting the ZFS dataset property "sync" to always ... is there another way ? quote "With iSCSI, it's controlled by sync=always. You can even set it at the ZFS dataset layer, such that *every* write will be flushed immediately to disk with "zfs set sync=always pool/dataset""
 

reqlez

Explorer
Joined
Mar 15, 2014
Messages
84
Oops. I removed that paragraph from my post. I just readded it. Scroll up for the answer. ;)

Yes, I have a writeup on why ZILs may be useful for CIFS.. which is another somewhat true and somewhat false story. But I'll save that for another day.

Dude i don't see the modification to your post ... maybe it's too late for me or something ...

Oh regarding the disks and the write cache ... if you want to be safe just disable the write cache on your hard drives... it can be done with free tools like HDAT2 ... at the lab ( i used to do data recovery ) I used PC3000 to do change firmware parameters on drives, but if you do not want to spend $7K just grab HDAT2 and look around the options... there is a write cache somewhere there ...

Talking about data recovery, apparently the guys at SysDev Labs are releasing a new version of UFS Explorer Professional ( version 6 ? ) this year that will support data recovery from ZFS RAIDZ pools
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Wow, quite a lot of verbiage on this topic. Let me see if I can be more succinct. It is possible to set async or sync writes with NFS or iSCSI, and anyone claiming that it's only supported by one or the other hasn't looked. With NFS, it's a mount option. With iSCSI, it's controlled by sync=always. You can even set it at the ZFS dataset layer, such that *every* write to that dataset, regardless of origin, will be flushed immediately to disk with "zfs set sync=always pool/dataset". All of this will, of course, come at a substantial cost in performance. You make the call!

Ah! I didn't know about that iSCSI had that option.. time to do some Googling! But this begs the question "How do you set this in iSCSI?" Is this something you are supposed to set on FreeNAS or on the iscsi initiator? I just scanned through the iSCSI stuff for FreeNAS and I don't see any place to set sync=always.

Sorry to be a noob... but i though that setting iSCSI to sync=always was done by setting the ZFS dataset property "sync" to always ... is there another way ? quote "With iSCSI, it's controlled by sync=always. You can even set it at the ZFS dataset layer, such that *every* write will be flushed immediately to disk with "zfs set sync=always pool/dataset""

No. The ZFS property sync covers the ZFS layer. The iSCSI setting jkh is talking about(if I'm understanding correctly) is for the iSCSI layer.
 

reqlez

Explorer
Joined
Mar 15, 2014
Messages
84
okay running IO meter with some config file i found that has 4 tests, managed to saturate iscsi service, running at 120% WCPU ( 2x3Ghz virtual cores given to freenas ). I guess 120% means that the multithread option is working :P haven't tested with 9000 MTU yet ( will have to hack freenas to get VMXNET3 in there ) ... so does 50% WCPU means 1 core used at max ? or does it mean 25% x 2 ? and 120% ... does that mean its running turbo or something lol
 
J

jkh

Guest
Sorry to be a noob... but i though that setting iSCSI to sync=always was done by setting the ZFS dataset property "sync" to always ... is there another way ? quote "With iSCSI, it's controlled by sync=always. You can even set it at the ZFS dataset layer, such that *every* write will be flushed immediately to disk with "zfs set sync=always pool/dataset""

Sorry, I was conflating the options in my own posting. Yes, sync=always is the zfs dataset option. "Option WriteCache Disable" (which can be set on a per-LUN basis) is the iSCSI (istgt.conf) configuration parameter for this.
 
J

jkh

Guest
So far so good ! Gonna load up iometer and give that iscsi some spanking! So far i only saw the iscsi service jump to 15% CPU usage... so not sure if the multithreading is working yet ... ill try to load it up with iometer and see.
So far, our own tests indicate that the iSCSI experimental multithreading support simply increases latency for no other gain when used with VMWare. We cannot currently recommend enabling it!
 

pbucher

Contributor
Joined
Oct 15, 2012
Messages
180
Wow, quite a lot of verbiage on this topic. Let me see if I can be more succinct. It is possible to set async or sync writes with NFS or iSCSI, and anyone claiming that it's only supported by one or the other hasn't looked. With NFS, it's a mount option. With iSCSI, it's controlled by sync=always. You can even set it at the ZFS dataset layer, such that *every* write to that dataset, regardless of origin, will be flushed immediately to disk with "zfs set sync=always pool/dataset". All of this will, of course, come at a substantial cost in performance. You make the call.

It's also important to be aware, since we're being paranoid here, that even many disks do not properly flush their track caches when explicitly told to do so. Performance increasingly trumps reliability in the world of storage (just look at write leveling in flash sometime) and you have to be willing to accept a certain amount of risk no matter what you do, though doing frequent replication to another physical rig is certainly one way of mitigating that somewhat (which is what I do - I have a pair of FreeNAS boxes).

As always, your mileage may vary with all of the above, and not all data is created equal in terms of how fungible it is, so I tend to shy away from extremely black-and-white statements of fact where all of this is concerned. Use your best judgement, folks!

Well said. I think there has been way too much written about iSCSI/NFS & vmware. I think you might have missed some of that and are just seeing it spill over into this thread for some reason, but ESXi is the reason folks are messing with the FreeNAS side of things since you can't tweak or change ESXi's behavior in regards NFS & iSCSI. I find it laughable that folks will go crazy about some sync settings but completely ignore what might be going on at the physical disk level. No question the industry in it's quest to win benchmarks and such has being moving more and more away from reliability and toward performance. Even some manufacturers "enterprise" line is suspect these days.

Anyways it's really about using your best judgement and deciding how paranoid you want to be, how important your data is, and what your budget is(for each of us it's different).
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
I think a lot of the problem stems from the amount of poorly informed or misinformed bullshit too easily found on the Internet on the topic;

Quite frankly if you want to make a 4GB non-ECC FreeNAS with a pile of USB2 drives all attached to a single powered hub with no redundancyand then bludgeon sync=disabled, that's fine by me as long as you understand the heaps of badness.

There is an unending parade of such choices that flow in and want help. There are also just as many bad choices on the ESXi side of things. Since many of us are here for the benefits of ZFS, that implies certain things about the expectations and values. We tend to err on the "correctness" side of most issues
 

reqlez

Explorer
Joined
Mar 15, 2014
Messages
84
I mean when I buy servers from some big companies, they will enable cache on the controller since it's battery backed up and disable cache on the drives themselves. So in my opinion, if you want to be safe...

1. Enable "Option WriteCache Disable" in istgt.conf and modify parameter sync=always on the dataset that hosts the iscsi extent.

2. Make sure you use ECC RAM ( follow minimum recommendations ) and only use HBA ( IT ) firmware on your controller. Test the RAM before deployment.

3. Since you just enabled sync=always, get 2 SSDs with a supercapacitor for use in a mirrored SLOG... if you boss complains about the price, tell him that you don't want to get fired so you are being safe. Ask him if he wants to get fired ? ( if he is not at the top of the food chain, that is )

4. Figure out how to disable write cache on your hard drives. Disable the write cache on drives.

5. Set up a BACKUP of your pool, maybe a replication task to another pool ? RAID IS NOT A BACKUP. Guess what ? RAIDZ is not a backup either.

6. Make sure you have SCRUB and SMART tasks going on the server.

7. Buy a UPS for you NAS and make sure it shuts down gracefully when the power gets lost. Test the UPS!


8. Get a server with a REDUNDANT Power supply.

9. Test performance on your pools.

10. Enjoy your life because now most likely you are not getting fired from your job.


EDIT: sorry you also might get fired if you build a big infrastructure without performance testing and they your VMs slow down to a crawl... so start small and do performance tasting / modifications. Wait ... 10 rules ? did i just come up with the ZFS 10 commandments ? ( LOL )
 

reqlez

Explorer
Joined
Mar 15, 2014
Messages
84
So far, our own tests indicate that the iSCSI experimental multithreading support simply increases latency for no other gain when used with VMWare. We cannot currently recommend enabling it!

Interesting ... i'm gonna have to test with that disabled because with iometer i was getting 15000 IOPS on 2 15K RPM drive in a mirror ( probably cache making those IOPS that high ) and the latency on the dataset was around 0.5 to 3 milliseconds ...
 

reqlez

Explorer
Joined
Mar 15, 2014
Messages
84
So ... in my tests ( given the margin of error ) All tests with threading enabled AND disabled are exactly the same !!! Does this multithreading only work when you have several LUNs ?
 
Status
Not open for further replies.
Top