Skip to main content

A shell tool to generate random bytes extremely fast e.g. for SSD scrubbing.

Project description

FastRandom

A shell tool to generate random bytes extremely fast. Uses multiple CPU cores and both AES-NI and ChaCha20 to facilitate even higher utilisation of processing capacity. The output may be used for scrubbing disks, even the fastest NVME SSDs, or for any other purpose where large amounts of irreproducible random bytes are needed.

Prefer redirection > instead of pipes and dd for maximal speed. This works with both files and block devices.

pip install fastrandom
fastrandom -p > /tmp/file.dat    # -p for progress indication
[fastrandom]     15,451 MiB generated at 3.48 GB/s
[Errno 28] No space left on device

This tool is about 30 % faster than the best contender that I am aware of, openssl enc -aes-256-ctr -in /dev/zero, many times faster than any popular random number generator (like PCG64) and about 50 times faster than /dev/urandom. Generating to /dev/null I can reach 11 GB/s on a six-core CPU but any actual devices that I have access to, including NVME 4.0 SSDs and even ramdisks, are slower. Please drop a Github issue if you find something faster.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fastrandom-0.1.0.tar.gz (3.6 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page