FreeBSD: Benchmark The Disks Seek And Transfer Performance

To benchmark the disk seek and transfer performance on FreeBSD, you can use the dd and iozone utilities.

  1. To measure the disk seek performance, run the following command:
    dd if=/dev/ad0 of=/dev/null bs=1m count=10000

    This command reads 10,000 1MB blocks from the disk and discards the output. It measures the disk seek performance by measuring the time it takes to seek to different parts of the disk.

  2. To measure the disk transfer performance, install the iozone utility by running the following command as the superuser:
    pkg install iozone
  3. Run the following command to test the disk transfer performance:
    iozone -a -i 0 -i 1 -i 2 -s 1G -r 4k

    This command creates a 1GB file and performs three types of I/O tests (write, re-read, and random read) using 4KB blocks.

  4. After the tests are completed, iozone will output a report showing the disk transfer performance in kilobytes per second (KB/s) for each test.

    The most important numbers to look at are the sequential write and read results. These numbers show how fast your disk can write and read data sequentially. Random read and write results are also important if you are using your disk for databases or other applications that perform a lot of random I/O.

That’s it! You should now have a good idea of the seek and transfer performance of your disks on FreeBSD.

Leave a Comment