[Bug 275594] High CPU usage by arc_prune; analysis and fix

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 04 Apr 2024 12:16:00 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275594

--- Comment #109 from mike@sentex.net ---
(In reply to Olivier Certner from comment #106)
FYI, I am able to trigger this on a small 8G zfs box acting as a smb server. On
a windows machine I am generating a 200G vhdx file to the FreeBSD smb server.
That part is ok. Then on the FreeBSD box (RELENG_13.2) I run qemu-img to
convert the vhdx file to qcow2.  After that is done, I see the arc_prune issue.

last pid: 49326;  load averages:  2.80,  2.42,  2.32                           
                                                                               
                      up 57+19:02:07  08:10:42
253 threads:   7 running, 226 sleeping, 20 waiting
CPU: 10.1% user,  0.0% nice, 59.7% system,  0.2% interrupt, 30.0% idle
Mem: 704K Active, 22M Inact, 12M Laundry, 7444M Wired, 619M Buf, 191M Free
ARC: 5955M Total, 70M MFU, 5577M MRU, 61K Anon, 53M Header, 1020K Other
     5475M Compressed, 19G Uncompressed, 3.54:1 Ratio
Swap: 4096M Total, 155M Used, 3941M Free, 3% Inuse

  PID USERNAME    PRI NICE   SIZE    RES STATE    C   TIME    WCPU COMMAND
    0 root         -8    -     0B  1456K CPU3     3  69:20  99.91%
kernel{arc_prune}
   17 root        -16    -     0B    16K CPU2     2  48:54  64.44% vnlru

CPU: Intel(R) Celeron(R) N5105 @ 2.00GHz (1996.80-MHz K8-class CPU)
  Origin="GenuineIntel"  Id=0x906c0  Family=0x6  Model=0x9c  Stepping=0
 
Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
 
Features2=0x4ff8ebbf<SSE3,PCLMULQDQ,DTES64,MON,DS_CPL,VMX,EST,TM2,SSSE3,SDBG,CX16,xTPR,PDCM,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,TSCDLT,AESNI,XSAVE,OSXSAVE,RDRAND>
  AMD Features=0x28100800<SYSCALL,NX,RDTSCP,LM>
  AMD Features2=0x101<LAHF,Prefetch>
  Structured Extended
Features=0x2394a2c3<FSGSBASE,TSCADJ,FDPEXC,SMEP,ERMS,NFPUSG,PQE,RDSEED,SMAP,CLFLUSHOPT,CLWB,PROCTRACE,SHA>
  Structured Extended
Features2=0x18400124<UMIP,WAITPKG,GFNI,RDPID,MOVDIRI,MOVDIR64B>
  Structured Extended
Features3=0xfc000400<MD_CLEAR,IBPB,STIBP,L1DFL,ARCH_CAP,CORE_CAP,SSBD>
  XSAVE Features=0xf<XSAVEOPT,XSAVEC,XINUSE,XSAVES>
  IA32_ARCH_CAPS=0x20c6b<RDCL_NO,IBRS_ALL,SKIP_L1DFL_VME,MDS_NO>
  VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID,VID,PostIntr
  TSC: P-state invariant, performance statistics
real memory  = 8589934592 (8192 MB)
avail memory = 8002285568 (7631 MB)
CPU microcode: updated from 0x1d to 0x24000024
Event timer "LAPIC" quality 600

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