Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 07 Oct 2019 18:42:39 +0000
From:      bugzilla-noreply@freebsd.org
To:        fs@FreeBSD.org
Subject:   [Bug 241083] zfs: zpool import seems to probe all snapshots
Message-ID:  <bug-241083-3630-Q1DAEsNyqz@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-241083-3630@https.bugs.freebsd.org/bugzilla/>
References:  <bug-241083-3630@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=241083

--- Comment #21 from Martin Birgmeier <d8zNeCFG@aon.at> ---
Here are two sets of results:

[0]# ll /lib/libzfs.so.3*              
-r--r--r--  1 root  wheel  310944 Oct  6 09:10 /lib/libzfs.so.3
-r--r--r--  1 root  wheel  310944 Dec 30  2018 /lib/libzfs.so.3.ORIG
[0]# sysctl vfs.zfs.vol.recursive      
vfs.zfs.vol.recursive: 0
[0]# time zpool import nonexistent_pool
cannot import 'nonexistent_pool': no such pool available
zpool import nonexistent_pool  0.05s user 1.00s system 9% cpu 11.424 total
[1]# time zpool import nonexistent_pool
cannot import 'nonexistent_pool': no such pool available
zpool import nonexistent_pool  0.06s user 0.79s system 77% cpu 1.106 total
[1]# time zpool import nonexistent_pool
cannot import 'nonexistent_pool': no such pool available
zpool import nonexistent_pool  0.02s user 0.79s system 83% cpu 0.972 total
[1]# time zpool import nonexistent_pool
cannot import 'nonexistent_pool': no such pool available
zpool import nonexistent_pool  0.02s user 0.78s system 108% cpu 0.741 total
[1]# sysctl vfs.zfs.vol.recursive=1
vfs.zfs.vol.recursive: 0 -> 1
[0]# time zpool import nonexistent_pool
cannot import 'nonexistent_pool': no such pool available
zpool import nonexistent_pool  0.03s user 0.98s system 135% cpu 0.747 total
[1]# time zpool import nonexistent_pool
cannot import 'nonexistent_pool': no such pool available
zpool import nonexistent_pool  0.02s user 0.95s system 220% cpu 0.440 total
[1]# time zpool import nonexistent_pool
cannot import 'nonexistent_pool': no such pool available
zpool import nonexistent_pool  0.02s user 0.93s system 249% cpu 0.380 total
[1]# time zpool import nonexistent_pool
cannot import 'nonexistent_pool': no such pool available
zpool import nonexistent_pool  0.05s user 0.92s system 249% cpu 0.387 total
[1]# sysctl vfs.zfs.vol.recursive=0    
vfs.zfs.vol.recursive: 1 -> 0
[0]# time zpool import nonexistent_pool
cannot import 'nonexistent_pool': no such pool available
zpool import nonexistent_pool  0.02s user 0.83s system 147% cpu 0.581 total
[1]# time zpool import nonexistent_pool
cannot import 'nonexistent_pool': no such pool available
zpool import nonexistent_pool  0.03s user 0.80s system 240% cpu 0.343 total
[1]# time zpool import nonexistent_pool
cannot import 'nonexistent_pool': no such pool available
zpool import nonexistent_pool  0.02s user 0.79s system 103% cpu 0.785 total
[1]# time zpool import nonexistent_pool
cannot import 'nonexistent_pool': no such pool available
zpool import nonexistent_pool  0.02s user 0.79s system 234% cpu 0.342 total
[1]# 

One more observation: If there is medium to high disk load, such imports take
much longer. For example, doing a 'tar cf /dev/null /z/backup/rsync' (with that
directory holding a lot of stuff) in parallel, I get (the pool will give a read
rate of between 50..200 MB/s, and the machine has 16 GB main memory):

[0]# sysctl vfs.zfs.vol.recursive=0    
vfs.zfs.vol.recursive: 1 -> 0
[0]# time zpool import nonexistent_pool
cannot import 'nonexistent_pool': no such pool available
zpool import nonexistent_pool  0.02s user 0.85s system 12% cpu 6.924 total
[1]# time zpool import nonexistent_pool
cannot import 'nonexistent_pool': no such pool available
zpool import nonexistent_pool  0.02s user 0.81s system 16% cpu 5.110 total
[1]# time zpool import nonexistent_pool
cannot import 'nonexistent_pool': no such pool available
zpool import nonexistent_pool  0.02s user 0.78s system 21% cpu 3.753 total
[1]# time zpool import nonexistent_pool
cannot import 'nonexistent_pool': no such pool available
zpool import nonexistent_pool  0.03s user 0.85s system 11% cpu 7.981 total
[1]# time zpool import nonexistent_pool
cannot import 'nonexistent_pool': no such pool available
zpool import nonexistent_pool  0.02s user 0.81s system 15% cpu 5.366 total
[1]# sysctl vfs.zfs.vol.recursive=1    
vfs.zfs.vol.recursive: 0 -> 1
[0]# time zpool import nonexistent_pool
cannot import 'nonexistent_pool': no such pool available
zpool import nonexistent_pool  0.03s user 0.98s system 9% cpu 10.749 total
[1]# time zpool import nonexistent_pool
cannot import 'nonexistent_pool': no such pool available
zpool import nonexistent_pool  0.03s user 0.97s system 12% cpu 7.945 total
[1]# time zpool import nonexistent_pool
cannot import 'nonexistent_pool': no such pool available
zpool import nonexistent_pool  0.03s user 0.94s system 28% cpu 3.382 total
[1]# time zpool import nonexistent_pool
cannot import 'nonexistent_pool': no such pool available
zpool import nonexistent_pool  0.04s user 0.95s system 8% cpu 11.164 total
[1]# sysctl vfs.zfs.vol.recursive=0    
vfs.zfs.vol.recursive: 1 -> 0
[0]# time zpool import nonexistent_pool
cannot import 'nonexistent_pool': no such pool available
zpool import nonexistent_pool  0.03s user 0.81s system 8% cpu 10.134 total
[1]# time zpool import nonexistent_pool
cannot import 'nonexistent_pool': no such pool available
zpool import nonexistent_pool  0.01s user 0.81s system 11% cpu 7.034 total
[1]# time zpool import nonexistent_pool
cannot import 'nonexistent_pool': no such pool available
zpool import nonexistent_pool  0.03s user 0.80s system 9% cpu 8.948 total
[1]# time zpool import nonexistent_pool
cannot import 'nonexistent_pool': no such pool available
zpool import nonexistent_pool  0.03s user 0.78s system 15% cpu 5.380 total
[1]# diff =(strings /lib/libzfs.so.3.ORIG) =(strings /lib/libzfs.so.3)
870a871
> vfs.zfs.vol.recursive
1230a1232
> ZFS::ZVOL
1586a1589
> sysctlbyname
1989d1991
< sysctlbyname
2125,2126d2126
< fff.
< ffff.
2128,2130d2127
< l$(I
< \$0H
< ffffff.
2131a2129,2132
> ffff.
> fffff.
> fffff.
> s0A9
2987a2989
> Lc5=
[1]# 

-- Martin

-- 
You are receiving this mail because:
You are the assignee for the bug.


Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-241083-3630-Q1DAEsNyqz>