顯示具有 Linux 標籤的文章。 顯示所有文章
顯示具有 Linux 標籤的文章。 顯示所有文章

2011年3月14日 星期一

Linux Power Saving Mode..

最近HPC案,在測Infiniband的端口點對點速度,在以如rdma_bw等指令測驗時,
出現了以下訊息:
-------------------------------------------------------------
rdma_bw 10.3.7.1
31842: | port=18515 | ib_port=1 | size=65536 | tx_depth=100 | sl=0 | iters=1000 | duplex=0 | cma=0 |
31842: Local address: LID 0x79e, QPN 0x01e1, PSN 0x42bee3 RKey 0x4141500 VAddr 0x007f16bc4ba000
31842: Remote address: LID 0x1bb, QPN 0x0023, PSN 0xc83334, RKey 0x0a0b00 VAddr 0x007fe239a9e000

Conflicting CPU frequency values detected: 800.000000 != 2200.000000

31842: Bandwidth peak (#994 to #999): 0 MB/sec
31842: Bandwidth average: 0 MB/sec
31842: Service Demand peak (#994 to #999): 2680 cycles/KB
31842: Service Demand Avg : 3053 cycles/KB


---------------------------------------------------------

由以上訊息可以得知,卡在CPU規格的頻率是2200MHz,但目前的cpu頻率是800MHz,所以程式不給run。

查了一下是AMD的PowerNOW!省電技術,在Loading輕的狀況下,會以較低頻率下去運行。
Linux下相關的設定檔放在 /sys/devices/system/cpu 目錄下.
有幾個檔案
sampling_rate_min
sampling_rate_max
up_threshold
分別是設定節能運行的門檻值..等相關設定。
而在這邊要即時更改運行的clock,我使用的是將sampling_rate_min更改成CPU規格的clock值。
而因為CPU共48核心,故需使用For迴圈更改48 cores的設定.
for (( i=0;i<=47;i=i+1 ));do echo 2200000 > ./cpu$i/cpufreq/scaling_min_freq;done

紀錄一下
....繼續閱讀

2010年7月7日 星期三

利用ethtool對網卡限速

因架設Lustre環境,想確認分散式架構對performance是否真的有助益,但沒有10G或InfiniBand等架構,效能都卡在網路頻寬,故想到用降低網路速率來測分散式是否真有助益...


網路上查了一下,可以使用ethtool工具進行..
---------------------
#ethtool
Settings for eth0:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: umbg
Wake-on: g
Current message level: 0x00000003 (3)
Link detected: yes
----------------------

目前的網路速度為1000Mb/s。

於是下達
ifdown eth0;ethtool -s eth0 speed 10;ifup eth0

結果失敗,速度仍為1000。
於是修改網卡配置文件
#vi /etc/sysconfig/network-scripts/ifcfg-eth0
添加一行
ETHTOOL_OPTS="speed 10 duplex full autoneg off"

就搞定.
--------------------
Settings for eth0:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: Not reported
Advertised auto-negotiation: No
Speed: 10Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 1
Transceiver: internal
Auto-negotiation: off
Supports Wake-on: umbg
Wake-on: g
Current message level: 0x00000003 (3)
Link detected: yes
--------------------

參考至Lyychee's Blog


....繼續閱讀