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 details)

Uploaded Source

File details

Details for the file fastrandom-0.1.0.tar.gz.

File metadata

  • Download URL: fastrandom-0.1.0.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.3 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/1.5.0 colorama/0.4.4 CPython/3.10.0

File hashes

Hashes for fastrandom-0.1.0.tar.gz
Algorithm Hash digest
SHA256 619f9a2982e4b85d11971c84fc3c24ccd4f37f7d685b7e06d824b896db374490
MD5 9011ef10b490ddcef57e785b35d4e979
BLAKE2b-256 69ab1844dd018e32f2660b8e105ccb4e0cd0c2efe8b55d19a48bc77588c85f45

See more details on using hashes here.

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