8a安装环境配置
1、磁盘分区格式:
RHEL 6.X:EXT4 文件格式;
RHEL 7.X:XFS 文件格式;
SUSE: XFS 文件格式。
2、建议关闭超线程、关闭 CPU 自动降频。高负载的情况下开超线程会增加等待时间。
(1)CPU模式performancee查看当前主频或
cpupower frequency-info 查看当前主频
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor查看工作模式
(2)cpupower -c all frequency-set -g performance 设置CPU工作模式为performance(高性能模式),如果BIOS里面没有改成performance,在操作系统层改成performance也不好使。
(3)cpupower frequency-info,信息如下,注意“current policy”里面的内容,如果“The governor "performance" may decide which speed to use
within this range.
”说明是performance,否则需要改BIOS,以下是信息的例子:
analyzing CPU 0:
driver: intel_pstate
CPUs which run at the same hardware frequency: 0
CPUs which need to have their frequency coordinated by software: 0
maximum transition latency: Cannot determine or is not supported.
hardware limits: 1.20 GHz - 3.10 GHz
available cpufreq governors: performance powersave
current policy: frequency should be within 1.20 GHz and 3.10 GHz.
The governor "performance" may decide which speed to use
within this range.
current CPU frequency: 2.40 GHz (asserted by call to hardware)
boost state support:
Supported: yes
Active: yes
3、关闭内存大页transparent_hugepage
echo never > /sys/kernel/mm/transparent_hugepage/enabled
echo never > /sys/kernel/mm/transparent_hugepage/defrag
4、查看磁盘调度,机械盘需要为deadline,SSD需要noop
cat /sys/block/sdb/queue/scheduler
noop [deadline] cfq
5、操作系统允许最大进程数设置
vi /etc/systemd/system.conf
DefaultTasksMax=infinity
6.尽量不使用swap
vi /etc/sysctl.conf
vm.swappiness=0
修改完毕后执行sysctl -p命令生效
热门帖子
- 12025-12-01浏览数:182759
- 22023-05-09浏览数:25052
- 42023-09-25浏览数:18521
- 52020-05-11浏览数:17526