linux_wiki:kernel_tuning

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
linux_wiki:kernel_tuning [2015/04/28 22:30]
billdozor [Swappiness]
linux_wiki:kernel_tuning [2019/05/25 23:50] (current)
Line 6: Line 6:
  
 **Checklist** **Checklist**
-  * Any distro, but many examples are done via Red Hat based systems+  * Distro(s): Any
  
 ---- ----
  
-===== Hugepages =====+====== Hugepages ======
  
 Problem: Unable to access a VM's console, and it shows out of memory errors on boot. Problem: Unable to access a VM's console, and it shows out of memory errors on boot.
Line 28: Line 28:
 ---- ----
  
-===== Swappiness =====+==== HugePage Bug ==== 
 + 
 +On some kernels, khugepaged can start running at 100% CPU utilization. This is typically seen on systems that have process/memory intensive processes. 
 + 
 +Other symptoms include: 
 +  * Normal commands hang (w, uptime, ps) 
 +  * Processes showing above 100% CPU (ie sometimes up to 1,300%) 
 + 
 +Details 
 +  * Known Affected kernels 
 +    * CentOS 6: 2.6.32-431.el6.x86_64 
 +  * Reference bug report: https://bugzilla.redhat.com/show_bug.cgi?id=879801 
 + 
 +=== Workaround Fix === 
 + 
 +Disable hugepage defragmenting: 
 +<code bash> 
 +echo never > /sys/kernel/mm/redhat_transparent_hugepage/defrag 
 +</code> 
 + 
 +Add new cron entry 
 +<code bash> 
 +vim /etc/cron.d/hugepage_defrag 
 + 
 +# Disable kernel huge page defrag due to bugzilla bug: 879801 
 +@reboot root /bin/echo never > /sys/kernel/mm/transparent_hugepage/defrag 
 +</code> 
 + 
 +=== Permanent Fix === 
 + 
 +Ultimately, the permanent fix is to update the kernel to a newer version. 
 + 
 +TODO: Will add confirmed kernel versions that this bug is fixed in. 
 + 
 +---- 
 + 
 +====== Swappiness ======
  
 Swappiness controls how likely the kernel is to move processes out of memory and onto swap disk space. Swappiness controls how likely the kernel is to move processes out of memory and onto swap disk space.
Line 57: Line 93:
 ---- ----
  
-===== Page Cache =====+====== Page Cache ======
  
 Tuning how often cached pages in memory are flushed to disk. Tuning how often cached pages in memory are flushed to disk.
Line 82: Line 118:
 ---- ----
  
-===== File Descriptors =====+====== File Descriptors ======
  
 Viewing and setting the system wide file descriptors. Viewing and setting the system wide file descriptors.
Line 109: Line 145:
  
 ---- ----
 +
 +====== Kernel Panic ======
 +
 +Reboot a system after a 10 seconds of kernel panic
 +<code bash>
 +kernel.panic = 10
 +</code>
 +
 +----
 +
  • linux_wiki/kernel_tuning.1430274612.txt.gz
  • Last modified: 2019/05/25 23:50
  • (external edit)