Difference between revisions of "Performance"

From Noah.org
Jump to navigationJump to search
Line 41: Line 41:
 
</pre>
 
</pre>
  
 +
;LPT: [http://ltp.sourceforge.net Linux Test Project] This is a test suite composed of various third-party tests. This test suite is not available as a package for Ubuntu. It may be downloaded as a source.
 +
 +
;Autotest: [http://autotest.github.io Fully Automated Testing Under Linux]. This is primarily for testing the Linux kernel.
 +
 +
=== not used so much ===
 
The '''fio''' tool does not have a lot of documentation, but it looks interesting. The homepage is just a git repository: [http://git.kernel.dk/?p=fio.git;a=tree fio]. Under Ubuntu install the '''fio''' package. For documentation see '''/usr/share/doc/fio/''', especially '''/usr/share/doc/fio/examples/'''.
 
The '''fio''' tool does not have a lot of documentation, but it looks interesting. The homepage is just a git repository: [http://git.kernel.dk/?p=fio.git;a=tree fio]. Under Ubuntu install the '''fio''' package. For documentation see '''/usr/share/doc/fio/''', especially '''/usr/share/doc/fio/examples/'''.
  

Revision as of 22:39, 4 February 2014


See also

dstat

`dstat` is one of the more valuable tools for monitoring system performance. The output columns can be easily customized.

The default options are -cdngy. The following are options I commonly use. Many other are described in the manpage.

-c --cpu    system, user, idle, wait, hardware interrupt, software interrupt
-d --disk   disk read, write
-f --full   full listing when using certain options (--cpu, --int, --disk, --net, --swap)
-g --page   page in, out
-i --int    interrupts (see also --full option, --I option, and review /proc/interrupts)
-l --load   load average
-m --mem    memory used, buffers, cache, free
-n --net    network receive, send
-r --io     I/O read, write
-s --swap   swap used, free
-y --sys    system interrupts, context switches
   --vm     vm hard pagefaults, soft pagefaults, allocated, free

`dstat` also has many Python plugins stored in /usr/share/dstat/.

Some statistics require the lm-sensors package. Run `sensors-detect` after installing.

tools

apttitude -q -y install iozone3 stress cpuburn sysstat iotop smem powertop hardinfo hddtemp \
    dbench sysbench phoronix-test-suite iperf netperf netperfmeter \
    google-perftools \
    stressapptest \
    ceph-test \
    memtester \
    posixtest \
    fio lmbench
LPT
Linux Test Project This is a test suite composed of various third-party tests. This test suite is not available as a package for Ubuntu. It may be downloaded as a source.
Autotest
Fully Automated Testing Under Linux. This is primarily for testing the Linux kernel.

not used so much

The fio tool does not have a lot of documentation, but it looks interesting. The homepage is just a git repository: fio. Under Ubuntu install the fio package. For documentation see /usr/share/doc/fio/, especially /usr/share/doc/fio/examples/.

lmbench is ancient (its homepage is nearly 20 years old!), but it still works.

sysbench

The prepare step will create test files for subsequent stages. The files will be named in the form test_file.NN where NN is an integer starting with 0.

sysbench --test=fileio --file-total-size=16G --file-num=16 --file-test-mode=rndrw  --num-threads=16 prepare
sysbench --test=fileio --file-total-size=16G --file-num=16 --file-test-mode=rndrw  --num-threads=16 run
sysbench --test=fileio --file-total-size=16G --file-num=16 --file-test-mode=rndrw  --num-threads=16 cleanup

drive IO testing and performance measurement

Basic read and write speed testing. The options used below tests for IOPS, not bytes/sec. These options also favor sequential streaming of large blocks of data.

iozone -a -s 1048576 -g 1G -i 0 -i 1 -O

Bonnie++ tests will work OK with the defaults. You do have to set the user. Note that root is not normally recommended. Note that bonnie is the same as bonnie++ (bonnie is a sym-link to bonnie++). The output of bonnie++ is stupidly difficult to read. There is no way to fix this. It also dumps out CSV data, which is even harder to read without a spreadsheet.

bonnie -u root:root

drive stress testing

The stress command generates pure loads. It does not attempt to measure how the system handles this. You can combine this with other tools to get performance measurements.

This generates stress on /dev/sda. While this is running you may want to run "iostat 1 300 /dev/sda" in a different window.

stress --hdd 10 /dev/sda

CPU stress and burn

Install the Ubuntu package cpuburn. For each CPU core your system has run one instance of `burnP6` (for Intel P6 processors). Monitor the CPU usage and system load using `htop` or the tool of your choice. Monitor the temperature using `sensors` or some ACPI tool.

burnP6 &
burnP6 &
burnP6 &
burnP6 &
watch -n1 sensors
killall burnP6

System Platform Testing

Autotest is a fully automated test suite designed to test the entire Linux platform. It is based on a large collection third-party testing tools such as dbench, iozone, stress, sysbench, and lots more.