版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/tiantao2012/article/details/82716418
centos 提供了tuned-adm,其原理是改变sysctl的参数来调节kernel在不同场景下的性能
例如目前提供的场景如下:
[root@localhost pci]# tuned-adm list
Available profiles:
- balanced - General non-specialized tuned profile
- desktop - Optimize for the desktop use-case
- latency-performance - Optimize for deterministic performance at the cost of increased power consumption
- network-latency - Optimize for deterministic performance at the cost of increased power consumption, focused on low latency network performance
- network-throughput - Optimize for streaming network throughput, generally only necessary on older CPUs or 40G+ networks
- powersave - Optimize for low power consumption
- throughput-performance - Broadly applicable tuning that provides excellent performance across a variety of common server workloads
- virtual-guest - Optimize for running inside a virtual guest
- virtual-host - Optimize for running KVM guests
Current active profile: network-throughput
当前正在应用的场景
[root@localhost pci]# tuned-adm active
Current active profile: network-throughput
可以通过sysctl -a > 2.txt 将所有的sysctl参数改到文件中,然后比较两种场景下的sysctl的区别