Internally generated by zfs based on "random", merely needs to be unique to ZFS itself. Done by `spa_generate_guid()` in spa_misc.c
Some archs let you "zpool status -g" to show guids as well.
zpool get guid and zpool status -g.
blkid
$ brew install python3
$ pip3 install virtualenv
$ virtualenv -p python3 <desired-path>
$ source <desired-path>/bin/activate
$ deactivate
pool: root_pool
state: ONLINE
scan: none requested
config:
NAME STATE READ WRITE CKSUM
root_pool ONLINE 0 0 0
sda2 ONLINE 0 0 0
errors: No known data errors
pool: PoolB
state: ONLINE
scan: none requested
config:
NAME STATE READ WRITE CKSUM
PoolB ONLINE 0 0 0
sdb ONLINE 0 0 0
errors: No known data errors
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sdb 8:16 0 1T 0 disk
├─sdb9 8:25 0 8M 0 part
└─sdb1 8:17 0 1024G 0 part
zd0 230:0 0 4G 0 disk
sda 8:0 0 1T 0 disk
├─sda2 8:2 0 1024G 0 part
├─sda9 8:9 0 8M 0 part
└─sda1 8:1 0 1007K 0 part
S PID CMD
D 5858 [txg_sync]
D 4356 [txg_sync]
NAME PROPERTY VALUE SOURCE root_pool type filesystem - root_pool creation Wed Nov 28 8:06 2018 - root_pool used 621G - root_pool available 363G - root_pool referenced 96K - root_pool compressratio 3.62x - root_pool mounted no - root_pool quota none defausdais maxed out at %util 100. And it's a single-disk pool, so that doesn't likely meansdais failing, it just means you're asking it to do more than a single disk can do.Tuning isn't going to fix this, you just plain need more IOPS. Your options are 1. add more vdevs to the pool or 2. replacesdawith an SSD.In general, the IOPS profile of a pool is additive of all vdevs. So you have a single vdev (whether it's one disk, or a six-disk stripe) you get one disk's worth of IOPS. You add a second vdev (again, whether single disk, or n-wide stripe) and you get another disk's worth of IOPS. This is a general trend, not a hard-and-fast exact measurement, but it's good enough for calculations.You'll be able to roughly double the performance you're seeing now if you add another vdev to the root pool. Of course, you'll also be roughly doubling the likelihood of a failure than can bring the pool low, since you're rocking single-disk vdevs, and therefore have no parity or redundancy. Whether this is acceptable or not is up to you, but be certain you've thought through the consequences of a catastrophic pool failure.A single decent SSD will give you three orders of magnitude more IOPS than that 10K SAS disk you're using right now. The kicker is going to be the cost per TB of storage. If you're storing a lot of data, you might need to just add more spindles instead. If you do add more vdevs, you're going to need to balance the data you've already got; this ideally would mean backing data up externally, destroying the pool, then copying the data back on board after adding the new vdevs. You canjust add the vdevs, backup the data, then delete the data (and all snapshots containing it) then copy it back on the expanded pool... but it's cleaner to just destroy it.If you switch from single disk vdevs to mirrors, you get more options. Each vdev still only gives you a single disk worth of write IOPS, but it gives you two disks' worth of read IOPS - probably not critical for a log server - and it gives you the ability to rebalance data on-the-fly with a small risk window:
scrub the pool (do not skip this initial step!) detach one disk from each mirror create a new pool with the detached disks, and any new disks you're adding replicate from old pool to new quiesce any write sources replicate from old to new again (will go extremely rapidly; typically <1 min) destroy old pool export new pool, reimport new pool with old pool's name attach remaining disks from destroyed pool to disks in new pool to upgrade from single-disk vdevs to mirror vdevs again de-quiesce data sourceshttps://www.reddit.com/r/zfs/comments/7l64mt/what_zol_performance_optimization_settings_do_you/
sync=disabled will mean that your sync writes are no longer synchronously written to disk; this opens you up to the possibility of data loss on these filesystems if there is a crash. logbias=throughput means the writes would have lower priority in the ZIL.the same comment I made above about the "double writes" when using in-pool ZIL apply,
Even with a 1-disk pool? i mean i get why youd have this in a raidz setup - you can setup the on-pool ZIL as striped (for speed) and/or mirrored (for redundancy) and avoid the I/O penalty associated with parity.
... But on a single disk, it seems like (unless im misunderstanding something) there would be literally 0 benefit by doing this over just prioritizing the sync writes, since writing to a ondisk zil wont register the writes as completed any faster than "just writing them first" but will still require re-writing them.
side question: say i partitioned off another few gb from the optane drives and made a slog for the nvme drive. Assuming a relatively small number of sync write (i,e., non-database workload), would this ever hurt the overall speed/throughput/data integrity of the root pool? (assume that there are few enough sync writes that the optane drives never hit 100% I/O capacity within a given 5 second write window).
Good use of the spare space on the Optane drives as swap (which you hope to tune your system never to use anyways, I assume)
Blame the atomic nature of ZFS for this one. It still needs to order things into transaction groups (txg's) and then commit those as an unit that either succeeds or fails as a whole.
Should work. Optane by design is direct-to-NAND write so you won't have to worry about competing cache flushes,
Should work. Optane by design is direct-to-NAND write so you won't have to worry about competing cache flushes,
sync=disabled but do backups to other media if you value anything there.In above quote, do you mean logbias=throughput will directly write the sync writes to the pool
logbias=latency will be serviced first, in sort of a "pre-emptive" way.Since i dont have fast SSD for ZIL i think the disk-ZIL is use less any way
Is there any way i can determine if the writes are sync or async or ratio of sync/async writes ?
zilstat script is provided with the default Ubuntu ZFS installation, but if not, you can get it from here: