Skip to content
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

zpool import is very slow #4550

Closed
zp841126 opened this issue Apr 22, 2016 · 5 comments
Closed

zpool import is very slow #4550

zp841126 opened this issue Apr 22, 2016 · 5 comments
Milestone

Comments

@zp841126
Copy link

ZFS version: 0.6.5.5-1~trusty

I have 6TB zfs pool and created a zvol. zpool import -d spend about 10 minutes. Is there any way to speed this process?

crash> bt 11235
PID: 11235 TASK: ffff8820ba958000 CPU: 0 COMMAND: "zpool"
#0 [ffff882056a77a00] __schedule at ffffffff817fe546
#1 [ffff882056a77a68] schedule at ffffffff817fea29
#2 [ffff882056a77a78] cv_wait_common at ffffffffa035ca55 [spl]
#3 [ffff882056a77ad8] __cv_wait at ffffffffa035caa5 [spl]
#4 [ffff882056a77ae8] txg_wait_synced at ffffffffa046b6ef [zfs]
#5 [ffff882056a77b28] zil_replay at ffffffffa04b140a [zfs]
#6 [ffff882056a77b78] __zvol_create_minor at ffffffffa04c0609 [zfs]
#7 [ffff882056a77bc0] zvol_create_minor at ffffffffa04c1d33 [zfs]
#8 [ffff882056a77bd8] zvol_create_minors_cb at ffffffffa04c1d7e [zfs]
#9 [ffff882056a77be8] dmu_objset_find_impl at ffffffffa041de6a [zfs]
#10 [ffff882056a77ca0] dmu_objset_find_impl at ffffffffa041df33 [zfs]
#11 [ffff882056a77d58] dmu_objset_find at ffffffffa041e1c9 [zfs]
#12 [ffff882056a77d90] zvol_create_minors at ffffffffa04c1f1f [zfs]
#13 [ffff882056a77da0] spa_import at ffffffffa045f7ab [zfs]
#14 [ffff882056a77e30] zfs_ioc_pool_import at ffffffffa0490c94 [zfs]
#15 [ffff882056a77e70] zfsdev_ioctl at ffffffffa0493ffd [zfs]
#16 [ffff882056a77ed0] do_vfs_ioctl at ffffffff811e2040
#17 [ffff882056a77f40] sys_ioctl at ffffffff811e22a1
#18 [ffff882056a77f80] system_call_fastpath at ffffffff81802a8d

RIP: 00007f88be5c9337  RSP: 00007ffd0f665208  RFLAGS: 00010202
RAX: 0000000000000010  RBX: ffffffff81802a8d  RCX: 0000000001960000
RDX: 00007ffd0f665ae0  RSI: 0000000000005a02  RDI: 0000000000000005
RBP: 000000000195b090   R8: 00000000019647b0   R9: 00007f88be8967b8
R10: 00007ffd0f665030  R11: 0000000000000246  R12: 0000000000000000
R13: 0000000000000000  R14: 000000000195c230  R15: 0000000000000000
ORIG_RAX: 0000000000000010  CS: 0033  SS: 002b

crash> bt 19831
PID: 19831 TASK: ffff8820535f32a0 CPU: 1 COMMAND: "txg_sync"
#0 [ffff881b26823b68] __schedule at ffffffff817fe546
#1 [ffff881b26823bd0] io_schedule at ffffffff817fed3d
#2 [ffff881b26823be8] cv_wait_common at ffffffffa035ca11 [spl]
#3 [ffff881b26823c48] __cv_wait_io at ffffffffa035cae8 [spl]
#4 [ffff881b26823c58] zio_wait at ffffffffa04b5cf3 [zfs]
#5 [ffff881b26823c98] dsl_pool_sync at ffffffffa043f8e1 [zfs]
#6 [ffff881b26823d08] spa_sync at ffffffffa045a485 [zfs]
#7 [ffff881b26823dc0] txg_sync_thread at ffffffffa046c809 [zfs]
#8 [ffff881b26823ea0] thread_generic_wrapper at ffffffffa0357e0a [spl]
#9 [ffff881b26823ed0] kthread at ffffffff81091022
#10 [ffff881b26823f50] ret_from_fork at ffffffff818029d8

@odoucet
Copy link

odoucet commented Apr 22, 2016

Hello,

First upgrade to 0.6.5.6, where zpool import was greatly improved when you
have a large number of zvol (or do you have only one ?).
Also check number of snapshots, and ensure you have property snapdev=hidden

Olivier

2016-04-22 13:34 GMT+02:00 zhaozhen1 [email protected]:

ZFS version: 0.6.5.5-1~trusty

I have 6TB zfs pool and created a zvol. zpool import -d spend about 10
minutes. Is there any way to speed this process?

crash> bt 11235
PID: 11235 TASK: ffff8820ba958000 CPU: 0 COMMAND: "zpool"
#0 [ffff882056a77a00] __schedule at ffffffff817fe546
#1 #1 [ffff882056a77a68]
schedule at ffffffff817fea29
#2 #2 [ffff882056a77a78]
cv_wait_common at ffffffffa035ca55 [spl]
#3 #3 [ffff882056a77ad8]
__cv_wait at ffffffffa035caa5 [spl]
#4 #4 [ffff882056a77ae8]
txg_wait_synced at ffffffffa046b6ef [zfs]
#5 #5 [ffff882056a77b28]
zil_replay at ffffffffa04b140a [zfs]
#6 #6 [ffff882056a77b78]
__zvol_create_minor at ffffffffa04c0609 [zfs]
#7 #7 [ffff882056a77bc0]
zvol_create_minor at ffffffffa04c1d33 [zfs]
#8 #8 [ffff882056a77bd8]
zvol_create_minors_cb at ffffffffa04c1d7e [zfs]
#9 #9 [ffff882056a77be8]
dmu_objset_find_impl at ffffffffa041de6a [zfs]
#10 #10 [ffff882056a77ca0]
dmu_objset_find_impl at ffffffffa041df33 [zfs]
#11 #11 [ffff882056a77d58]
dmu_objset_find at ffffffffa041e1c9 [zfs]
#12 #12 [ffff882056a77d90]
zvol_create_minors at ffffffffa04c1f1f [zfs]
#13 #13 [ffff882056a77da0]
spa_import at ffffffffa045f7ab [zfs]
#14 #14 [ffff882056a77e30]
zfs_ioc_pool_import at ffffffffa0490c94 [zfs]
#15 #15 [ffff882056a77e70]
zfsdev_ioctl at ffffffffa0493ffd [zfs]
#16 #16 [ffff882056a77ed0]
do_vfs_ioctl at ffffffff811e2040
#17 #17 [ffff882056a77f40]
sys_ioctl at ffffffff811e22a1
#18 #18 [ffff882056a77f80]
system_call_fastpath at ffffffff81802a8d
RIP: 00007f88be5c9337 RSP: 00007ffd0f665208 RFLAGS: 00010202
RAX: 0000000000000010 RBX: ffffffff81802a8d RCX: 0000000001960000
RDX: 00007ffd0f665ae0 RSI: 0000000000005a02 RDI: 0000000000000005
RBP: 000000000195b090 R8: 00000000019647b0 R9: 00007f88be8967b8
R10: 00007ffd0f665030 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 000000000195c230 R15: 0000000000000000
ORIG_RAX: 0000000000000010 CS: 0033 SS: 002b
crash> bt 19831
PID: 19831 TASK: ffff8820535f32a0 CPU: 1 COMMAND: "txg_sync"
#0 [ffff881b26823b68] __schedule at ffffffff817fe546
#1 #1 [ffff881b26823bd0]
io_schedule at ffffffff817fed3d
#2 #2 [ffff881b26823be8]
cv_wait_common at ffffffffa035ca11 [spl]
#3 #3 [ffff881b26823c48]
__cv_wait_io at ffffffffa035cae8 [spl]
#4 #4 [ffff881b26823c58]
zio_wait at ffffffffa04b5cf3 [zfs]
#5 #5 [ffff881b26823c98]
dsl_pool_sync at ffffffffa043f8e1 [zfs]
#6 #6 [ffff881b26823d08]
spa_sync at ffffffffa045a485 [zfs]
#7 #7 [ffff881b26823dc0]
txg_sync_thread at ffffffffa046c809 [zfs]
#8 #8 [ffff881b26823ea0]
thread_generic_wrapper at ffffffffa0357e0a [spl]
#9 #9 [ffff881b26823ed0]
kthread at ffffffff81091022
#10 #10 [ffff881b26823f50]
ret_from_fork at ffffffff818029d8


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#4550

@zp841126
Copy link
Author

Yes, I only have one zvol and no snapshot

I will try 0.6.5.6

@zp841126
Copy link
Author

Hi Olivier,

I tried 0.6.5.6, it work fine. But it seems in this version, create zvol is async operation, some times, zvol not be created after zpool import return. Could you confirm is it by design?

@behlendorf
Copy link
Contributor

behlendorf commented Apr 26, 2016

Yes this is by design. Technically it was async before as well since udev will always create the nodes asynchronously, but now it's more pronounced.

@zp841126
Copy link
Author

Thanks for your help.

After upgrade to 0.6.5.6. The import issue have resolved. So close it.

@behlendorf behlendorf added this to the 0.6.5.6 milestone Apr 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants