월: 2012 9월

디스크 벤치마크 툴 bonnie++

리눅스의 디스크 성능 측정을 위해서 간단하게는 dd로 파일을 생성해 볼 수 있습니다.

# dd if=/dev/zero of=/tmp/disk-test bs=1024 count 1024

간략하게 설명하면,  /dev/zero파일을 원본으로 해서 /tmp에 disk-test라는 파일을 생성하는데 block size는 1024이고 1024개를 생성해서 1MB 파일이 만들어집니다. 더 큰 용량으로 만들려면  bs 나 count를 조절해서 파일을 생성하면 됩니다. 저는 보통 1-2GB 정도의 파일을 생성해서 파일 쓰기 속도를 측정해 봅니다.

조금 더 자세하고 다양한 테스트를 해 볼 필요가 있을 때는 디스크 벤치마크 프로그램을 이용할 수 있습니다.

bonnie++는 아주 오래된 디스크 벤치마크 프로그램인데 저는 5년 전에 한 고객사의 요청으로 BMT를 진행하면서 디스크 성능측정에 사용해 본 적이 있었고, 최근에 한 시스템의 디스크 성능이 궁금해져서 사용해 보았습니다. OS간의 디스크  IO성능 BMT나, 내장디스크와 외장 디스크의 속도차이, 디스크 구성/연결 방식,  LVM 구성시 stripe관련 옵션에 따른 차이 등을 테스트 해보고 싶을 때 유용한 프로그램입니다.

홈페이지는 http://www.coker.com.au/bonnie++/ 입니다. 이곳에서  소스 다운로드가 가능합니다.

설치는 컴파일 방식이므로 gcc와 g++이  설치되어 있어야 합니다. 플랫폼이나 배포판에 따라 필요한 패키지나 라이브러리가 있을 수 있으니 컴파일 시 에러를 보고 추가해 주어야 하는데 제가 테스트한 환경은 RHEL 5.8 on IBM system Z 입니다.

– 설치

1. 다운로드한 소스 압축 파일을 서버에 업로드하고 압축을 해제하면 디렉토리가 생성됩니다.

$ cd bonnie++-1.03
$ ls
bon_csv2html     bon_csv2txt.in  bonnie.8      bonnie++.spec     changelog.txt  copyright.txt  install.sh   readme.html    zcav.8
bon_csv2html.1   bon_file.cpp    bonnie++.8    bonnie++.spec.in  conf.h         credits.txt    Makefile     semaphore.cpp  zcav.cpp
bon_csv2html.in  bon_file.h      bonnie++.cpp  bon_suid.cpp      conf.h.in      debian         Makefile.in  semaphore.h
bon_csv2txt      bon_io.cpp      bonnie.h      bon_time.cpp      configure      forkit.cpp     port.h       sh.common
bon_csv2txt.1    bon_io.h        bonnie.h.in   bon_time.h        configure.in   forkit.h       port.h.in    sun

2. configure를 수행합니다.

$ ./configure
checking for g++... g++
checking for C++ compiler default output... a.out
checking whether the C++ compiler works... yes

– 이하생략 –

3. make ; make install을 실행하여 컴파일 및 설치를 진행합니다.

$ make
g++ -O2  -DNDEBUG -Wall -W -Wshadow -Wpointer-arith -Wwrite-strings -pedantic -ffor-scope   -c bon_io.cpp
g++ -O2  -DNDEBUG -Wall -W -Wshadow -Wpointer-arith -Wwrite-strings -pedantic -ffor-scope   -c bon_file.cpp
g++ -O2  -DNDEBUG -Wall -W -Wshadow -Wpointer-arith -Wwrite-strings -pedantic -ffor-scope   -c bon_time.cpp
In file included from /usr/lib/gcc/s390x-redhat-linux/4.1.2/../../../../include/c++/4.1.2/backward/algo.h:59,
from bon_time.cpp:22:

– 이하생략 –

$ make install
mkdir -p /app/bin /app/sbin
/usr/bin/install -c -s bonnie++ zcav zcav /app/sbin
/usr/bin/install -c bon_csv2html bon_csv2txt /app/bin
mkdir -p /app/man/man1 /app/man/man8
/usr/bin/install -c -m 644 bon_csv2html.1 bon_csv2txt.1 /app/man/man1
/usr/bin/install -c -m 644 bonnie++.8 zcav.8 zcav.8 /app/man/man8
/usr/bin/install: will not overwrite just-created `/app/man/man8/zcav.8' with `zcav.8'
make: *** [install] Error 1

저는 설치시에 zcav의 man 파일 설치 과정에서 문제가 발생했는데 실행과는 무관해서 해결하지는 않았습니다.

– 실행

$ ./bonnie++ -d /tmp -s 1024:512 -n 100 -m `hostname` -r 512 -u0:0 > `hostname`.ECKD_result.txt

bonnie에는 많은 옵션이 있는데 위에서 적용한 옵션은 /tmp 를 대상으로 테스트 파일 전체 용량은 1GB, 생성되는 파일의 단위는 512Byte, 파일 갯수는 100개, 메모리는 512MB를 사용하고, 이 테스트를 root 권한으로 실행하는 것으로 지정하였습니다. 이외에도 많은 옵션이 있습니다.

– 결과

Version  1.03       ------Sequential Output------ --Sequential Input- --Random-
-Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine   Size:chnk K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
lnxtest     1G:512 24095  86 92748  69 132762  86 28328  91 398001  88 +++++ +++
------Sequential Create------ --------Random Create--------
-Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
100 59403  92 +++++ +++ 61671  84 56627  85 +++++ +++ 70131  94
lnxtest,1G:512,24095,86,92748,69,132762,86,28328,91,398001,88,+++++,+++,100,59403,92,+++++,+++,61671,84,56627,85,+++++,+++,70131,94

테스트 결과는 위와 같이 출력되는데 Sequential, Random 입출력 테스트를 하고 각 항목에 대한 CPU사용률과 결과가 함께 출력이 됩니다. 이때  +로 표시되는 부분은 테스트 옵션이 부적절 하거나 측정이 부정확한 원인으로 결과를 표시할 수 없는 항목들입니다.

Advertisements

Deploying Oracle on zEnterprise Reaps Many Rewards

1년이나 지난 기사입니다만, 제가 이제야 이 기사를 보게 되어서 링크합니다.

인터뷰 형식의 기사이며, zEnterprise에서 Oracle을 운영함에 있어 다양한 질문들에 대한 답변이 게재되어있습니다. 참고하세요~

Clients reliant on Oracle database on IBM System z eagerly anticipated the release and the ability to use it on the newest mainframe in a high-performance, scalable and easy-to-virtualize environment. Clients not yet using Oracle database on System z and even clients without a mainframe will find that using Oracle database on a mainframe significantly reduces IT costs in installations with 50 or more cores of Linux workload. It also helps to further simplify and reduce IT costs for those with a significant number of distributed servers.

Deploying Oracle on zEnterprise Reaps Many Rewards

System z, IBM 스마터 컴퓨팅 이니셔티브의 중심에 서다

전자신문에 System z (IBM Enterprise Linux Server)에 대한 이야기가 실렸네요. 2007년부터 시작한 IBM 내부 서버 통합 프로젝트인 “Big Green” 프로젝트에 대한 내용을 다루고 있습니다. 꽤 자세히 설명해놓았으니, 한번 읽어보시는 것도 좋겠네요.

2007년, IBM은 “Big Green” 프로젝트를 공개하였다. “Big Green” 프로젝트는 핵심 비즈니스 운영을 지원하는 IBM의 내부 데이터센터에 배치된 계속적으로 증가하는 서버 문제를 해결하기 위해 설계되었다. 이 프로젝트는 3,900대에 흩어져 있는 서버들의 워크로드들을 약 30대의 Sysem z로 통합 통합하는 것을 포함하였다. 목표는 비용과 에너지 소비 및 상면 면적의 대폭적인 절감이었다.

System z, IBM 스마터 컴퓨팅 이니셔티브의 중심에 서다

Linux Health Checker 설치/사용기

이전에 포스팅 된 Linux Health Checker 소개를 보고 실제로 설치/사용해 봤습니다.

테스트 환경은 RHEL 5.8 for system Z입니다.

설치용 RPM은 에러 발생!해서 SRC RPM 설치 했네요.
[root@lnxtest /tmp]$ rpm -ivh lnxhc-1.0-1.src.rpm

rpm rebuild 진행합니다.
[root@lnxtest /tmp]$ cd /usr/src/redhat/SRPMS/SPECS/
[root@lnxtest /usr/src/redhat/SPECS]$ ls
lnxhc.spec
[root@lnxtest /usr/src/redhat/SPECS]$ rpmbuild -ba lnxhc.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.42332
— 중간 생략
+ exit 0
[root@lnxtest /usr/src/redhat/SPECS]$ cd /usr/src/redhat/RPMSnoarch/
[root@lnxtest /usr/src/redhat/RPMS/noarch]$ ls
lnxhc-1.0-1.noarch.rpm

생성된 RPM 파일로 설치 합니다.

[root@lnxtest /usr/src/redhat/RPMS/noarch]$ rpm -ivh lnxhc-1.0-1.noarch.rpm
Preparing… ########################################### [100%]
1:lnxhc ########################################### [100%]

자.. 이제 실행해 보겠습니다.
실행해보니 시스템의 문제점을 분석해서
어떻게 설정해야 하는지 친절하게 안내까지 해 주네요.  잘 활용하면 상당히 유용하겠네요.

출력결과가 아주 깁니다.

[root@lnxtest /usr/src/redhat/RPMS/noarch]$ lnxhc run
Creating user directory ‘/root/.lnxhc’
Collecting system information
Changing user to ‘root’ for command ‘/sbin/multipath -ll’
Running checks (24 checks)
CHECK NAME HOST RESULT
============================================================================================================================================================
boot_zipl_update_required ………….. lnxtest SUCCESS
css_ccw_availability ………………. lnxtest SUCCESS
css_ccw_chpid …………………….. lnxtest SUCCESS
css_ccw_ignored_online …………….. lnxtest SUCCESS
css_ccw_no_driver …………………. lnxtest EXCEPTION-MED

>EXCEPTION css_ccw_no_driver.no_driver(medium)
One or more I/O devices are not associated with a device
driver: 0.0.0009

css_ccw_unused_devices …………….. lnxtest SUCCESS
dasd_zvm_nopav ……………………. lnxtest SUCCESS
fs_disk_usage …………………….. lnxtest SUCCESS
fs_inode_usage ……………………. lnxtest SUCCESS
init_runlevel …………………….. lnxtest SUCCESS
mm_oom_killer_triggered ……………. lnxtest SUCCESS
net_bond_dev_chpid ………………… lnxtest NOT APPLICABLE
net_hsi_tx_errors …………………. lnxtest NOT APPLICABLE
net_inbound_packets ……………….. lnxtest SUCCESS
net_qeth_buffercount ………………. lnxtest EXCEPTION-MED

>EXCEPTION net_qeth_buffercount.inefficient_buffercount(medium)
These network interfaces do not have the expected number of
buffers: eth0, eth1

ras_dump_on_panic …………………. lnxtest EXCEPTION-HIGH

>EXCEPTION ras_dump_on_panic.no_standalone(high)
The dump-on-panic function is not enabled

sec_non_root_uid_zero ……………… lnxtest SUCCESS
sec_services_insecure ……………… lnxtest SUCCESS
storage_invalid_multipath ………….. lnxtest SUCCESS
sys_sysctl_call_home ………………. lnxtest NOT APPLICABLE
sys_sysctl_panic ………………….. lnxtest SUCCESS
sys_sysinfo_cpu_cap ……………….. lnxtest NOT APPLICABLE
sys_tty_console_getty ……………… lnxtest SUCCESS
sys_tty_usage …………………….. lnxtest EXCEPTION-MED

>EXCEPTION sys_tty_usage.unused_ttys(medium)
These terminals are unused: /dev/ttyS, /dev/ttysclp
20 checks run, 4 exceptions found (use ‘lnxhc run –replay -V’ for details)
[root@lnxtest /usr/src/redhat/RPMS/noarch]$ lnxhc run –replay -V
Replaying check results generated on 2012-06-14 18:13:01
CHECK NAME HOST RESULT
============================================================================================================================================================
boot_zipl_update_required ………….. lnxtest SUCCESS
css_ccw_availability ………………. lnxtest SUCCESS
css_ccw_chpid …………………….. lnxtest SUCCESS
css_ccw_ignored_online …………….. lnxtest SUCCESS
css_ccw_no_driver …………………. lnxtest EXCEPTION-MED

>EXCEPTION css_ccw_no_driver.no_driver(medium)

SUMMARY
One or more I/O devices are not associated with a device
driver: 0.0.0009

EXPLANATION
One or more I/O devices cannot be used properly because they
not associated

with a device driver.

Possible reasons for this problem are that the required de-
vice driver module

has been unloaded, that an existing association between the
device and the

device driver has been removed, or that the device is not
supported.

The following I/O devices are not associated with a device
driver:

BUS ID DevType CU Type
0.0.0009 0000/00 3215/00

 

Each device has a device type and a control unit (CU) type.
Each device driver

provides a list of supported combinations of device type and
CU type. Linux

uses this information to associate devices with device
drivers. The sysfs

directories of devices with a device-driver association in-
clude a symbolic

link “driver”. This link points to the sysfs directory of the
associated

device driver.

To verify that an I/O device with bus ID <device_bus_id> is
not associated with

a device driver, confirm that there is no symbolic link
“driver” in the

following sysfs directory:

/sys/bus/ccw/devices/<device_bus_id>

SOLUTION
1. If the kernel module of the required device driver has
been unloaded,

load it again. For example, issue:

modprobe <module_name>

where <module_name> is the name of the required device driver
module.

You can use the “modinfo” command to find out which combina-
tions of device type

and CU type are supported by a device driver module.

2. Try to create the missing association of the I/O device
with its

device driver. For example, issue:

echo <device_bus_id> > /sys/bus/ccw/drivers/<module_name>/bind

Alternatively, try to create the association by issuing:

echo <device_bus_id> > /sys/bus/ccw/drivers_probe

3. Verify that the device is supported.

4. If you cannot establish an association between the I/O de-
vice and a

device driver, contact your support organization.

REFERENCE
For information about supported devices, see:

– The release notes of your distribution

– The applicable version of “Device Drivers, Features, and
Commands”.

You can find this publication at

http://www.ibm.com/developerworks/linux/linux390/documentation_dev.html

For information about investigating kernel modules, see the
“modinfo” man page.

css_ccw_unused_devices …………….. lnxtest SUCCESS
dasd_zvm_nopav ……………………. lnxtest SUCCESS
fs_disk_usage …………………….. lnxtest SUCCESS
fs_inode_usage ……………………. lnxtest SUCCESS
init_runlevel …………………….. lnxtest SUCCESS
mm_oom_killer_triggered ……………. lnxtest SUCCESS
net_bond_dev_chpid ………………… lnxtest NOT APPLICABLE
net_hsi_tx_errors …………………. lnxtest NOT APPLICABLE
net_inbound_packets ……………….. lnxtest SUCCESS
net_qeth_buffercount ………………. lnxtest EXCEPTION-MED

>EXCEPTION net_qeth_buffercount.inefficient_buffercount(medium)

SUMMARY
These network interfaces do not have the expected number of
buffers: eth0, eth1

EXPLANATION
The number of buffers of one or more network interfaces di-
verts from the specified rule. The most suitable number of
buffers for a particular interface depends on the available
memory. To allow for memory constraints, many Linux distribu-
tions use a small number of buffers by default. On Linux in-
stances with ample memory and a high traffic volume, this can
lead to performance degradation, as incoming packets are
dropped and have to be resent by the originator.

For the current main memory, 1.96 GB, interfaces should have
64 buffers.

The following interfaces have a different number of buffers:

Network Current Recommended
Interface Buffer Count Buffer Count
eth0 n/a 64
eth1 n/a 64

 

To find out if there are problems with the affected inter-
faces, check the output of the “‘ifconfig” command for errors
and dropped packets.

Use the “lsqeth” command to confirm the current setting for
the number of buffers. In the default command output, the
buffer count is shown as the value for the “buffer_count” at-
tribute. With the -p option, the output is in table format
and the buffer count is shown in the “cnt” column.

SOLUTION
For each affected interface, change the number of buffers to
64.

To temporarily change the number of buffers on a running Lin-
ux instance, run a command of this form:

Offline the interface (Before offline make sure you are not
running any critical task using this interface)

# echo 0 > /sys/devices/qeth/<device_bus_id>/online

Change the buffer count

# echo 64 > /sys/devices/qeth/<device_bus_id>/buffer_count

Online the interface

# echo 1 > /sys/devices/qeth/<device_bus_id>/online

where <device_bus_id> is the bus ID of the qeth group device
that corresponds to the interface. In the “lsqeth” output,
this is the first of the three listed bus IDs.

How to make this setting persistent across reboots depends on
your distribution. Some distributions set the number through
scripts located below /etc/sysconfig, other distributions use
udev rules. For details, see the documentation that is pro-
vided with your distribution.

The suggested buffer size is derived from a general best-
practice rule that is expressed by the “recommended_buffer-
count” check parameter, and that works well in many setups.
If your current settings work to your satisfaction and you do
not want to change them, you can adapt the “recommend-
ed_buffercount” parameter to your needs or omit this check to
suppress further warnings in the future.

REFERENCE
For more information, see the section about inbound buffers
in the qeth chapter of “Device Drivers, Features, and Com-
mands”. You can obtain this publication from

http://www.ibm.com/developerworks/linux/linux390/documentation_dev.html

ras_dump_on_panic …………………. lnxtest EXCEPTION-HIGH

>EXCEPTION ras_dump_on_panic.no_standalone(high)

SUMMARY
The dump-on-panic function is not enabled

EXPLANATION
Your Linux instance is not configured for dump-on-panic.

Configure dump-on-panic to automatically create a dump if a
kernel panic

occurs.

SOLUTION
To configure dump-on-panic, complete these steps:

1. Plan and prepare your dump device.
2. Edit /etc/sysconfig/dumpconf and configure the dump-on-
panic action.
Possible actions are dump, dump_reipl, or vmcmd with a CP
VMDUMP command.
3. Activate the dumpconf service with chkconfig and then
start the service.

REFERENCE
See the dumpconf man page.

For more information about the dump tools available for Linux
on System z,

see “Using the Dump Tools”.

You can obtain this publication from

http://www.ibm.com/developerworks/linux/linux390/documentation_dev.html

sec_non_root_uid_zero ……………… lnxtest SUCCESS
sec_services_insecure ……………… lnxtest SUCCESS
storage_invalid_multipath ………….. lnxtest SUCCESS
sys_sysctl_call_home ………………. lnxtest NOT APPLICABLE
sys_sysctl_panic ………………….. lnxtest SUCCESS
sys_sysinfo_cpu_cap ……………….. lnxtest NOT APPLICABLE
sys_tty_console_getty ……………… lnxtest SUCCESS
sys_tty_usage …………………….. lnxtest EXCEPTION-MED

>EXCEPTION sys_tty_usage.unused_ttys(medium)

SUMMARY
These terminals are unused: /dev/ttyS, /dev/ttysclp

EXPLANATION
There are one or more unused terminal devices. Terminal de-
vices

are intended to provide a user interface to a Linux instance.

Without an associated program, a terminal device does not
serve

this purpose.

These terminal devices are unused:

/dev/ttyS[2-3]
/dev/ttysclp0

 

To confirm that no program is configured for a terminal de-
vice,

issue “ps -ef |grep <terminal>”. Where <terminal> specifies
the

terminal device node without the leading /dev/.

SOLUTION
Configure a getty program for each unused terminal. Depend-
ing on

your distribution, you might have to create an inittab entry
or an

Upstart job. For details, see the documentation that is pro-
vided

with your distribution.

If you want to accept unused terminals, add them to the “ex-
clude_tty”

check parameter to suppress this warning in the future.

REFERENCE
For general information about terminals, see

“Device Drivers, Features, and Commands”.

You can obtain this publication from:

http://www.ibm.com/developerworks/linux/linux390/documentation_dev.html

For more specific information, see the documentation that is
provided

with your distribution. Also see the man page of the “ps”
command.
Check results: Exceptions: Run-time:
SUCCESS……..: 16 High………: 1 Min per check.: 0.006s
EXCEPTION……: 4 Medium…….: 3 Max per check.: 0.044s
NOT APPLICABLE.: 4 Low……….: 0 Avg per check.: 0.022s
FAILED SYSINFO.: 0 Total……..: 4 Total………: 1.297s
FAILED CHKPROG.: 0
Total……….: 24