2014年10月8日 星期三
2014年8月13日 星期三
Linux 下CPU頻率的調節模式
1. 查調系統中CPU頻率的調節模式有哪些?
#cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
2. 目前系統預設的調節模式為?
#cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
3. 各模式的特性
ondemand
當CPU的使用率超過1個固定的百分比,就會將CPU頻率升到最高,之後再依負載情形降頻,為絕大多數Linux預設的模式。
conservative
與Ondemand類似,但是提升時脈的行為較為消極,會在CPU可運作的時脈中一階一階往上跳,反應比較緩慢但較省電。
userspace
自定義模式,將頻率調節的決策權交給了用戶應用程序,並提供了相應的端口供用戶應用程序調節CPU 運行頻率使用。可以通過手動編輯配置文件進行配置。
將CPU頻率固定在最低。
performance
將CPU頻率控制在最高。
Linux 網路效能測試工具 iperf
1. 至官網下載 https://iperf.fr/
2. 解壓縮、編譯,安裝
#tar zxvf iperf-2.0.5-source.tar.gz
#cd iperf-2.0.5/
#./configure && make && make install
3. 測試
3.1 Server 端指令
#iperf -s
3.2 Client 端指令
#iperf -c $IP -t 60 -d -i 1
4. 參數說明
-s = Server mode
-c = Client mode
$IP = Server IP
-t = 測試時間(秒)
-d = 雙向測試
-i = 間隔(秒)顯示報告
5. 將測試數據生成報告
#iperf -c 192.10.1.1 -t 60 -i 1 | tee -a test.log
2. 解壓縮、編譯,安裝
#tar zxvf iperf-2.0.5-source.tar.gz
#cd iperf-2.0.5/
#./configure && make && make install
3. 測試
3.1 Server 端指令
#iperf -s
3.2 Client 端指令
#iperf -c $IP -t 60 -d -i 1
4. 參數說明
-s = Server mode
-c = Client mode
$IP = Server IP
-t = 測試時間(秒)
-d = 雙向測試
-i = 間隔(秒)顯示報告
5. 將測試數據生成報告
#iperf -c 192.10.1.1 -t 60 -i 1 | tee -a test.log
Linux 限制 CPU 使用 % 工具
1. http://cpulimit.sourceforge.net/ 下載 cpulimit-1.1.tar.gz
2. 解壓縮,編譯
#cd ~/Download/
#tar zxvf cpulimit-1.1.tar.gz
#cd cpulimit-1.1/
#make
3. 執行
#./cpulimit -p PID -l 50
-p = PID
-l = % ( 需乘以核心數量,假設四核心 = 4 x 50% = 200 )
2. 解壓縮,編譯
#cd ~/Download/
#tar zxvf cpulimit-1.1.tar.gz
#cd cpulimit-1.1/
#make
3. 執行
#./cpulimit -p PID -l 50
-p = PID
-l = % ( 需乘以核心數量,假設四核心 = 4 x 50% = 200 )
2014年8月12日 星期二
Linux Mint 17 MATE 64-bit 安裝 Chrome 瀏覽器
1. 到 http://www.google.com/intl/zh-TW/chrome/ 下載 Chrome 瀏覽器
2. 安裝 chrome
#cd ~/Download
#sudo gdebi google-chrome-stable_current_amd64.deb
3. 將Cache 設定到 ramdisk 中
編輯啟動屬性,在指令中/usr/bin/google-chrome-stable %U 插入--disk-cache-dir="/dev/shm/chrome/"
變成/usr/bin/google-chrome-stable --disk-cache-dir="/dev/shm/chrome/" %U
啟動chrome 之後,在/dev/shm/中檢查是否有chrome資料匣
2. 安裝 chrome
#cd ~/Download
#sudo gdebi google-chrome-stable_current_amd64.deb
3. 將Cache 設定到 ramdisk 中
編輯啟動屬性,在指令中/usr/bin/google-chrome-stable %U 插入--disk-cache-dir="/dev/shm/chrome/"
變成/usr/bin/google-chrome-stable --disk-cache-dir="/dev/shm/chrome/" %U
啟動chrome 之後,在/dev/shm/中檢查是否有chrome資料匣
訂閱:
文章 (Atom)