※2014/07/02 T2インスタンスタイプとの比較 を追記しました。 ※2014/03/13 他インスタンスタイプとの比較/m3.mediumの検証 を追記しました。 こちらの記事の二番煎じです。 cgroupで、お手軽CPU使用率制限 なるほど。 リソースにLimitかけるとstealを防げるためパフォーマンスも上がるというわけですね。 どのくらい変わるのか実験してみました。 cgroup前準備 sudo yum install libcgroup sudo chkconfig cgconfig on sudo service cgconfig start cgroup設定 上記参考URLとほぼ同じ設定です。 実行時はcpu.cfs_quota_usを変動させて比較してみました。 sudo vi /etc/cgconfig.conf # 以下を追加 group limittest {
CPU負荷制限 cpulimit というツールがあり、%指定でそのプロセス(子プロセス含む)のCPUの利用率を制限することができます。例えば infinity という単にシングルスレッドで無限ループするプログラムがあったとして、CPU使用率10%で制限するには以下のようにします。 この10%というのは1論理コアの割合です。100と指定すると論理コア1個分(100%)まで許可することになります。例えば4論理コアの環境ではこの値は0~400まで設定できます。なのでシングルスレッド・シングルプロセスのプログラムであれば100以上指定しても意味はありません。 infinityを2論理コア上で50%で制限すると、以下のようになります。 (↓では論理コア全部を100%として表示してます) 既に走っているプロセスに制限をかけることもできます。
日本アニメ初の快挙!海外アニメ賞を受賞した『スキップとローファー』海外ライセンス部長&プロデューサーが語る、奮闘の舞台裏
日本アニメ初の快挙!海外アニメ賞を受賞した『スキップとローファー』海外ライセンス部長&プロデューサーが語る、奮闘の舞台裏
Linux の連続稼働時間が 208.5 日を過ぎた段階で突如 Kernel Panic を引き起こすという過激な挙動で2011年の年の瀬に話題となった "旧208.5日問題" ですが、あれから二年が経った今、Linux Kernel 内の bug と Intel Xeon CPU の bug の合わせ技により再度類似の不具合が発生することが分かっています。 旧 208.5 日問題の発生原理に関しては以下の blog が参考になります。 okkyの銀河制圧奇譚 : sched_clock() overflow after 208.5 days in Linux Kernel 追記(2014/1/4) 新208.5日問題の簡易チェックツールを作成しました。よろしければお使い下さい。 tsc_checker - 新208.5日問題簡易チェックツール また、Linux Kernel における時間
OSレベルで sys のCPU使用率が高い場合に perf*1 を使って、何の処理の割合が高いか調べる方法です。 perf は 特定のプロセスだけでなくOS全体の統計を見れる カーネル(sys)とユーザー(user)の両方を見れる ところが非常に便利だと思う*2。 準備 ひたすら write システムコールを発行し続けるプログラムを作成する $ cat write_loop.c #include <unistd.h> int main(void) { while(1) { write(1, "foo\n", 4); } } コンパイルする $ gcc write_loop.c -o write_loop 実行権限を付与する $ chmod u+x write_loop 検証 ひたすらwriteシステムコールを発行するプログラムを実行する $ ./write_loop > /dev/null
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く