Author Topic: check iodisk and bonnie++ benchmark , smtp postal benchmark ครับ  (Read 18495 times)

golfreeze

  • Administrator
  • Hero Member
  • *****
  • Posts: 2140
    • View Profile
    • นั่งสมาธิ สติปัฏฐานสี่ พาเที่ยววัด แนะนำวัด แจกcd ธรรมะฟรี
    • Email
check iodisk and bonnie++ benchmark , smtp postal benchmark ครับ
« on: ตุลาคม 12, 2011, 02:09:05 PM »
#### check write file on disk
#dd if=/dev/zero of=/dummy.dat bs=10240 count=1000000

###check download speed from your environment
wget -O /dev/null http://speedtest.wdc01.softlayer.com/downloads/test10.zip

####check benchmark on linux ทำการเทส io ไปที่ partition /mbox
#bonnie++ -d /mbox -s 512 -r 256 -u root

ถ้า bonnie++ แบบเต็มรูปแบบประมาณ 32G ครับ ทำการเทส io ไปที่ partition /mbox
#bonnie++ -d /mbox -u root

ถ้ายังไม่มี bonnie++ ก็ download ได้เลยครับ

#wget https://packages.endpoint.com/rhel/5/os/x86_64/bonnie++-1.03c-1.x86_64.rpm
หรือ
#wget http://golfreeze.packetlove.com/download/Linux_packets/bonnie++-1.03c-1.x86_64.rpm

#rpm -ivh bonnie++-1.03c-1.x86_64.rpm
« Last Edit: มีนาคม 02, 2015, 04:30:20 PM by golfreeze »

golfreeze

  • Administrator
  • Hero Member
  • *****
  • Posts: 2140
    • View Profile
    • นั่งสมาธิ สติปัฏฐานสี่ พาเที่ยววัด แนะนำวัด แจกcd ธรรมะฟรี
    • Email
Re: check iodisk and bonnie++
« Reply #1 on: กุมภาพันธ์ 07, 2012, 11:20:18 AM »
ถ้าท่านต้องการ เทส benchmark สำหรับ smtp

ก็ตัวนี้เลยครับ

postal

http://doc.coker.com.au/projects/postal/

สำหรับใน bsd ก็
#cd /usr/ports/benchmarks/postal
#make config เลือก support SSL ด้วย
#make install clean

เรียบร้อยครับ
« Last Edit: กุมภาพันธ์ 07, 2012, 11:25:02 AM by golfreeze »

golfreeze

  • Administrator
  • Hero Member
  • *****
  • Posts: 2140
    • View Profile
    • นั่งสมาธิ สติปัฏฐานสี่ พาเที่ยววัด แนะนำวัด แจกcd ธรรมะฟรี
    • Email
Re: check iodisk and bonnie++ , postal ครับ
« Reply #2 on: เมษายน 20, 2012, 10:37:23 AM »
command postal for test SMTP/SMTP-ssl benchmark
command rabid for test IMAP/POP/IMAP-ssl/POP-ssl benchmark

ใช้งาน

ใส่ sender email account ในไฟล์ sender_file

#postal -m 500 -t 20 -c 40 -f sender_file 10.0.1.180 /home/golf/userlist

โดยที่ userlist ใส่ account ปลายทางที่เราต้องการส่งไปหานะครับ

ลองดูรายละเอียด เพิ่มเติมได้นะครับใน #man postal

 The  messages-per-connection  parameter is for sending more than one message per SMTP connection.  The default value is "1".  A value of -1 means to send an indefinite number of messages on one connection (~4 billion).  If a value > 1 is specified then the number sent on each connection is a random number between  1  and  the number  specified.   For  simulating a mail server connected directly to the net use a value of 2 or 3.  For simulating a mail server connected to a front-end relay use a large number.  For testing for bugs in your mail server use the value 0 and leave it running for a week.  ;)  A value of 0 means to disconnect without sending any messages.  Good for testing a LocalDirector.
« Last Edit: มิถุนายน 24, 2015, 02:27:09 PM by golfreeze »

golfreeze

  • Administrator
  • Hero Member
  • *****
  • Posts: 2140
    • View Profile
    • นั่งสมาธิ สติปัฏฐานสี่ พาเที่ยววัด แนะนำวัด แจกcd ธรรมะฟรี
    • Email
Re: check iodisk and bonnie++ , postal ครับ
« Reply #3 on: พฤษภาคม 14, 2012, 04:15:35 PM »
download postal 7.2

#wget http://www.coker.com.au/postal/postal-0.72.tgz
#gunzip postal-0.72.tgz
#tar xf postal-0.72.tar

ทำการ compile ครับ
#cd postal-0.72

##ลงตัว compiler ให้ครบก่อน
yum install compat-gcc-34-c++.x86_64 gcc.x86_64
yum install gcc-c++.x86_64

#./configure
#make
แล้วเจอ error ดังกล่าว
error: ISO C++ does not support `long long'

ทำการแก้ค่า Makefile.in ทำการเอา option "-pedantic" ออกจาก
WFLAGS=-Wall -W -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Wcast-qual -pedantic
ให้เหลือแค่
WFLAGS=-Wall -W -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Wcast-qual

หลังจากนั้นให้ทำการรัน ./configure ใหม่ ครับ แล้วก็ make ใหม่ก็จะผ่านไปได้ครับ
หลังจากนั้นทำการ make install
#./configure
#make
#make install
ก็จะสามารถใช้งาน postal และ rabid ได้ครับผม
ลองดูนะครับ

##Reference site
http://doc.coker.com.au/projects/postal/
« Last Edit: พฤษภาคม 15, 2012, 03:51:57 PM by golfreeze »

golfreeze

  • Administrator
  • Hero Member
  • *****
  • Posts: 2140
    • View Profile
    • นั่งสมาธิ สติปัฏฐานสี่ พาเที่ยววัด แนะนำวัด แจกcd ธรรมะฟรี
    • Email
Re: check iodisk and bonnie++ benchmark , smtp postal benchmark ครับ
« Reply #4 on: มีนาคม 25, 2013, 09:20:57 AM »
#  /usr/local/sbin/bonnie++ -d /data -s 16G -f -b -u root

Using uid:100, gid:101.
Writing intelligently...done
Rewriting...done
Reading intelligently...done
start 'em...done...done...done...
Create files in sequential order...done.
Stat files in sequential order...done.
Delete files in sequential order...done.
Create files in random order...done.
Stat files in random order...done.
Delete files in random order...done.

Version 1.03d       ------Sequential Output------ --Sequential Input- --Random-      

                    -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--      

Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP   
server_name     16G   - -  51181  55 23045  47   - -        56212  46 294.1   4   

                    ------Sequential Create------ --------Random Create--------

                    -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--

              files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
                 16   145   7 +++++ +++   162   6   162   6 +++++ +++   152   6

server,16G,,,51181,55,23045,47,,,56212,46,294.1,4,16,145,7,+++++,+++,162,6,162,6,+++++,+++,152,6


Here, we see output (WRITE output to file) speed is 51M/s, input (READ input from file) speed is 56 M/s.

Bonnie also shows:

1. Re-write speed, which is read, do change, write back and re-read (simulate database operation).  
2. Seek speed, which is always having seek request so disk stays busy.
« Last Edit: ธันวาคม 04, 2013, 03:38:17 PM by golfreeze »

golfreeze

  • Administrator
  • Hero Member
  • *****
  • Posts: 2140
    • View Profile
    • นั่งสมาธิ สติปัฏฐานสี่ พาเที่ยววัด แนะนำวัด แจกcd ธรรมะฟรี
    • Email
Re: check iodisk and bonnie++ benchmark , smtp postal benchmark ครับ
« Reply #5 on: พฤษภาคม 08, 2013, 02:18:27 PM »
##iostat( input/output statistic) เชค CPU utilize และ Disk utilization
ส่วน IOPS (Input/Output operate per sec)

#iostat 1
จะดูทั้ง disk I/O กับ CPU
โดยมีค่า tps เป็น transfers (I/O requests) per second ที่เกิดขึ้นกับ device นั้น , device ในที่นี่ หมายถึง partition แต่ละ drive นั่นเอง.
« Last Edit: พฤษภาคม 08, 2013, 02:33:26 PM by golfreeze »

golfreeze

  • Administrator
  • Hero Member
  • *****
  • Posts: 2140
    • View Profile
    • นั่งสมาธิ สติปัฏฐานสี่ พาเที่ยววัด แนะนำวัด แจกcd ธรรมะฟรี
    • Email
Re: check iodisk and bonnie++ benchmark , smtp postal benchmark ครับ
« Reply #6 on: พฤษภาคม 08, 2013, 02:25:35 PM »
Below is the sample default output, which displays a single history since boot report for all CPU and Devices.
   
$ iostat
Linux 2.6.18-92.1.22.el5 (xxxxxxx)  
 
avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           1.24    0.88    0.55    0.83    0.00   96.51
 
Device:            tps   Blk_read/s   Blk_wrtn/s   Blk_read   Blk_wrtn
hda               2.89        34.98        52.43   19131771   28671500
dm-0              7.27        34.67        52.11   18960146   28500800
dm-1              0.08         0.31         0.31     168184     170696

The first report generated by the iostat command is the CPU Utilization Report. For multiprocessor systems, the CPU values are global averages among all processors. The report has the following format:

    %user: Show the percentage of CPU utilization that occurred while executing at the user level (application).
    %nice: Show the percentage of CPU utilization that occurred while executing at the user level with nice priority.
    %system: Show the percentage of CPU utilization that occurred while executing at the system level (kernel).
    %iowait: Show the percentage of time that the CPU or CPUs were idle during which the system had an outstanding disk I/O request.
    %steal: Show the percentage of time spent in involuntary wait by the virtual CPU or CPUs while the hypervisor was servicing another virtual processor.
    %idle: Show the percentage of time that the CPU or CPUs were idle and the system did not have an outstanding disk I/O request.

The second report generated by the iostat command is the Device Utilization Report. The device report provides statistics on a per physical device or partition basis. Block devices for which statistics are to be displayed may be entered on the command line. Partitions may also be entered on the command line providing that option -x is not used. If no device nor partition is entered, then statistics are displayed for every device used by the system, and providing that the kernel maintains statistics for it. If the ALL keyword is given on the command line, then statistics are displayed for every device defined by the system, including those that have never been used. The report may show the following fields, depending on the flags used:

    Device: This column gives the device (or partition) name.
    tps: Indicate the number of transfers per second that were issued to the device.
    Blk_read/s: Indicate the amount of data read from the device expressed in a number of blocks per second.
    Blk_wrtn/s: Indicate the amount of data written to the device expressed in a number of blocks per second.
    Blk_read: The total number of blocks read.
    Blk_wrtn: The total number of blocks written.
    kB_read/s: Indicate the amount of data read from the device expressed in kilobytes per second.
    kB_wrtn/s: Indicate the amount of data written to the device expressed in kilobytes per second.
    kB_read: The total number of kilobytes read.
    kB_wrtn: The total number of kilobytes written.
    MB_read/s: Indicate the amount of data read from the device expressed in megabytes per second.
    MB_wrtn/s: Indicate the amount of data written to the device expressed in megabytes per second.
    MB_read: The total number of megabytes read.
    MB_wrtn: The total number of megabytes written.
    rrqm/s: The number of read requests merged per second that were queued to the device.
    wrqm/s: The number of write requests merged per second that were queued to the device.
    r/s: The number of read requests that were issued to the device per second.
    w/s: The number of write requests that were issued to the device per second.
    rsec/s: The number of sectors read from the device per second.
    wsec/s: The number of sectors written to the device per second.
    rkB/s: The number of kilobytes read from the device per second.
    wkB/s: The number of kilobytes written to the device per second.
    rMB/s: The number of megabytes read from the device per second.
    wMB/s: The number of megabytes written to the device per second.
    avgrq-sz: The average size (in sectors) of the requests that were issued to the device.
    avgqu-sz: The average queue length of the requests that were issued to the device.
    await: The average time (in milliseconds) for I/O requests issued to the device to be served. This includes the time spent by the requests in queue and the time spent servicing them.
    svctm: The average service time (in milliseconds) for I/O requests that were issued to the device.
    %util: Percentage of CPU time during which I/O requests were issued to the device (bandwidth utilization for the device). Device saturation occurs when this value is close to 100%.

Below are some frequently used examples ;

    Display a continuous device report at two second intervals.

$ iostat -d 2
Linux 2.6.18-92.1.22.el5 (xxxxxxxxxxx)      
 
Device:            tps   Blk_read/s   Blk_wrtn/s   Blk_read   Blk_wrtn
hda               2.90        34.99        52.45   19203049   28782692
dm-0              7.28        34.68        52.14   19031378   28611760
dm-1              0.08         0.31         0.31     168224     170928
 
Device:            tps   Blk_read/s   Blk_wrtn/s   Blk_read   Blk_wrtn
hda               2.00         0.00        48.00          0         96
dm-0              6.00         0.00        48.00          0         96
dm-1              0.00         0.00         0.00          0          0
« Last Edit: พฤษภาคม 08, 2013, 02:27:42 PM by golfreeze »

golfreeze

  • Administrator
  • Hero Member
  • *****
  • Posts: 2140
    • View Profile
    • นั่งสมาธิ สติปัฏฐานสี่ พาเที่ยววัด แนะนำวัด แจกcd ธรรมะฟรี
    • Email
Re: check iodisk and bonnie++ benchmark , smtp postal benchmark ครับ
« Reply #7 on: ธันวาคม 04, 2013, 01:42:10 PM »
ถ้าจะเชคเกี่ยวกับ mem และ virtual mem ก็สามารถดูได้จาก vmstat ซึ่งจะอธิบายว่า ณ เวลาที่ดูนั้น มีการใช้งาน memory ไปมากน้อยเพียงใด และเหลือให้รองรับการใช้งานเท่าไร
#vmstat 1

golfreeze

  • Administrator
  • Hero Member
  • *****
  • Posts: 2140
    • View Profile
    • นั่งสมาธิ สติปัฏฐานสี่ พาเที่ยววัด แนะนำวัด แจกcd ธรรมะฟรี
    • Email
Re: check iodisk and bonnie++ benchmark , smtp postal benchmark ครับ
« Reply #8 on: ธันวาคม 04, 2013, 03:31:14 PM »
ในกรณีต้องการ ใช้งาน bonnie++ แต่ขึ้น message แบบนี้

File size should be double RAM for good results, RAM is 16012M.


เราสามารถ ตั้งค่า เพื่อแก้ไขได้ดังนี้
ตั้งค่า size ของ write = 10G
ตั้งค่า size ของ read = ครึ่งหนึ่งของ size write = 5G
#bonnie++ -d /test_disk -s 10G -r 5G -u root

golfreeze

  • Administrator
  • Hero Member
  • *****
  • Posts: 2140
    • View Profile
    • นั่งสมาธิ สติปัฏฐานสี่ พาเที่ยววัด แนะนำวัด แจกcd ธรรมะฟรี
    • Email
Re: check iodisk and bonnie++ benchmark , smtp postal benchmark ครับ
« Reply #9 on: ธันวาคม 04, 2013, 03:40:52 PM »
ผมลองเทส ค่า จาก bonnie++ ให้ดูอีกครั้งหนึ่ง เพื่อจะได้ เห็นค่า Write , Read

[root@Backup00 golf_backup]# bonnie++ -d /golf_backup -s 32G -u root
Using uid:0, gid:0.
Writing with putc()...done
Writing intelligently...done
Rewriting...done
Reading with getc()...done
Reading intelligently...done
start 'em...done...done...done...
Create files in sequential order...done.
Stat files in sequential order...done.
Delete files in sequential order...done.
Create files in random order...done.
Stat files in random order...done.
Delete files in random order...done.
Version  1.03       ------Sequential Output------ --Sequential Input- --Random-
                    -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
Backup00.mh.ntt 32G 72106  99 382363  76 186946  40 86269  97 587301  43  1012   2
                    ------Sequential Create------ --------Random Create--------
                    -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
              files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
                 16 +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++
Backup00.mh.ntt.co.th,32G,72106,99,382363,76,186946,40,86269,97,587301,43,1012.0,2,16,+++++,+++,+++++,+++,+++++
ในเคสนี้ จะเห็นได้ว่า WRITE IO = 382MB/s  , READ IO = 587MB/s
ตัวนี้ เป็น RAID10 ครับที่ /golf_backup  

golfreeze

  • Administrator
  • Hero Member
  • *****
  • Posts: 2140
    • View Profile
    • นั่งสมาธิ สติปัฏฐานสี่ พาเที่ยววัด แนะนำวัด แจกcd ธรรมะฟรี
    • Email
Re: check iodisk and bonnie++ benchmark , smtp postal benchmark ครับ
« Reply #10 on: มีนาคม 02, 2015, 04:31:21 PM »
#IOzone เครื่องมือ benchmark tool แนะนำอีกตัวครับ

    more comprehensive than bonnie++ and less likely to report anomalous result
    see www.iozone.org
    Install on Debian/Ubuntu with apt-get install iozone3
    to install and run on CentOS 64bit with 6GB RAM

IOVER=3_408
ARCH=linux-AMD64 #or linux
wget http://www.iozone.org/src/current/iozone$IOVER.tar
tar -xf iozone$IOVER.tar
cd iozone$IOVER/src/current/
make $ARCH
mv iozone ~
cd ~
rm -f iozone$IOVER.tar
rm -Rf iozone$IOVER
./iozone -Ra -i 0 -i 1 -g 8G -b iozone.wks