-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker build performance extremely slow due to lack of renameat2/overlayfs on ZFS #8648
Comments
I've been working on this and |
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
warning: one merge is not sure Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
I noticed that if I use ZFS as the lower layer of OverlayFS (upper, work, mount point in tmpfs), I cannot append contents to any existing files either. Sorry for my ignorance, but may I know if this problem is also tracked by this ticket or #9414? Thanks. |
@Frederick888 As in |
@cyphar When using $ zfs list | rg '/home'
tank/data/home 50.0G 367G 38.8G /home
$ mkdir ~/lower
$ pwd
/tmp/test
$ df -h .
Filesystem Size Used Avail Use% Mounted on
tmpfs 24G 308M 24G 2% /tmp
$ mkdir upper work merged
$ printf 'hello world\n' | tee ~/lower/test.txt
hello world
$ sudo mount -t overlay overlay -o lowerdir=/home/frederick/lower,upperdir=./upper,workdir=./work,redirect_dir=follow ./merged
$ cat merged/test.txt
hello world
$ printf 'hello world\n' | tee -a merged/test.txt
tee: merged/test.txt: Invalid argument
hello world Similar when I also tested the same thing using ext4 as lower dir and it all worked normally. |
|
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
ZFS doesn't support overlayfs: openzfs/zfs#8648
This should be closed because OverlayFS support has already been merged in #9414, right? |
With zfs-dkms 2.1.9-1 and kernel 6.1.14-1-lts, I still got the error with
|
Overlayfs support is only in the master branch of openzfs at the moment. It should be in 2.2 when it gets released. |
System information
Describe the problem you're observing
This is more of a feature request than a bug. I can't find anyone actively tracking this problem, however I do know users of docker that have stopped using ZFS because of this after having stated there's something wrong with ZFS, which is unfortunate.
When using docker on a zfs dataset, the only option is docker's "zfs driver" which uses zfs dataset operations to create layered filesystems. On other filesystems such as ext4 and btrfs, the "overlay2 driver" (utilizing the kernel's overlayfs module) can be used which is extremely fast. Docker build times can go from a fraction of a second on ext4/overlay2 to several minutes on zfs/zfs.
overlay2 driver selection is currently blacklisted on zfs by docker:
https://github.com/moby/moby/blob/master/daemon/graphdriver/overlay2/overlay.go#L165
Note that btrfs added the necessary support in kernel 4.7:
https://github.com/moby/moby/blob/master/daemon/graphdriver/overlay2/overlay.go#L169
Describe how to reproduce the problem
From a performance perspective:
time the build of a Dockerfile with several layers as so:
From a functional perspective:
Repeat test for RENAME_WHITEOUT flag as well.
I believe we should be able to use docker on ZFS w/overlay2 after both RENAME_EXCHANGE and RENAME_WHITEOUT are implemented in renameat2()
The text was updated successfully, but these errors were encountered: