public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Discard benchmarking tool for SSD's and thinly provisioned devices
@ 2010-10-18 11:33 Lukas Czerner
  2010-10-18 11:40 ` Lukas Czerner
  0 siblings, 1 reply; 4+ messages in thread
From: Lukas Czerner @ 2010-10-18 11:33 UTC (permalink / raw)
  To: Ric Wheeler, Jeff Moyer, Eric Sandeen, linux-kernel; +Cc: Lukas Czerner

Hi all,

I would like to present you a tool for benchmarking discard performance
on SSD's and thinly provisioned devices (or virtually any device
supporting TRIM command).

You can download the tool here:

http://sourceforge.net/projects/test-discard/

there is also git repository available.

The tool is called "test-discard" (yes, very imaginative I know).


DESCRIPTION
-----------
  This is a simple tool for benchmarking device discard (TRIM)
performance. According to benchmark parameters the tool will
repetitively call BLKDISCARD ioctl on the specified device with
specified parameters collecting performance statistics.

  You can specify several parameter for the test. First of all you can
specify the overall amount of Bytes to discard, the bigger the value
is, the bigger discard ranges you can test, the more precise result
you will obtain, and the longer will the test take. Then you can
specify device LBA to start with discard test and record size. There
are three modes of the test: sequential test, random I/O test and test
where we are discarding already discarded blocks (discard2).

  There is also support for automated testing of range of record sizes.
You just need to specify starting, ending and step record size and the
tool will automatically survey the whole range. In addition you can get
more script-friendly output for using this tool in scripts.

  You can also generate nice graphs with gnuplot (script included), but
you will probably need to alter it to match your needs.


FUNCTION PRINCIPLE
------------------
  Invoke ioctl with BLKDISCARD flag and defined range repetitively until
the specified amount of data is discarded. Running time of each ioctl
invocation is measured and stored (also min and max) as well as number
of invocations and range size.From collected data we can compute
average ioctl running time, overall ioctl running time (sum) and
throughput.

  In random IO mode discard range is not determined sequentially but
picked randomly anywhere on the disk, but it is of course aligned to
the range_size. Already discarded blocks are stored in the list. Before
each discard operation random block is generated and added to the list,
possibly altered if the block was already discarded. There is one
limitation though, if the record size is to low and disk size is too
high, only a part of disk will be used. To be specific :

	max_tested_disk_size = INT_MAX * record_size;


Please, see README file included in sources for more information.


WARNING
-------
 * !!!! It WILL DESTROY all your data on the device !!!!
 * I am using the tool quite often, thus it was properly tested and
   should be stable, though I do NOT PROVIDE ANY WARRANTY.


Thanks!

-Lukas

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-10-18 12:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-18 11:33 Discard benchmarking tool for SSD's and thinly provisioned devices Lukas Czerner
2010-10-18 11:40 ` Lukas Czerner
2010-10-18 11:47   ` Peter Zijlstra
2010-10-18 12:29     ` Ric Wheeler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox