Docker Daemon is extremely slow

Docker operations, such as creating containers, takes around 4 minutes, both in the command line, in the web UI, or in Portainer.

Version: ElectricEel-24.10.0.2

System: 2 x Intel 8259CL (24 cores, 2.5GHz). 2TB memory.

Here’s a dmesg snippet that I thought might be relevant.

[  970.322940] INFO: task dockerd:15542 blocked for more than 120 seconds.
[  970.343932]       Tainted: P           OE      6.6.44-production+truenas #1
[  970.365312] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  970.387671] task:dockerd         state:D stack:0     pid:15542 ppid:1      flags:0x00004002
[  970.387681] Call Trace:
[  970.387685]  <TASK>
[  970.387691]  __schedule+0x349/0x950
[  970.387714]  schedule+0x5b/0xa0
[  970.387718]  io_schedule+0x46/0x70
[  970.387722]  folio_wait_bit_common+0x13f/0x360
[  970.387737]  ? __pfx_wake_page_function+0x10/0x10
[  970.387746]  folio_wait_writeback+0x2b/0x90
[  970.387757]  __filemap_fdatawait_range+0x80/0xe0
[  970.387762]  filemap_fdatawait_keep_errors+0x1e/0x50
[  970.387765]  sync_inodes_sb+0x237/0x2f0
[  970.387779]  sync_filesystem+0x64/0xa0
[  970.387789]  ovl_sync_fs+0x5a/0x90 [overlay]
[  970.387814]  sync_filesystem+0x7b/0xa0
[  970.387818]  generic_shutdown_super+0x26/0x110
[  970.387828]  kill_anon_super+0x16/0x40
[  970.387831]  deactivate_locked_super+0x30/0xb0
[  970.387835]  cleanup_mnt+0xbd/0x150
[  970.387844]  task_work_run+0x5a/0x90
[  970.387854]  exit_to_user_mode_prepare+0x1d3/0x1e0
[  970.387868]  syscall_exit_to_user_mode+0x1b/0x40
[  970.387878]  do_syscall_64+0x65/0xb0
[  970.387888]  ? dbuf_rele_and_unlock+0x114/0x380 [zfs]
[  970.388339]  ? zfs_rangelock_exit_reader+0xc7/0x120 [zfs]
[  970.388697]  ? list_del+0x9/0x30 [zfs]
[  970.389053]  ? zfs_rangelock_exit+0x9a/0x110 [zfs]
[  970.389420]  ? mutex_lock+0x12/0x30
[  970.389429]  ? rrw_exit+0x5e/0xc0 [zfs]
[  970.389805]  ? zfs_read+0x1dc/0x2f0 [zfs]
[  970.390158]  ? atime_needs_update+0x61/0x120
[  970.390170]  ? touch_atime+0x1e/0x120
[  970.390174]  ? zpl_iter_read+0xf7/0x130 [zfs]
[  970.390525]  ? mutex_lock+0x12/0x30
[  970.390529]  ? rrw_enter_read_impl+0xa5/0xf0 [zfs]
[  970.390914]  ? zfs_enter+0x19/0x70 [zfs]
[  970.391264]  ? mutex_lock+0x12/0x30
[  970.391268]  ? rrw_exit+0x5e/0xc0 [zfs]
[  970.391662]  ? zfs_close+0x54/0x70 [zfs]
[  970.392001]  ? mntput_no_expire+0x4a/0x260
[  970.392007]  ? kmem_cache_free+0x20/0x380
[  970.392017]  ? __call_rcu_common.constprop.0+0xe5/0x6b0
[  970.392023]  ? syscall_exit_to_user_mode+0x22/0x40
[  970.392028]  ? do_syscall_64+0x65/0xb0
[  970.392032]  ? do_syscall_64+0x65/0xb0
[  970.392034]  ? syscall_exit_to_user_mode+0x22/0x40
[  970.392037]  ? do_syscall_64+0x65/0xb0
[  970.392039]  ? clear_bhb_loop+0x35/0x90
[  970.392050]  ? clear_bhb_loop+0x35/0x90
[  970.392054]  ? clear_bhb_loop+0x35/0x90
[  970.392058]  ? clear_bhb_loop+0x35/0x90
[  970.392061]  ? clear_bhb_loop+0x35/0x90
[  970.392065]  entry_SYSCALL_64_after_hwframe+0x78/0xe2
[  970.392071] RIP: 0033:0x561bdeccd00e
[  970.392076] RSP: 002b:000000c0018f5370 EFLAGS: 00000216 ORIG_RAX: 00000000000000a6
[  970.392081] RAX: 0000000000000000 RBX: 000000c001066690 RCX: 0000561bdeccd00e
[  970.392084] RDX: 0000000000000000 RSI: 0000000000000002 RDI: 000000c001066690
[  970.392086] RBP: 000000c0018f53b0 R08: 0000000000000000 R09: 0000000000000000
[  970.392087] R10: 0000000000000000 R11: 0000000000000216 R12: 0000000000000000
[  970.392089] R13: 000000c000a28800 R14: 000000c002a99d40 R15: 000000000000000f
[  970.392092]  </TASK>

Apps perform normally and I’m not seeing containers stop or halt. It’s just the daemon.