Storage question
Paul Kraus
paul at kraus-haus.org
Wed Sep 9 15:45:33 UTC 2015
On Sep 9, 2015, at 11:15, William A. Mahaffey III <wam at hiwaay.net> wrote:
> I have heard that filling your zpool is a *BAD* thing,
Filling a zpool is _fatal_. With Copy on Write and no free space you cannot even remove a file.
> but it can be for any FS, just maybe a bit worse for ZFS.
I create a dummy dataset (filesystem) with a reservation of 1 GB and a quota of 1 GB and no mount point and call it “do-not-remove” or “dnr” for short :-) If the zpool is small I make the quota and reservation 512 MB. If I accidentally fill the zpool, I can then _stop_ whatever is filling it, remove and reservation from “dnr” and proceed to remove files.
The other thing to remember is that ZFS (without compression) is _less_ space efficient. The checksums and metadata take up more room than for UFS. ZFS also has a steep performance drop when you hit a certain % in use. And that is NOT a fixed number but varies with workload. For my VM hosts I need to keep the zpool less than 85-90% full or the performance drops so far that the VMs’ I/O start timing out.
> I am going to study that option a bit more. The online docs all seem to show swap within the zpool as well, does that work OK, performance wise ? It would simplify installation, however I am planning to script that, so a bit of 'extra' effort for separate swap partitions is not an issue. I have always thought that separate swap partitions directly kernel managed were the best for swap performance if/when it gets down to that, no ?
Swap on zvol is a bad idea (as you may have already found). The issue, as best I can tell, is that since ZFS grabs all the RAM it can, and SWAP is used in low RAM situations, there are times were SWAP is trying to write to the zvol and ZFS is trying to decrease it’s RAM usage (because of memory pressure) so it’s performance drops. Functionally it becomes a race state that ends badly.
--
Paul Kraus
paul at kraus-haus.org
More information about the freebsd-questions
mailing list