Menu

Home

Vladimir Ryabtsev

Easy Performance Tester

Basics

This utility measures throughput of main hardware components: disks, CPU and memory as it seen from application running on current computer. Standard operating system calls are used for read/write access to memory and disks. The results shown should not be compared to results of other performance testing utilities which can use special modes for memory and disk access, but you can compare the test results of this utility from different computers, or the results from the same computer under different conditions.
This utility was initially designed to perform basic automated tests on virtual machines where problems of lack of resources could suddenly occur.

Syntax

The utility shows its syntax on /? and '-h' options.
PerfTest [-w [fname=path_to_file fsize=size]]
[-r [fname=path_to_file | rsize=size]]
[-s [fname=path_to_file] [block_size=num_bytes] [num_seeks=num_th]]
[-cpu [cycles=number]]
[-mem [msize=size] [rounds=number]]

 -w         File write test:
 fname      name of file to write. Default is PerfTest.123.
 fsize      size of file in Mb. Default is 512.

 -r         File/disk read test:
 fname      name of file to read. You can use :D<drive_number> for direct
            disk access instead of file access. Use Disk Management snap-in
            for the list of your available drives. Default is :D0.
 rsize      number of megabytes to read directly from disk. Default is 512.

 -s         File/disk seeking test:
 fname      name of file for test seeking. If you omit it, disk
            seeking will be performed.
 block_size number of kilobytes to read after seeking. Default is 8.
 num_seeks  number of tryes to seek in thousands. Default is 1.

 -cpu       CPU speed test:
 cycles     number of calculating cycles in millions. Within each cycle
            one complex operation (CO) is performed. Default is 1.

 -mem       Memory test:
 size       size of each of two memory blocks to allocate in Mb.
            Contents of one block will be copied to other. Default is 64.
 rounds     number of copying rounds. Default is 40.

 -nodel     Do not delete file after write test.

 -h, /?     This help

PerfTest launched with no parameters is equivalent to PerfTest -r -s -cpu -mem

Disk speed

Read from disk

For read test two modes are introduced: file and drive. You need administrative priviligies for direct drive access. Drive mode is preferable. The only sensible reason to use file mode is absence of administrative privilegies. The utility acts as follows:

  • opens device or file fname,
  • In drive mode it reads fsize MB from random position of drive,
  • In file mode it reads file named fname till the end,
  • calculates and shows read speed in MB/s.

You may use any large file for this test.
Don't have a large file? Make write test with -nodel option. Remember about caching in operating system (see further)!

Seeking test

Again, two modes are introduced: file and drive. You need administrative priviligies for direct drive access. Drive mode is highly recommened. Seeking test on file is possible but the results are not very useful unless you have file that takes the whole drive. The utility performs following operations:

  • opens device or file fname,
  • chooses random position,
  • reads block_size kilobytes from this position,
  • repeats until num_seeks * 1000 random reads is reached,
  • calculates and shows seeking speed in seeks/s.

Write to disk

Utility creates file fname (default is PerfTest.123) and writes fsize megabytes into it. To get accurate results choose as much size as possible (use common sense). The reason is described in the next section:

Why do I get unbelieveable results?

It's due to caching. Files are written into OS memory cache and the program is informed that write operation finished thus it stops watch. Small file can be written in "zero" time. But actually data is not written to disk completely.
Memory cache is not unlimited. We can overfull it to get more accurate results. When cache is full OS has no choice and it dumps data to disk. The larger file you create the more accurate reults you get. Try to make write test with increasing file size – when speed stops to decrease the real device speed is reached.
File written persists in cache until it extruded by other data. This means that even though file has been completely written to disk read request may get it from cache again. Remember about it when performing combined write and read test in file mode (-w and -r options). The file that has just been written is read again from cache, at least partially. Also remember about it when you use -nodel option to create large file. You should create large enough file to extrude beginning of it from cache.
In drive mode caching is also performed, but the utility chooses a random position on disk before reading, thus reducing a chance to meet the cached area to minimum.

Memory

Program performs simple memory-to-memory copying. Two blocks of size MB are copied to each other rounds times. The result is shown in MB/s. Remember that this result depends on not only physical memory speed but also on processor.

CPU

Some set of calculations in integer and floating point arithmetics is performed. The set is called "complex operation" (CO) and is performed cycles times. Utility forces all CPU cores load to 100%. The result is shown in CO/s.

Se also [Running PerfTest on Virtual Machines]


Related

Wiki: Running PerfTest on Virtual Machines

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.