I. preface this document describes how to optimize the performance of RedHatEnterpriseLinux in OOP8 production environments based on actual conditions. 1) The LinuxProc file system is optimized by adjusting the Proc file system. 2) Linux performance 1. Preface
This document describes how to optimize the performance of RedHat Enterprise Linux in the following aspects.
1) Linux Proc file system, through Proc file system adjustment, to achieve performance optimization.
2) Linux performance diagnostic tool: describes how to use the diagnostic tool provided by Linux for performance diagnosis.
Bold italics indicate commands that can be directly run.
Ii./proc/sys/kernel/Optimization
1)/proc/sys/kernel/ctrl-alt-del
This file has a binary value that controls how the system responds when receiving a combination of ctrl + alt + delete keys. The two values are:
If the value is zero (0), ctrl + alt + delete is captured and sent to the init program. This allows the system to close and restart safely, just as if it had entered the shutdown command.
A value of 1 indicates that the command ctrl + alt + delete is not captured, and an abnormal shutdown is executed, as if the power is directly turned off.
Default Value: 0.
It is recommended to set: 1 to prevent unexpected restart caused by pressing ctrl + alt + delete.
2) proc/sys/kernel/msgmax
This file specifies the maximum length (bytes) of messages sent from one process to another ). Messages are transmitted between processes in the kernel memory and are not exchanged to the disk. Therefore, if this value is added, the memory used by the operating system is increased.
Default: 8192
3)/proc/sys/kernel/msgmnb
This file specifies the maximum length of a Message Queue (bytes ).
Default: 16384
4)/proc/sys/kernel/msgmni
This file specifies the maximum number of Message Queue IDs, that is, the maximum number of message queues in the system range.
Default setting: 16
5)/proc/sys/kernel/panic
This file indicates the waiting time (in seconds) of the kernel before the reboot in the event of "kernel panic ).
Zero (0) seconds indicates that automatic reboot is prohibited in the event of a serious kernel error.
Default Value: 0.
6) proc/sys/kernel/shmall
This file indicates the total amount of shared memory (bytes) that can be used by the system at any given time point ).
Default: 2097152
7)/proc/sys/kernel/shmmax
This file indicates the size (bytes) of the maximum shared memory segment allowed by the kernel ).
Actual maximum available shared memory segment size = shmmax * 98%, of which approximately 2% is used for the shared memory structure.
You can set shmmax and then run ipcs-l for verification.
8)/proc/sys/kernel/shmmni
This file indicates the maximum number of shared memory segments used for the entire system ).
Default: 4096
9)/proc/sys/kernel/threads-max
This file indicates the maximum number of threads that the kernel can use.
Default: 2048
10)/proc/sys/kernel/sem
This file is used to control the kernel semaphores. The semaphores are the methods used by System VIPC for inter-process communication.
Recommended: 250 32000 100 128
The first column indicates the maximum number of semaphores in each signal set.
The second column indicates the total number of semaphores in the system range.
The third column indicates the maximum number of system operations when each signal occurs.
The fourth column indicates the total number of signal sets in the system range.
Therefore, (first column) * (fourth column) = (second column)
The preceding settings can be verified by executing ipcs-l.
11) To be continued...
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.