History log of /freebsd-current/usr.sbin/diskinfo/diskinfo.8
Revision Date Author Comments
# e333110d 05-Mar-2024 Eugene Grosbein <eugen@FreeBSD.org>

diskinfo(8): introduce new option -l

In modes -p or -s, add an option -l to start each line
with a device name separated with a tab. Update the manual page.
Add an example to list names with corresponding serial numbers:

diskinfo -ls /dev/da?

MFC after: 2 weeks


# fa9896e0 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: two-line nroff pattern

Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/


# 780dc32b 03-Oct-2017 Alan Somers <asomers@FreeBSD.org>

Fix copy/paste error in diskinfo.8 from r320555

MFC after: 1 week
Sponsored by: Spectra Logic Corp


# 1a01f934 05-Jul-2017 Alexander Motin <mav@FreeBSD.org>

Add naive benchmark for SSDs in ZFS SLOG role.

ZFS SLOGs have very specific access pattern with many cache flushes,
which none of benchmarks I know can simulate. Since SSD vendors rarely
specify cache flush time, this measurement can be useful to explain why
some ZFS pools are slower then expected. This test writes data chunks
of different size followed by cache flush, alike to what ZFS SLOG does,
and measures average time.

To illustrate, here is result for 6 years old SATA Intel 710 Series SSD:

Synchronous random writes:
0.5 kbytes: 138.3 usec/IO = 3.5 Mbytes/s
1 kbytes: 137.7 usec/IO = 7.1 Mbytes/s
2 kbytes: 151.1 usec/IO = 12.9 Mbytes/s
4 kbytes: 158.2 usec/IO = 24.7 Mbytes/s
8 kbytes: 175.6 usec/IO = 44.5 Mbytes/s
16 kbytes: 210.1 usec/IO = 74.4 Mbytes/s
32 kbytes: 274.2 usec/IO = 114.0 Mbytes/s
64 kbytes: 416.5 usec/IO = 150.1 Mbytes/s
128 kbytes: 776.6 usec/IO = 161.0 Mbytes/s
256 kbytes: 1503.1 usec/IO = 166.3 Mbytes/s
512 kbytes: 2968.7 usec/IO = 168.4 Mbytes/s
1024 kbytes: 5866.8 usec/IO = 170.5 Mbytes/s
2048 kbytes: 11696.6 usec/IO = 171.0 Mbytes/s
4096 kbytes: 23329.6 usec/IO = 171.5 Mbytes/s
8192 kbytes: 46779.5 usec/IO = 171.0 Mbytes/s

, and much newer and supposedly much faster NVMe Samsung 950 PRO SSD:

Synchronous random writes:
0.5 kbytes: 2092.9 usec/IO = 0.2 Mbytes/s
1 kbytes: 2013.1 usec/IO = 0.5 Mbytes/s
2 kbytes: 2014.8 usec/IO = 1.0 Mbytes/s
4 kbytes: 2090.7 usec/IO = 1.9 Mbytes/s
8 kbytes: 2044.5 usec/IO = 3.8 Mbytes/s
16 kbytes: 2084.8 usec/IO = 7.5 Mbytes/s
32 kbytes: 2137.1 usec/IO = 14.6 Mbytes/s
64 kbytes: 2173.4 usec/IO = 28.8 Mbytes/s
128 kbytes: 2923.9 usec/IO = 42.8 Mbytes/s
256 kbytes: 3085.3 usec/IO = 81.0 Mbytes/s
512 kbytes: 3112.2 usec/IO = 160.7 Mbytes/s
1024 kbytes: 2430.6 usec/IO = 411.4 Mbytes/s
2048 kbytes: 3788.9 usec/IO = 527.9 Mbytes/s
4096 kbytes: 6198.0 usec/IO = 645.4 Mbytes/s
8192 kbytes: 10764.9 usec/IO = 743.2 Mbytes/s

While the first one obviously has maximal throughput limitations, the
second one has so high cache flush latency (about 2 millisecond), that
it makes one almost useless in SLOG role, despite of its good throughput
numbers. Power loss protection is out of scope of this test, but I
suspect it can be related.

MFC after: 2 weeks
Sponsored by: iXsystems, Inc.


# 875a1f77 02-Jul-2017 Allan Jude <allanjude@FreeBSD.org>

diskinfo(8): correct typo in man page

Reported by: N.J. Mann <njm@njm.me.uk>


# 278a04f5 01-Jul-2017 Allan Jude <allanjude@FreeBSD.org>

Add -s (serial) and -p (physpath) to diskinfo

Return the bare requested information, intended for scripting.

The serial number of a SAS/SCSI device can be returned with
'camcontrol inquiry disk -S', but there is no similar switch for SATA.

This provides a way to get this information from both SAS and SATA disks

the -s and -p flags are mutually exclusive, and cannot be used with any
other flags.

Reviewed by: rpokala, wblock
MFC after: 1 month
Sponsored by: ScaleEngine Inc.
Differential Revision: https://reviews.freebsd.org/D7828


# af375c28 22-Sep-2016 Edward Tomasz Napierala <trasz@FreeBSD.org>

Small tweaks to the diskinfo(8) manual page, to make it more consistent
with others.

MFC after: 1 month


# b76ce452 22-Sep-2016 Edward Tomasz Napierala <trasz@FreeBSD.org>

Add "diskinfo -i", a simple aio-based IOPS benchmark.

MFC after: 1 month


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# fe0506d7 09-Mar-2010 Marcel Moolenaar <marcel@FreeBSD.org>

Create the altix project branch. The altix project will add support
for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting
is a two-module system, consisting of a base compute module and a
CPU expansion module. SGI's NUMAFlex architecture can be an excellent
platform to test CPU affinity and NUMA-aware features in FreeBSD.


# ea78eb42 05-Jan-2010 Alexander Motin <mav@FreeBSD.org>

MFC 200968:
Make diskinfo report disk stripe size and offset. It should help users to
make file systems optimally aligned and tuned for better performance.


# 851b967a 24-Dec-2009 Alexander Motin <mav@FreeBSD.org>

Make diskinfo report disk stripe size and offset. It should help users to
make file systems optimally aligned and tuned for better performance.


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# 59a3c79d 18-Jan-2005 Ruslan Ermilov <ru@FreeBSD.org>

Sort sections.


# 9046f8cd 11-Jan-2005 Ruslan Ermilov <ru@FreeBSD.org>

Add -c to SYNOPSIS and usage().


# 6a33b3c6 08-Nov-2004 Søren Schmidt <sos@FreeBSD.org>

Add -c option that calculates the overhead of read I/O ops.


# 9137d52a 30-Mar-2004 Ruslan Ermilov <ru@FreeBSD.org>

Sync manpage's synopsis with usage().


# a388918d 31-May-2003 Ruslan Ermilov <ru@FreeBSD.org>

Assorted mdoc(7) fixes.


# a885db9a 11-May-2003 Gordon Tetlow <gordon@FreeBSD.org>

Correct a type in the bugs section. Also turn it into a list.

Approved by: re(murray)


# a362eb63 09-Apr-2003 Poul-Henning Kamp <phk@FreeBSD.org>

Diskinfo is a small program to access the basic properties of a disk device:
sectorsize, mediasize etc.

It also contains a small and naïve benchmark which reports on seek
and transfer performance.