linux_wiki:kernel_tuning

Differences

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

Link to this comparison view

linux_wiki:kernel_tuning [2015/04/28 20:11]
billdozor
linux_wiki:kernel_tuning [2019/05/25 23:50]
Line 1: Line 1:
-====== Kernel Tuning ====== 
  
-**General Information** 
- 
-Kernel tuning using sysctl.conf 
- 
-**Checklist** 
-  * Any distro, but many examples are done via Red Hat based systems 
- 
----- 
- 
-===== Hugepages ===== 
- 
-Problem: Unable to access a VM's console, and it shows out of memory errors on boot. 
- 
-Solution: Reduce the value of "vm.nr_hugepages" to less than 1/2 of total memory in MBs. 
- 
-/etc/sysctl.conf 
-<code bash> 
-vm.nr_hugepages = 1024 
-</code> 
-1 hugepage = 2 MBs, so the above is equal to 2GB 
- 
-Explanation: Hugepages that is configured to be greater than or equal to total installed memory causes memory starvation during boot due to no memory available for normal use. 
- 
-Alternative config location: Hugepages could also be configured at /boot/grub/grub.conf 
- 
----- 
- 
-===== Swappiness ===== 
- 
-TODO: VM Swappiness content will go here. 
- 
----- 
- 
-===== File Descriptors ===== 
- 
-Viewing and setting the system wide file descriptors. 
- 
-**View system wide file descriptor information** 
-<code bash> 
-sysctl fs.file-nr 
-fs.file-nr = 6144 0 809542 
-</code> 
- 
-The three numbers returned: 
-  * 6144 = used file descriptors 
-  * 0 = allocated but not used 
-  * 809542 = system max 
- 
- 
-**Change System FD Limits** 
- 
-Edit /etc/sysctl.conf 
-<code bash> 
-fs.file-max = 810542 
-</code> 
-Example above increases system wide max by 1,000. 
- 
----- 
  • linux_wiki/kernel_tuning.txt
  • Last modified: 2019/05/25 23:50
  • (external edit)