歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux綜合 >> Red hat Linux >> 淺談linux性能調優之十二:紅帽優化策略Tuned

淺談linux性能調優之十二:紅帽優化策略Tuned

日期:2017/3/1 15:52:51   编辑:Red hat Linux
淺談linux性能調優之十二:紅帽優化策略Tuned 淺談linux性能調優之十一:內存分配管理 http://www.2cto.com/os/201307/228761.html 紅帽推出的一個動態調優方案,用戶可以在不同的時間段內采用不同的調優方案。由於以服務進程形式存在,就可以很方便的和crontab結合!Tuned 是監控並收集各個系統組件用量數據的守護進程,並可使用那些信息根據需要動態調整系統設置。它可以對 CPU 和網絡使用的更改作出反應,並調整設置以提高活動設備的性能或者降低不活躍設備的電源消耗。 伴隨它的工具 ktune 結合 tuned-adm 工具提供大量預先配置的調整分析以便在大量具體使用案例中提高性能並降低能耗。編輯這些配置或者創建新配置可生成為系統定制的性能解決方案。 安裝:yum install tuned -y 啟動:/etc/init.d/tuned start /etc/init.d/ktune start 查看系統中對於不同應用場景的調優方案 [root@localhost Desktop]# tuned-adm list Available profiles: - default - enterprise-storage - server-powersave - throughput-performance - desktop-powersave - laptop-ac-powersave - latency-performance - laptop-battery-powersave - spindown-disk Current active profile: default 使用某種profile [root@localhost Desktop]# tuned-adm profile server-powersave Stopping tuned: [ OK ] Switching to profile 'server-powersave' Applying ktune sysctl settings: /etc/ktune.d/tunedadm.conf: [ OK ] Calling '/etc/ktune.d/tunedadm.sh start': [ OK ] Applying sysctl settings from /etc/sysctl.conf Starting tuned: [ OK ] 關於一些profile的說明: default 默認節電配置。這是最基本的節點配置。它只啟用磁盤和 CPU 插件。注:這與關閉 tuned-adm 不同,關閉該程序會同時禁用 tuned 和 ktune。 latency-performance 典型延遲性能調試的服務器配置。它禁用 tuned 和 ktune 節能機制。cpuspeed 模式改為 performance。每個設備的 I/O 提升程序改為 deadline。對於服務的電源管理質量,將 cpu_dma_latency 設定為 0。 throughput-performance 用於典型吞吐性能調整的服務器側寫。如果系統沒有企業級存儲則建議使用這個側寫。它與 latency-performance 相同,只是: 將 kernel.sched_min_granularity_ns(調度程序最小優先占用時間間隔)設定為 10 毫秒, 將kernel.sched_wakeup_granularity_ns(調度程序喚醒間隔時間)設定為 15 毫秒。 將 vm.dirty_ratio(虛擬機髒數據比例)設定為 40%,並啟用透明超大頁面。 enterprise-storage 建議最企業級服務器配置中使用這個側寫,其中包括電池備份控制程序緩存保護以及管理磁盤緩存。它與 throughput-performance 配置類似,只是文件系統要使用 barrier=0 重新掛載。 virtual-guest 建議最企業級服務器配置中使用這個側寫,其中包括電池備份控制程序緩存保護以及管理磁盤緩存。它與 throughput-performance 類似,只是: 將 readahead 值設定為 4x,同時不使用 barrier=0 重新掛載的 root/boot 文件系統。 virtual-host 根據 enterprise-storage 配置,virtual-host 還可減少可置換的虛擬內存,並啟用更多集合髒頁寫回。您可以在紅帽企業版 Linux 6.3 以及之後的版本中找到這個配置,同時推薦在虛擬化主機中使用這個配置,包括 KVM 和紅帽企業版 Linux 虛擬化主機。 配置文件:/etc/tune-profiles/ 不同的profile以目錄形式存在! 制作適合自己應用場景的調優方案: cd /etc/tune-profiles; cp -r enterprise-storage/ my-server; cd my-server/ 修改響應的配置文件,添加調優參數
Copyright © Linux教程網 All Rights Reserved