How to Set Unrar Disk I/O Block Size

This guide explains how to extract RAR archives using a specific disk I/O block size. Because the native unrar command-line utility does not feature a built-in switch to modify disk read and write block buffers directly, achieving custom I/O block sizes requires combining unrar with standard system streaming utilities. The following sections cover the exact command syntax using dd, breakdown of options, and alternative native flags for managing disk I/O overhead.

The Piping Command with dd

To extract data from an unrar archive using an explicit disk I/O block size, pipe the uncompressed stream from unrar directly into dd:

unrar p -inul archive.rar filename.ext | dd of=filename.ext bs=4M

Command Breakdown

  • unrar: The standard extraction utility for RAR archives.
  • p: Instructs unrar to print the decompressed file contents directly to standard output (stdout) instead of writing to disk.
  • -inul: Suppresses all unrar messages, warnings, and banners. This ensures that only pure binary file data passes through the stream without corrupting the resulting file.
  • archive.rar: The path to the target archive file.
  • filename.ext: The specific file inside the archive to extract.
  • |: The pipe operator, directing data from unrar to the input of dd.
  • dd: The low-level data-copying utility.
  • of=filename.ext: The target output file on your local storage.
  • bs=4M: Defines the block size (in this example, 4 megabytes) for reading and writing data to disk. You can adjust this to other sizes, such as bs=64k, bs=1M, or bs=8M, depending on your storage hardware configuration.

If you only want to control the write block size while letting the read buffer handle streaming defaults, use obs instead:

unrar p -inul archive.rar filename.ext | dd of=filename.ext obs=1M

Regulating Disk Load with Native unrar Flags

If your goal in setting a custom block size is to prevent disk saturation or manage system throughput during extraction, unrar provides a built-in switch to throttle processing:

unrar x -ri1:10 archive.rar

The -ri<p>[:<s>] switch configures task priority and sleep duration:

  • <p>: Task priority from 0 (idle) to 15 (normal). Setting a lower priority reduces disk and CPU resource contention.
  • <s>: Sleep time in milliseconds between read and write cycles, directly throttling disk operations and reducing I/O wait times on busy systems.