High Kernel CPU usage in zfs_range_lock is seen when Oracle DB is running without ZFS recordsize matching DB block size on some DB filesytems (Doc ID 1668666.1)

Last updated on SEPTEMBER 23, 2017

Applies to:

Solaris Operating System - Version 10 10/08 U6 and later
Solaris x64/x86 Operating System - Version 10 10/08 U6 and later
Oracle Solaris on SPARC (64-bit)
Oracle Solaris on x86-64 (64-bit)
***Checked for relevance on 23-Sep-2017***

Symptoms

On System running Oracle database on ZFS file system, not setting the ZFS recordsize to match the Oracle DB block size for the DB tables and index filesystems can cause high Kernel CPU usage. 

 

The mpstat data may show over 90% CPU usage in kernel such as the following:

CPU minf mjf xcal  intr ithr  csw icsw migr smtx  srw syscl  usr sys  wt idl

<...>
 15    0   0  111  1017  449 2471    2  957 1875    0    88    0  98   0   2
 16    0   0  157   484    1 4773    2 1883 3753    0   118    0  98   0   2
 17    0   0 1602  1758 1320 5113    3 2025 4182    0   192    0  98   0   2
 18   16   0  236   466    1 5450    9 2208 4261    0   170    1  97   0   2
 19    0   0  222   474    1 5108    2 2096 3995    0   119    0  98   0   2
 20    0   0  230   508    2 5411    5 2048 4247    0   150    1  98   0   2
 21    0   0  410   465    2 5003    2 1994 3906    0   118    0  98   0   2
 22    0   0  365   483    3 5494    4 2149 4281    0   141    0  98   0   2
 23   18   0  179   478    2 5096    4 2010 3943    0   143    0  98   0   2
 24    0   0  273   443    2 5256    3 2106 4155    0   128    0  98   0   2
 25    0   0  217   443    2 5442    2 2223 4251    0   153    0  98   0   2
 26    0   0  146   435    3 5351    2 2218 4148    0   141    0  98   0   2
<...>

On system running Oracle DB 11g, you may also see high runnables from vmstat output:

 kthr      memory            page            disk          faults      cpu
 r b w   swap  free  re  mf pi po fr de sr s0 s1 s2 sd   in   sy   cs us sy id
 12 0 0 128633776 71324760 502 2066 962 0 0 0 3 -0 61 60 -0 9724 17276 16233 1 4 95
 22 0 0 122569856 65684808 838 7955 11 0 0 0 0 0 29 34 0 26044 45720 77990 2 21 77
 26 0 0 122527224 65624200 344 3016 0 0 0 0 0 0 41 62 0 38796 34679 71020 3 19 78
 0 0 0 122530232 65621544 323 1341 992 0 0 0 0 0 85 62 0 44486 34092 94876 2 24 74
 77 0 0 122532416 65621072 183 594 75 0 0 0 0 0 42 41 0 39242 28936 85090 2 24 74
 562 0 0 122530280 65618896 189 654 10 0 0 0 0 0 42 32 0 33815 27863 146426 1 40 59
 834 0 0 122526992 65620080 2041 5265 0 0 0 0 0 0 22 17 0 32732 46448 198270 1 59 40
 803 0 0 122513312 65605008 1546 5443 86 0 0 0 0 0 26 49 0 34602 52053 195741 1 58 41
 226 0 0 122517248 65604992 344 1168 46 0 0 0 0 0 38 27 0 52179 39649 194250 1 55 43
 0 0 0 122518440 65606232 186 658 99 0 0 0 0 0 33 40 0 31312 29918 22595 2 4 94
 194 0 0 122507760 65601408 393 1339 30 0 0 0 0 0 22 16 0 35690 35308 136345 2 35 63

In these cases, profiling lockstat will show the CPU spending time in zfs_range_lock such as the following:

66439  52% ---- 0.00      693 cpu[29]                zfs_write               
66437  52% ---- 0.00      693 cpu[29]                pwrite                  
64305  51% ---- 0.00      691 cpu[29]                zfs_range_lock          <<<
63737  50% ---- 0.00      673 cpu[29]                plat_lock_delay         
63405  50% ---- 0.00      691 cpu[29]                zfs_range_lock_writer      <<<
63324  50% ---- 0.00      675 cpu[29]                mutex_vector_enter      

 

 

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms