harumaki.net

インフラ屋の覚書や、ラーメン食べある記とか。

CentOS GNU/Linux infra

カーネル負荷テストツール(LTP)

投稿日:2006年6月28日

Last Updated on 2014年8月8日 by かんりにん

[pukiwiki]

*カーネル負荷テストツール(LTP)
IBM、SGI、OSDLなどが共同で運営している[[Linux Test Project(ltp):http://ltp.sourceforge.net/]]の提供するツール
を使ってサーバへの負荷テストを行う。

**【参照サイト】
お世話になっています。

Linuxカーネルのストレス・テスト
http://www-06.ibm.com/jp/developerworks/linux/040709/j_l-stress.html

Linux Test Project
http://ltp.sourceforge.net/

http://jaist.dl.sourceforge.net/sourceforge/ltp/ltp-full-20060615.tgz

Red Hat Linux/サポート:ltpの機能拡張アップデート
http://www.jp.redhat.com/support/errata/RHEA/RHEA-2005-873J.html

※Red Hat Enterprise Linux ASにはRPMがある様子。

**【テストに使った環境】

OS CentOS4.0(仮想環境)
CPU Intel Pen4 2.80GHz
mem 1024MB
     うち割り当て320MB(swap640MB)

**ダウンロードと展開

[root@example src]# pwd
/usr/local/src
[root@example src]# wget http://jaist.dl.sourceforge.net/sourceforge/ltp/ltp-full-20060615.tgz
[root@example src]# tar -zxvf ltp-full-20060615.tgz
[root@example src]# cd ltp-full-20060615

**コンパイルとインストール

-インストール条件
–以下のユーザ、及びグループが存在していること。
nobody
bin
daemon
–またそれぞれUIDとGIDが同じIDを持っていること。
たとえばdaemonの場合は
daemon:x:2:2:daemon:/sbin:/sbin/nologin
となる。
-以下のグループが存在していること
sys
users

条件をクリアしていたらインストールはOK。

[root@example ltp-full-20060615]# make
[root@example ltp-full-20060615]# make instal
make installを実行すると、スクリプトの実行に必要となるユーザ/グループのIDを
最後にチェックする。

Checking for required user/group ids

Nobody user id and group exist.
Bin user id and group exist.
Daemon user id and group exist.
Users group exists.
Sys group exists.
Required users/groups exist.
[root@example ltp-full-20060615]#

**テストシェルの実行

runalltest.shまたはrunltplite.shを実行してみる。
最初にfreeの出力結果やcpuinfoが表示された後、テストが開始される。

[root@example ltp-full-20060615]# ./runalltests.sh

*******************************************************************
*******************************************************************
** **
** The runalltests.sh script is being phased out soon. It will **
** be replaced with the scripts called ‘runltp’. If you **
** currently rely on this script for automation scripts, you **
** should think about changing them NOW! **
** **
*******************************************************************
*******************************************************************

INFO: no command files were provided, using default,
system calls, memory management, IPC, scheduler
direct io, file system, math and pty tests will
now be executed

If some fields are empty or look unusual you may have an old version.
Compare to the current minimal requirements in Documentation/Changes.

CentOS release 4.3 (Final)
Linux test2 2.6.9-34.EL #1 Wed Mar 8 00:07:35 CST 2006 i686 i686 i386 GNU/Linux

Gnu C gcc (GCC) 3.4.5 20051201 (Red Hat 3.4.5-2)
Gnu make 3.80
util-linux 2.12a
mount 2.12a
modutils 3.1-pre5
e2fsprogs 1.35
pcmcia-cs 3.2.7
PPP 2.4.2
isdn4k-utils 3.3
Linux C Library 2.3.4
Dynamic linker (ldd) 2.3.4
Procps 3.2.3
Net-tools 1.60
Kbd 1.12
Sh-utils 5.2.1
Modules Loaded ipt_state ip_conntrack iptable_filter ip_tables md5 ipv6 autofs4
dm_multipath button battery ac pcnet32 mii floppy dm_snapshot dm_zero dm_mirror ext3 jbd
dm_mod mptscsih mptsas mptspi mptfc mptscsi mptbase sd_mod scsi_mod

free reports:
total used free shared buffers cached
Mem: 320984 292512 28472 0 63324 169208
-/+ buffers/cache: 59980 261004
Swap: 655352 144 655208

/proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 4
model name : Intel(R) Pentium(R) D CPU 2.80GHz
stepping : 8
cpu MHz : 2788.474
cache size : 1024 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 5
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36
clflush dts acpi mmx fxsr sse sse2 ss nx pni ds_cpl
bogomips : 5598.30

<<>>
tag=abort01 stime=1151475512
cmdline=”ulimit -c 1024;abort01″
contacts=””
analysis=exit
initiation_status=”ok”
<<>>
abort01 1 PASS : Test passed
<<>>
duration=0 termination_type=exited termination_id=0 corefile=no
cutime=0 cstime=5
<<>>
accept01 1 PASS : bad file descriptor successful

—-中略—

スクリプトはctrl+Cで中断できる。
中断時は以下のメッセージとバージョンが表示される。

<<>>
INFO: pan reported some tests FAIL
LTP Version: LTP-20060615
#

**所見

どんなテストを行うかはドキュメントを確認するとして、実行中は
runalltest.shではLAが一時7~8程度まで上がるほど高負荷がかかった。
runltplite.shだとLAが27~30まで上昇(!!)した。
マニュアルに実行されるコマンドや実行例があるので、要確認。

[/pukiwiki]



-CentOS, GNU/Linux, infra
-

執筆者:


comment

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

CAPTCHA


関連記事

no image

ただのメモ:yumdownloaderでパッケージだけダウンロード

RedHat,CentOS yumリポジトリからパッケージをダウンロードだけしたいが 該当のパッケージがすでにインストール済みの場合、”yum install –downloa …

no image

ただのメモ:cron実行内容をloggerを使ってログファイルに書き出す

crontabでジョブを実行する際、標準出力やスクリプト内にechoで出力した内容を パイプにてloggerコマンドを使って/var/log/messagesへ書き出す。 オプション”-t …

no image

postfix SMTP-auth設定

[pukiwiki] &topicpath;   **▼SMTP-auth設定 [#e44ccef9]  (会社編)  ※自宅サーバ編は別途編集。 postfix+cyrus-SASLの組み …

no image

USB接続HDDのマウント(Linux)

[pukiwiki] 久しぶりにパーティション切ってフォーマットしようとしたら やり方を忘れてしまっていた… たまにしかやらないので手順を忘れやすい為、メモしとく(自分用にw)。 :OS|CentOS …

no image

haproxyを試す 3.SSLリバースプロキシを設定してみる

  HAProxyにてSSLリバースプロキシを設定してみるテスト。 設定環境はAWS EC2にてRightImageのCentOS6を使用しました。 HTTP/80については設定済みとなっている前提で …