ZIL and L2ARC help with drive spin-down?

Status
Not open for further replies.

Letni

Explorer
Joined
Jan 22, 2012
Messages
63
ZFS experts..

I have a N36L with a 5 disk RAIDZ pool with NAS (CIFS,NFS, and iSCSI target - used as a few Datastores to an ESXi 5.1 machine). Even with the drives set to spin down after 10 minutes of inactivity, I can tell by the drive-spin-down testing as well as the kWH useage on my Kill-A-Watt that the drives do NOT spin down practically ever.. Only if I shut down my VMs (Windows and Linux) do the drive actually do spin down.

My question is would adding ZIL and L2ARC (more than likely both on a single SSD drive) on a FreeNAS 8.3.0 help with drive spin-down? My thinking is that the ZIL and L2ARC would "buffer" reads and writes (especially coming from the iSCSI/ESXi side) which would give more opportunity for the main spinning drives to spin down.

Thank you,

LetnI
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Doubtful. The ZIL in particular is only meant as a temporary storage until the zpool isn't busy. It's basically an oversized write cache.

As for the L2ARC, it would help spindown if everything anyone needed was in the L2ARC(HIGHLY doubtful).

TL;DR - No.
 

Letni

Explorer
Joined
Jan 22, 2012
Messages
63
Is there any other configuration (from the perspective of FreeNAS and ZFS) which could aid in helping to minimize (cache/delay/etc) IO straight to disk?
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Shutdown whatever services are using the zpool. Of course, I know that you've already figured that out. But no there's no options because as a general rule if your drives somehow COULD go to sleep you'd find your iscsi targets crashing when it took 10+ seconds to gain access to what it thinks is a local drive.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,681
The real question is whether or not the VM's in question are architected to be running as VM's. A good VM can be designed from the ground up to avoid unnecessary disk writes, and assuming you did this and did a good job of it, it is _possible_ to get the behaviour in question.

Next best option? Replace that drive bay in your N36L with a 4x2.5" adapter, stick in an M1015 cross-flashed to IT mode, and put some low-wattage SSD's in. Talk about fun :smile:

And now to take issue with this:

As for the L2ARC, it would help spindown if everything anyone needed was in the L2ARC(HIGHLY doubtful).

Uh? Really? No, really, the ideal purpose of L2ARC is to do JUST WHAT YOU SAID. The vast majority of stuff on a computer is accessed rarely or (more likely) never. Once something is read from the disk, ZFS figures it might be read again, so it caches in ARC. When ARC fills, it tries to LRU it out to L2ARC. L2ARC ends up being a cache of all the stuff that's proven to have been read recently. Given a sufficiently large L2ARC, you end up with everything that has been accessed being in L2ARC.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Uh? Really? No, really, the ideal purpose of L2ARC is to do JUST WHAT YOU SAID. The vast majority of stuff on a computer is accessed rarely or (more likely) never. Once something is read from the disk, ZFS figures it might be read again, so it caches in ARC. When ARC fills, it tries to LRU it out to L2ARC. L2ARC ends up being a cache of all the stuff that's proven to have been read recently. Given a sufficiently large L2ARC, you end up with everything that has been accessed being in L2ARC.

The OP has said that he has "several datastores" and at last a Windows and Linux VM. That adds so much complexity that to assume an L2ARC will consistently have all of the information for all of those purposes is insane. Yes, the L2ARC is supposed to cache frequently used data, but Windows alone is horrible at doing random things at random times. Add in the other complexities and you have a giant ball of fail. If you leave the system up for weeks, you might eventually get lucky and get it to spindown. But if you reboot any of the VMs, then you are screwing with the L2ARC.

Sorry, but despite the L2ARCs function and how effectively it works, with the complexity of the setup used I just don't buy that an L2ARC will REALLY be able to handle this particular task. Remember, the purpose of the L2ARC was to improve zpool performance for reads, NOT to allow a zpool to go to sleep and let the L2ARC handle the load.

Besides, it really doesn't matter if L2ARC would work or not. The ZIL just won't do what he wants anyway.

This whole project with trying to support spindown will require ALOT of work to get all the VMs and datasets. It's quite possible that he may never be able to get it to work if he's using something like Couchpotato, Plex, Sickbeard, or SABnzbd that does constant checks of stuff on the drive.

So, back to what I originally said. I said "HIGHLY doubtful". Yes, there is a non-zero probability that it will work. That's why I said "doubtful" and not "impossible". There's a very small chance that with alot of work he could potentially get it all working. But all it takes is for 1 single bit to be read that's not in the L2ARC OR a single bit to be written to the zpool to spinup the zpool again.

Besides, if you are doing constant spin-ups and spin-downs that's alot of wear and tear on the drives.

Anyway, I'm done with this thread. I've said all I need to say, and I think that even attempting to allow spindowns is only an exercise in futility. If you really want to save power you're better off using SSDs or low power drives to save power.
 

Letni

Explorer
Joined
Jan 22, 2012
Messages
63
In the end it is futile as the cost difference (per year) of 5 green drive running full time, vs being put into standby mode constantly will probably equate to about $20. (~ 20 watts total difference). Cannot justify and additional hardware just to help lower cost by so little.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,681
The OP has said that he has "several datastores" and at last a Windows and Linux VM. That adds so much complexity that to assume an L2ARC will consistently have all of the information for all of those purposes is insane.

No, it isn't. The working set size for a Windows or Linux VM isn't necessarily that large. Hell, our door access controller has its own VM, and the entire disk - not just the working set, the ENTIRE DISK - is 14.59GB. It'd be easy to squeeze several of those into a 120GB L2ARC SSD with room to spare.

Sorry, but despite the L2ARCs function and how effectively it works, with the complexity of the setup used I just don't buy that an L2ARC will REALLY be able to handle this particular task. Remember, the purpose of the L2ARC was to improve zpool performance for reads, NOT to allow a zpool to go to sleep and let the L2ARC handle the load.

What's the difference, again? UNIX admins have always advocated adding memory to their main systems to reduce disk IOPS on systems that implement a unified buffer cache (today that's basically all of them). We're talking about doing the same thing for ZFS. What you feel the "purpose" of L2ARC is seems to ignore the reality: at a point where a workload will fit entirely in the L2ARC, it's likely to get cached and served from the L2ARC. That's the side effect of having plentiful cheap large SSD.

Besides, it really doesn't matter if L2ARC would work or not.

Oh?

The ZIL just won't do what he wants anyway.

Well, I agree with that. But remember, his question was

Letni said:
My question is would adding ZIL and L2ARC (more than likely both on a single SSD drive) on a FreeNAS 8.3.0 help with drive spin-down?

and then

Letni said:
Is there any other configuration (from the perspective of FreeNAS and ZFS) which could aid in helping to minimize (cache/delay/etc) IO straight to disk?

to which the answer is basically what I've discussed: L2ARC. A sufficiently large L2ARC can help with reads. If it's big enough to hold the working set, that will mean that ZFS will eventually stop reading most of those bits from disk.
 

Letni

Explorer
Joined
Jan 22, 2012
Messages
63
to which the answer is basically what I've discussed: L2ARC. A sufficiently large L2ARC can help with reads. If it's big enough to hold the working set, that will mean that ZFS will eventually stop reading most of those bits from disk.

I don't think this issue with a VM is purely reads.. I'm more concerned with writes as I believe any basic OS will eventually flush data down to disk even if the OS is performing NO tasks.. Log files/system maintenance/etc.

As stated before.. its not a huge concern here as the cost of the drives spinning constantly equates to pennies a day.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,681
Well, that was one of my early points. A good VM can be designed from the ground up to avoid unnecessary writes. Your FreeNAS system actually leverages similar principles to avoid excessive writes to flash, including things such as avoiding atime updates, syslogging to a remote server rather than local disk, etc. There is nothing inherent in an OS that forces it to have to write to disk for trite things. People have designed entire web service hosts as read-only with NFS access for logs and writable content, after all, so one can also do significant things without writing to the disk.

The question is whether you have a good reason to do the engineering and design required, if it's even possible for the VM's you wish to implement, and if you don't, then you don't.
 
Status
Not open for further replies.
Top