[Bug 275063] kernel using 100% CPU in arc_prune

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 13 Nov 2023 21:10:33 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275063

            Bug ID: 275063
           Summary: kernel using 100% CPU in arc_prune
           Product: Base System
           Version: Unspecified
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: d8zNeCFG@aon.at

Scenario:
- FreeBSD stable/14 at e4fb49e867ae70412205d1aade0b76fae158b551
- Doing an rsync from UFS to ZFS, where both are on the same physical disks
- The scenario always worked flawlessly on releng/12.4
- 4-core CPU
- Running top with H and S keys pressed (show system processes, show threads)

Result:
- 200% CPU time is used: 100% by rsync, another 100% by something labeled
"arc_prune" in top
- top snapshot:

last pid:  4132;  load averages:  2.04,  1.92,  1.69                           
                up 0+13:28:31  22:08:35
369 threads:   7 running, 342 sleeping, 20 waiting
CPU:  0.0% user,  0.0% nice, 49.9% system,  0.0% interrupt, 50.1% idle
Mem: 64M Active, 142M Inact, 222M Laundry, 2632M Wired, 276M Buf, 12G Free
ARC: 661M Total, 153M MFU, 394M MRU, 16M Anon, 14M Header, 68M Other
     380M Compressed, 941M Uncompressed, 2.48:1 Ratio
Swap: 20G Total, 20G Free

  PID USERNAME    PRI NICE   SIZE    RES STATE    C   TIME    WCPU COMMAND
    0 root         -8    -     0B  1376K CPU1     1  28:14 100.00%
kernel{arc_prune}
 1491 root        132    0    26M    11M CPU2     2  21:04  96.99% rsync
   10 root        187 ki31     0B    64K CPU0     0 765:33  83.53% idle{idle:
cpu0}
   10 root        187 ki31     0B    64K RUN      2 763:29  68.92% idle{idle:
cpu2}
   10 root        187 ki31     0B    64K RUN      3 762:42  47.56% idle{idle:
cpu3}
   20 root        -16    -     0B    16K vlruwt   3   0:43   3.07% vnlru
    2 root        -60    -     0B    64K WAIT     0   0:54   0.08% clock{clock
(0)}
 4132 root         20    0    14M  4188K CPU3     3   0:00   0.06% top
   11 root        -64    -     0B   256K WAIT     0   0:44   0.01% intr{irq29:
ahci1}
    4 root        -16    -     0B    48K -        3   0:40   0.01% cam{doneq0}
 2824 root         20    0    25M    13M select   0   0:00   0.01% xterm
   17 root        -16    -     0B    48K psleep   0   0:15   0.01%
pagedaemon{dom0}
  779 root         20    0    33M  6976K select   3   0:05   0.01% mountd
  698 root         20    0    13M  1840K select   0   0:04   0.01% powerd
   16 root        -16    -     0B    16K -        0   0:04   0.01%
rand_harvestq
 2876 root         20    0    16M  4696K select   0   0:01   0.01% xload
    0 root        -64    -     0B  1376K -        3   0:03   0.00%
kernel{fw0_taskq}
   11 root        -64    -     0B   256K WAIT     2   0:53   0.00% intr{irq30:
re0}
  695 root         20    0    19M  6028K select   0   0:03   0.00% ntpd
  861 root         20    0    63M    24M select   3   0:01   0.00% httpd
   21 root         16    -     0B    16K syncer   0   0:03   0.00% syncer
   19 root         20    -     0B   144K sdflus   3   0:01   0.00% bufdaemon{/
worker}
   15 root         -8    -     0B  1104K mmp->m   2   0:01   0.00%
zfskern{mmp_thread_enter}
   15 root         -8    -     0B  1104K t->zth   0   0:07   0.00%
zfskern{arc_reap}
...

Expected result:
- The system should not slow considerably by spending a full core on
"arc_prune"

-- Martin

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