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

* Re: Discard benchmarking tool for SSD's and thinly provisioned devices
  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
  0 siblings, 1 reply; 4+ messages in thread
From: Lukas Czerner @ 2010-10-18 11:40 UTC (permalink / raw)
  To: Lukas Czerner; +Cc: Ric Wheeler, Jeff Moyer, Eric Sandeen, linux-kernel

On Mon, 18 Oct 2010, Lukas Czerner wrote:

> 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
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 

Also note that there might be some devices with buggy firmware which may
be damaged beyond repair by the TRIM command, especially with TRIM
performed in random IO pattern (from first-hand experience).

-Lukas

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

* Re: Discard benchmarking tool for SSD's and thinly provisioned devices
  2010-10-18 11:40 ` Lukas Czerner
@ 2010-10-18 11:47   ` Peter Zijlstra
  2010-10-18 12:29     ` Ric Wheeler
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Zijlstra @ 2010-10-18 11:47 UTC (permalink / raw)
  To: Lukas Czerner; +Cc: Ric Wheeler, Jeff Moyer, Eric Sandeen, linux-kernel

On Mon, 2010-10-18 at 13:40 +0200, Lukas Czerner wrote:
> 
> Also note that there might be some devices with buggy firmware which may
> be damaged beyond repair by the TRIM command, especially with TRIM
> performed in random IO pattern (from first-hand experience). 

A list of known bad devices might be appreciated..

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

* Re: Discard benchmarking tool for SSD's and thinly provisioned devices
  2010-10-18 11:47   ` Peter Zijlstra
@ 2010-10-18 12:29     ` Ric Wheeler
  0 siblings, 0 replies; 4+ messages in thread
From: Ric Wheeler @ 2010-10-18 12:29 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: Lukas Czerner, Ric Wheeler, Jeff Moyer, Eric Sandeen,
	linux-kernel

  On 10/18/2010 07:47 AM, Peter Zijlstra wrote:
> On Mon, 2010-10-18 at 13:40 +0200, Lukas Czerner wrote:
>> Also note that there might be some devices with buggy firmware which may
>> be damaged beyond repair by the TRIM command, especially with TRIM
>> performed in random IO pattern (from first-hand experience).
> A list of known bad devices might be appreciated..

The challenge with naming devices that had issues is that some of them were 
early versions (not stable firmware) and some we got under NDA so we cannot name 
them...

ric


^ 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