{"id":23154012,"url":"https://github.com/ronomon/direct-io","last_synced_at":"2025-08-17T22:31:28.732Z","repository":{"id":123904911,"uuid":"104906735","full_name":"ronomon/direct-io","owner":"ronomon","description":"Direct IO helpers for block devices and regular files on FreeBSD, Linux, macOS and Windows.","archived":false,"fork":false,"pushed_at":"2023-02-07T15:38:03.000Z","size":47,"stargazers_count":74,"open_issues_count":1,"forks_count":7,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-08-08T21:57:02.190Z","etag":null,"topics":["alignment","block-device","io","o-direct","o-dsync","sector-size"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ronomon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-26T15:57:11.000Z","updated_at":"2025-05-25T11:56:22.000Z","dependencies_parsed_at":"2023-09-01T03:22:53.771Z","dependency_job_id":null,"html_url":"https://github.com/ronomon/direct-io","commit_stats":null,"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/ronomon/direct-io","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ronomon%2Fdirect-io","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ronomon%2Fdirect-io/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ronomon%2Fdirect-io/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ronomon%2Fdirect-io/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ronomon","download_url":"https://codeload.github.com/ronomon/direct-io/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ronomon%2Fdirect-io/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270918225,"owners_count":24667664,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-17T02:00:09.016Z","response_time":129,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alignment","block-device","io","o-direct","o-dsync","sector-size"],"created_at":"2024-12-17T20:11:25.507Z","updated_at":"2025-08-17T22:31:28.486Z","avatar_url":"https://github.com/ronomon.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# direct-io\n\nDirect IO helpers for block devices and regular files on FreeBSD, Linux, macOS\nand Windows. *#mechanical-sympathy*\n\n* [Installation](#installation)\n* [Direct memory access](#direct-memory-access)\n* [Buffer alignment](#buffer-alignment)\n* [Synchronous writes](#synchronous-writes)\n* [Block device size and sector size](#block-device-size-and-sector-size)\n* [Block device path and permissions](#block-device-path-and-permissions)\n* [Mandatory locks](#mandatory-locks)\n* [Advisory locks](#advisory-locks)\n* [Benchmark](#benchmark)\n\n## Installation\n\n```\nnpm install @ronomon/direct-io\n```\n\n## Direct Memory Access\n\nDirect memory access bypasses the filesystem cache and avoids memory copies to\nand from kernel space, writing and reading directly to and from the disk device\ncache. File I/O is done directly to and from user space buffers regardless of\nwhether the file descriptor is a block device or regular file. To enable direct\nmemory access, use the following open flag or method according to the platform:\n\n**O_DIRECT** *(FreeBSD, Linux, Windows)*\n\nProvide as a flag to `fs.open()` when opening a block device or regular file to\nenable direct memory access.\n\nOn Windows, `O_DIRECT` is supported as of\n[libuv 1.16.0](https://github.com/libuv/libuv/commit/4b666bd2d82a51f1c809b2703a91679789c1ec01)\n(i.e. Node 9.2.0 and up), where `O_DIRECT` is mapped to\n[FILE_FLAG_NO_BUFFERING](https://msdn.microsoft.com/en-us/library/windows/desktop/cc644950(v=vs.85).aspx).\n\n**setF_NOCACHE(fd, value, callback)** *(macOS)*\n\nTurns data caching off or on for an open file descriptor for a block device or\nregular file:\n\n* A `value` of `1` turns data caching off (this is the nearest equivalent of\n`O_DIRECT` on macOS).\n* A `value` of `0` turns data caching back on.\n\nTurning data caching off with `F_NOCACHE` [will not purge any previously cached\npages](https://lists.apple.com/archives/filesystem-dev/2007/Sep/msg00012.html).\nSubsequent direct reads will continue to return cached pages if they exist, and\nconcurrent processes may continue to populate the cache through non-direct\nreads. To ensure direct reads on macOS (for example when data scrubbing) you\nshould set `F_NOCACHE` as soon as possible to avoid populating the cache.\n\nAlternatively, if you want to ensure initial boot conditions with a cold disk\nbuffer cache, you can purge the entire cache for all files using `sudo purge`.\nThis will affect system performance.\n\n## Buffer Alignment\n\nWhen writing or reading to and from a block device or regular file using direct\nmemory access, you need to make sure that your buffer is aligned correctly or\nyou may receive an `EINVAL` error or be switched back silently to non-DMA mode.\n\nTo be aligned correctly, the address of the allocated memory must be a multiple\nof `alignment`, i.e. the physical sector size (not logical sector size) of the\nblock device. Buffers allocated using Node's `Buffer.alloc()` and related\nmethods will not meet these alignment requirements. Use `getAlignedBuffer()` to\ncreate aligned buffers:\n\n**getAlignedBuffer(size, alignment)** *(FreeBSD, Linux, macOS, Windows)*\n\nReturns an aligned buffer:\n\n* `size` must be greater than 0, and a multiple of the physical sector size of\nthe block device (typically 512 bytes or 4096 bytes).\n* `size` must be at most `require('buffer').kMaxLength` bytes.\n* `alignment` must be at least 8 bytes for portability between 32-bit and 64-bit\nsystems.\n* `alignment` must be a power of two, and a multiple of the physical sector size\nof the block device.\n* `alignment` must be at most 4194304 bytes for a safe arbitrary upper bound.\n* An alignment of 4096 bytes should be compatible with\n[Advanced Format](https://en.wikipedia.org/wiki/Advanced_Format) drives as well\nas backwards compatible with 512 sector drives. If you want to be sure, you\nshould use `getBlockDevice()` below to get the actual physical sector size of\nthe block device.\n* Buffers are instances of Node's `Buffer` class and have the same methods and\nproperties, except that they are also aligned.\n* Buffers are allocated using the appropriate call (either\n[`posix_memalign`](http://man7.org/linux/man-pages/man3/posix_memalign.3.html)\nor [`_aligned_malloc`](https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/aligned-malloc)\ndepending on the platform).\n* Buffers are zero-filled with `memset()` when allocated for safety.\n* Buffers are automatically freed using the appropriate call when garbage\ncollected in V8, either `free()` or `_aligned_free()` depending on the\nplatform.\n* `getAlignedBuffer()` should be used judiciously as the algorithm that realizes\nthe alignment constraint can incur significant memory overhead.\n\nFurther reading:\n\n* [MSDN Windows File Buffering](https://msdn.microsoft.com/en-us/library/windows/desktop/cc644950.aspx)\n\n## Synchronous Writes\n\nDirect memory access will write directly to the disk device cache but not\nnecessarily to the disk device storage medium. To ensure that your data is\nflushed from the disk device cache to the disk device storage medium, you should\nalso open the block device or regular file using the `O_DSYNC` or `O_SYNC`\nopen flags. These are the equivalent of calling `fs.fdatasync()` or `fs.fsync()`\nrespectively after every write, but with less system call overhead, and with the\nadvantage that they encourage the disk device to do real work during the\n`fs.write()` call, which can be useful when overlapping compute-intensive work\nwith IO.\n\nSome systems implement the `O_DSYNC` and `O_SYNC` open flags by setting the\nForce Unit Access (FUA) flag, which works for SCSI\n[but](https://perspectives.mvdirona.com/2008/04/disks-lies-and-damn-disks/)\n[not](https://blogs.msdn.microsoft.com/oldnewthing/20170510-00/?p=95505) for\nEIDE and SATA drivers.\n\nConversely, some systems have had bugs where calling `fs.fdatasync()`\nor `fs.fsync()` on a regular file would force a flush only if the page cache was\ndirty, so that bypassing the page cache using `O_DIRECT` meant the disk device\ncache was never flushed.\n\nThis means that the `O_DSYNC` and `O_SYNC` open flags are not sufficient on\ntheir own, but should be combined with `fs.fdatasync()` or `fs.fsync()` for\ndurability or write barriers. This does not mean that these open flags are not\nuseful. As we have already seen, they can reduce the latency of the eventual\nfsync call, eliminating latency spikes.\n\n**O_DSYNC** *(FreeBSD, Linux, macOS, Windows)*\n\nFlushes all data and only required associated metadata to the underlying\nhardware.\n\n**O_SYNC** *(FreeBSD, Linux, macOS, Windows)*\n\nFlushes all data and any associated metadata to the underlying hardware.\n\nTo understand the difference between `O_DSYNC` and `O_SYNC`, consider two pieces\nof file metadata: the file modification timestamp and the file length. All write\noperations will update the file modification timestamp, but only writes that add\ndata to the end of the file will change the file length. The last modification\ntimestamp is not required to ensure that the data can be read back successfully,\nbut the file length is needed. Thus, `O_DSYNC` will only flush updates to the\nfile length metadata, whereas `O_SYNC` will also flush the file modification\ntimestamp metadata.\n\nOn Windows, synchronous writes are supported as of\n[libuv 1.16.0](https://github.com/libuv/libuv/commit/4b666bd2d82a51f1c809b2703a91679789c1ec01)\n(i.e. Node 9.2.0 and up), where `O_DSYNC` and `O_SYNC` are both mapped to\n[FILE_FLAG_WRITE_THROUGH](https://support.microsoft.com/en-za/help/99794/info-file-flag-write-through-and-file-flag-no-buffering).\n\n## Block Device Size and Sector Size\n\nNode's `fs.fstat()` will not work at all for a block device on Windows, and will\nnot report the correct size for a block device on other platforms. You should\nuse `getBlockDevice()` instead:\n\n**getBlockDevice(fd, callback)** *(FreeBSD, Linux, macOS, Windows)*\n\nReturns an object with the following properties:\n\n* `logicalSectorSize` - The size of a logical sector in bytes. Some drives will\nadvertise a backwards compatible logical sector size of 512 bytes while their\nphysical sector size is in fact 4096 bytes.\n\n* `physicalSectorSize` - The size of a physical sector in bytes. You should use\nthis to decide on the `size` and `alignment` parameters when getting aligned\nbuffers so that reads and writes are always a multiple of the physical sector\nsize. **Some virtual devices may report a `physicalSectorSize` of 0 bytes.**\n\n* `size` - The total size of the block device in bytes.\n\n* `serialNumber` - The serial number reported by the device. *(FreeBSD, Linux)*\n\n## Block Device Path and Permissions\n\nYou will need sudo or administrator privileges to open a block device. You can\nuse `fs.open(path, flags)` to open a block device, where the path you provide\nwill depend on the platform:\n\n`/dev/sda` *(FreeBSD, Linux)*\n\n`/dev/disk1` *(macOS)*\n\n`\\\\.\\PhysicalDrive1` *(Windows)*\n\nYou can use these shell commands to see which block devices are available:\n\n`$ camcontrol devlist` *(FreeBSD)*\n\n`$ lsblk` *(Linux)*\n\n`$ diskutil list` *(macOS)*\n\n`$ wmic diskdrive list brief` *(Windows)*\n\n## Mandatory Locks\n\nWindows has\n[special restrictions](https://support.microsoft.com/en-us/help/942448/changes-to-the-file-system-and-to-the-storage-stack-to-restrict-direct)\nconcerning writing to block devices. You must lock the block device by providing\nthe `O_EXLOCK` flag when opening the file descriptor, or else by calling\n`setFSCTL_LOCK_VOLUME()` after opening the file descriptor. On other platforms\nit is good practice to lock the block device by providing either the `O_EXCL` or\n`O_EXLOCK` flag when opening the file descriptor:\n\n**O_EXCL** *(Linux)*\n\nProvide as a flag to `fs.open()` when opening a block device to obtain an\nexclusive mandatory (and not just advisory) lock. When opening a regular file,\nbehavior is undefined. In general, the behavior of `O_EXCL` is undefined if it\nis used without `O_CREAT`. There is one exception: on Linux 2.6 and later,\n`O_EXCL` can be used without `O_CREAT` if the path refers to a block device. If\nthe block device is in use by the system e.g. if it is mounted, `fs.open()` will\nfail with an `EBUSY` error.\n\n**O_EXLOCK** *(macOS, Windows)*\n\nProvide as a flag to `fs.open()` when opening a block device or regular file to\nobtain an exclusive mandatory (and not just advisory) lock.\n\nOn macOS, when opening a regular file with `O_EXLOCK`, `fs.open()` will block\nuntil any existing lock is released. While adding `O_NONBLOCK` can avoid this,\nit also introduces other IO semantics. Using `O_EXLOCK` should therefore be\nlimited to opening a block device on macOS. If the block device is in use by the\nsystem, i.e. it is mounted, `fs.open()` will fail with an `EBUSY` error.\n\nOn Windows, `O_EXLOCK` is supported as of [libuv 1.17.0](https://github.com/libuv/libuv/commit/1c4de1916e36f8462c48a36ce7c88b247465f3cf)\n(i.e. Node 9.3.0 and up), where `O_EXLOCK` is mapped to an\n[exclusive sharing mode](https://msdn.microsoft.com/en-us/library/windows/desktop/aa363858(v=vs.85).aspx)\nof 0. If the block device or regular file is already open, `fs.open()` will fail\nwith an `EBUSY` error.\n\n**setFSCTL_LOCK_VOLUME(fd, value, callback)** *(Windows)*\n\nLocks a block device on Windows if not in use:\n\n* A `value` of `1` locks the block device using\n[FSCTL_LOCK_VOLUME](https://msdn.microsoft.com/en-us/library/windows/desktop/aa364575.aspx).\n* A `value` of `0` unlocks the block device using\n[FSCTL_UNLOCK_VOLUME](https://msdn.microsoft.com/en-us/library/windows/desktop/aa364814.aspx)\nif it was previously locked.\n* A locked block device can be accessed only through the file descriptor that\nlocked it.\n* A locked block device remains locked until the application unlocks the block\ndevice, or until the file descriptor is closed, either directly through\n`fs.close()`, or indirectly when the process terminates.\n* If the specified block device is a system volume or contains a page file, the\noperation will fail.\n* If there are any open files on the block device, the operation will fail.\nConversely, success of this operation indicates that there are no open files.\n* The system will flush all cached data to the block device before locking it.\n* The NTFS file system treats a locked block device as a dismounted volume. The\n`FSCTL_DISMOUNT_VOLUME` control code functions similarly but does not check for\nopen files before dismounting.\n* Without a successful lock operation, a dismounted volume may be remounted by\nany process at any time.\n\n## Advisory Locks\n\n**setFlock(fd, value, callback)** *(FreeBSD, Linux, macOS)*\n\nApply or remove an advisory lock on an open regular file:\n\n* A `value` of `1` locks the regular file using `flock(LOCK_EX | LOCK_NB)`.\n* A `value` of `0` unlocks the regular file using `flock(LOCK_UN)`.\n* Advisory locks allow cooperating processes to perform consistent operations\nbut do not guarantee consistency since other processes may not check for the\npresence of advisory locks.\n* A locked regular file remains locked until the application unlocks the regular\nfile, or until the file descriptor is closed, either directly through\n`fs.close()`, or indirectly when the process terminates.\n\n## Benchmark\n\nThe write performance of various block sizes and open flags can vary across\noperating systems and between hard drives and solid state drives. Use the\nincluded write benchmark to benchmark various block sizes and open flags on the\nlocal file system (by default) or on a specific block device or regular file:\n\n**WARNING: The write benchmark will erase the contents of the specified block\ndevice or regular file if any.**\n\n```\n[sudo] node benchmark.js [device|file]\n```\n\n```\n$ sudo node benchmark.js /dev/sda\n\n      4096 | /dev/sda | BUFFERED                               |  2461.54 MB/s\n      4096 | /dev/sda | BUFFERED + ALIGNED                     |  1855.07 MB/s\n      4096 | /dev/sda | O_DIRECT                               |    58.69 MB/s\n      4096 | /dev/sda | AMORTIZED_FDATASYNC                    |   122.84 MB/s\n      4096 | /dev/sda | AMORTIZED_FDATASYNC + ALIGNED          |   120.87 MB/s\n      4096 | /dev/sda | AMORTIZED_FDATASYNC + O_DIRECT         |    57.92 MB/s\n      4096 | /dev/sda | AMORTIZED_FSYNC                        |   120.08 MB/s\n      4096 | /dev/sda | AMORTIZED_FSYNC + ALIGNED              |   121.79 MB/s\n      4096 | /dev/sda | AMORTIZED_FSYNC + O_DIRECT             |    59.70 MB/s\n      4096 | /dev/sda | FDATASYNC                              |     0.44 MB/s\n      4096 | /dev/sda | FDATASYNC + ALIGNED                    |     0.47 MB/s\n      4096 | /dev/sda | FDATASYNC + O_DIRECT                   |     0.47 MB/s\n      4096 | /dev/sda | FSYNC                                  |     0.47 MB/s\n      4096 | /dev/sda | FSYNC + ALIGNED                        |     0.47 MB/s\n      4096 | /dev/sda | FSYNC + O_DIRECT                       |     0.47 MB/s\n      4096 | /dev/sda | O_DSYNC                                |     0.47 MB/s\n      4096 | /dev/sda | O_DSYNC + ALIGNED                      |     0.47 MB/s\n      4096 | /dev/sda | O_DSYNC + O_DIRECT                     |     0.47 MB/s\n      4096 | /dev/sda | O_SYNC                                 |     0.47 MB/s\n      4096 | /dev/sda | O_SYNC + ALIGNED                       |     0.46 MB/s\n      4096 | /dev/sda | O_SYNC + O_DIRECT                      |     0.47 MB/s\n      8192 | /dev/sda | BUFFERED                               |  3121.95 MB/s\n      8192 | /dev/sda | BUFFERED + ALIGNED                     |  3047.62 MB/s\n      8192 | /dev/sda | O_DIRECT                               |    88.58 MB/s\n      8192 | /dev/sda | AMORTIZED_FDATASYNC                    |   123.43 MB/s\n      8192 | /dev/sda | AMORTIZED_FDATASYNC + ALIGNED          |   120.30 MB/s\n      8192 | /dev/sda | AMORTIZED_FDATASYNC + O_DIRECT         |    87.55 MB/s\n      8192 | /dev/sda | AMORTIZED_FSYNC                        |   120.08 MB/s\n      8192 | /dev/sda | AMORTIZED_FSYNC + ALIGNED              |   121.44 MB/s\n      8192 | /dev/sda | AMORTIZED_FSYNC + O_DIRECT             |    90.01 MB/s\n      8192 | /dev/sda | FDATASYNC                              |     0.91 MB/s\n      8192 | /dev/sda | FDATASYNC + ALIGNED                    |     0.93 MB/s\n      8192 | /dev/sda | FDATASYNC + O_DIRECT                   |     0.93 MB/s\n      8192 | /dev/sda | FSYNC                                  |     0.93 MB/s\n      8192 | /dev/sda | FSYNC + ALIGNED                        |     0.92 MB/s\n      8192 | /dev/sda | FSYNC + O_DIRECT                       |     0.92 MB/s\n      8192 | /dev/sda | O_DSYNC                                |     0.93 MB/s\n      8192 | /dev/sda | O_DSYNC + ALIGNED                      |     0.92 MB/s\n      8192 | /dev/sda | O_DSYNC + O_DIRECT                     |     0.93 MB/s\n      8192 | /dev/sda | O_SYNC                                 |     0.93 MB/s\n      8192 | /dev/sda | O_SYNC + ALIGNED                       |     0.92 MB/s\n      8192 | /dev/sda | O_SYNC + O_DIRECT                      |     0.92 MB/s\n     16384 | /dev/sda | BUFFERED                               |  3878.79 MB/s\n     16384 | /dev/sda | BUFFERED + ALIGNED                     |  3657.14 MB/s\n     16384 | /dev/sda | O_DIRECT                               |   125.74 MB/s\n     16384 | /dev/sda | AMORTIZED_FDATASYNC                    |   120.98 MB/s\n     16384 | /dev/sda | AMORTIZED_FDATASYNC + ALIGNED          |   119.85 MB/s\n     16384 | /dev/sda | AMORTIZED_FDATASYNC + O_DIRECT         |   121.90 MB/s\n     16384 | /dev/sda | AMORTIZED_FSYNC                        |   121.56 MB/s\n     16384 | /dev/sda | AMORTIZED_FSYNC + ALIGNED              |   120.53 MB/s\n     16384 | /dev/sda | AMORTIZED_FSYNC + O_DIRECT             |   121.79 MB/s\n     16384 | /dev/sda | FDATASYNC                              |     1.84 MB/s\n     16384 | /dev/sda | FDATASYNC + ALIGNED                    |     1.84 MB/s\n     16384 | /dev/sda | FDATASYNC + O_DIRECT                   |     1.84 MB/s\n     16384 | /dev/sda | FSYNC                                  |     1.85 MB/s\n     16384 | /dev/sda | FSYNC + ALIGNED                        |     1.84 MB/s\n     16384 | /dev/sda | FSYNC + O_DIRECT                       |     1.81 MB/s\n     16384 | /dev/sda | O_DSYNC                                |     1.84 MB/s\n     16384 | /dev/sda | O_DSYNC + ALIGNED                      |     1.84 MB/s\n     16384 | /dev/sda | O_DSYNC + O_DIRECT                     |     1.84 MB/s\n     16384 | /dev/sda | O_SYNC                                 |     1.83 MB/s\n     16384 | /dev/sda | O_SYNC + ALIGNED                       |     1.81 MB/s\n     16384 | /dev/sda | O_SYNC + O_DIRECT                      |     1.84 MB/s\n     32768 | /dev/sda | BUFFERED                               |  3657.14 MB/s\n     32768 | /dev/sda | BUFFERED + ALIGNED                     |  4129.03 MB/s\n     32768 | /dev/sda | O_DIRECT                               |   128.39 MB/s\n     32768 | /dev/sda | AMORTIZED_FDATASYNC                    |   120.98 MB/s\n     32768 | /dev/sda | AMORTIZED_FDATASYNC + ALIGNED          |   123.31 MB/s\n     32768 | /dev/sda | AMORTIZED_FDATASYNC + O_DIRECT         |   121.56 MB/s\n     32768 | /dev/sda | AMORTIZED_FSYNC                        |   122.02 MB/s\n     32768 | /dev/sda | AMORTIZED_FSYNC + ALIGNED              |   120.64 MB/s\n     32768 | /dev/sda | AMORTIZED_FSYNC + O_DIRECT             |   121.67 MB/s\n     32768 | /dev/sda | FDATASYNC                              |     3.63 MB/s\n     32768 | /dev/sda | FDATASYNC + ALIGNED                    |     3.64 MB/s\n     32768 | /dev/sda | FDATASYNC + O_DIRECT                   |     3.62 MB/s\n     32768 | /dev/sda | FSYNC                                  |     3.62 MB/s\n     32768 | /dev/sda | FSYNC + ALIGNED                        |     3.62 MB/s\n     32768 | /dev/sda | FSYNC + O_DIRECT                       |     3.62 MB/s\n     32768 | /dev/sda | O_DSYNC                                |     3.62 MB/s\n     32768 | /dev/sda | O_DSYNC + ALIGNED                      |     3.63 MB/s\n     32768 | /dev/sda | O_DSYNC + O_DIRECT                     |     3.62 MB/s\n     32768 | /dev/sda | O_SYNC                                 |     3.63 MB/s\n     32768 | /dev/sda | O_SYNC + ALIGNED                       |     3.62 MB/s\n     32768 | /dev/sda | O_SYNC + O_DIRECT                      |     3.63 MB/s\n     65536 | /dev/sda | BUFFERED                               |  4000.00 MB/s\n     65536 | /dev/sda | BUFFERED + ALIGNED                     |  4000.00 MB/s\n     65536 | /dev/sda | O_DIRECT                               |   128.13 MB/s\n     65536 | /dev/sda | AMORTIZED_FDATASYNC                    |   120.08 MB/s\n     65536 | /dev/sda | AMORTIZED_FDATASYNC + ALIGNED          |   120.08 MB/s\n     65536 | /dev/sda | AMORTIZED_FDATASYNC + O_DIRECT         |   120.64 MB/s\n     65536 | /dev/sda | AMORTIZED_FSYNC                        |   122.96 MB/s\n     65536 | /dev/sda | AMORTIZED_FSYNC + ALIGNED              |   122.72 MB/s\n     65536 | /dev/sda | AMORTIZED_FSYNC + O_DIRECT             |   121.10 MB/s\n     65536 | /dev/sda | FDATASYNC                              |     7.06 MB/s\n     65536 | /dev/sda | FDATASYNC + ALIGNED                    |     7.04 MB/s\n     65536 | /dev/sda | FDATASYNC + O_DIRECT                   |     7.07 MB/s\n     65536 | /dev/sda | FSYNC                                  |     7.06 MB/s\n     65536 | /dev/sda | FSYNC + ALIGNED                        |     7.05 MB/s\n     65536 | /dev/sda | FSYNC + O_DIRECT                       |     7.05 MB/s\n     65536 | /dev/sda | O_DSYNC                                |     7.02 MB/s\n     65536 | /dev/sda | O_DSYNC + ALIGNED                      |     7.05 MB/s\n     65536 | /dev/sda | O_DSYNC + O_DIRECT                     |     7.04 MB/s\n     65536 | /dev/sda | O_SYNC                                 |     7.04 MB/s\n     65536 | /dev/sda | O_SYNC + ALIGNED                       |     7.02 MB/s\n     65536 | /dev/sda | O_SYNC + O_DIRECT                      |     7.05 MB/s\n    131072 | /dev/sda | BUFFERED                               |  3764.71 MB/s\n    131072 | /dev/sda | BUFFERED + ALIGNED                     |  4000.00 MB/s\n    131072 | /dev/sda | O_DIRECT                               |   131.55 MB/s\n    131072 | /dev/sda | AMORTIZED_FDATASYNC                    |   118.19 MB/s\n    131072 | /dev/sda | AMORTIZED_FDATASYNC + ALIGNED          |   120.30 MB/s\n    131072 | /dev/sda | AMORTIZED_FDATASYNC + O_DIRECT         |   121.33 MB/s\n    131072 | /dev/sda | AMORTIZED_FSYNC                        |   119.18 MB/s\n    131072 | /dev/sda | AMORTIZED_FSYNC + ALIGNED              |   120.75 MB/s\n    131072 | /dev/sda | AMORTIZED_FSYNC + O_DIRECT             |   120.87 MB/s\n    131072 | /dev/sda | FDATASYNC                              |    13.32 MB/s\n    131072 | /dev/sda | FDATASYNC + ALIGNED                    |    13.37 MB/s\n    131072 | /dev/sda | FDATASYNC + O_DIRECT                   |    13.36 MB/s\n    131072 | /dev/sda | FSYNC                                  |    13.38 MB/s\n    131072 | /dev/sda | FSYNC + ALIGNED                        |    13.39 MB/s\n    131072 | /dev/sda | FSYNC + O_DIRECT                       |    13.37 MB/s\n    131072 | /dev/sda | O_DSYNC                                |    13.39 MB/s\n    131072 | /dev/sda | O_DSYNC + ALIGNED                      |    13.36 MB/s\n    131072 | /dev/sda | O_DSYNC + O_DIRECT                     |    13.38 MB/s\n    131072 | /dev/sda | O_SYNC                                 |    13.38 MB/s\n    131072 | /dev/sda | O_SYNC + ALIGNED                       |    13.38 MB/s\n    131072 | /dev/sda | O_SYNC + O_DIRECT                      |    13.37 MB/s\n    262144 | /dev/sda | BUFFERED                               |  3764.71 MB/s\n    262144 | /dev/sda | BUFFERED + ALIGNED                     |  3368.42 MB/s\n    262144 | /dev/sda | O_DIRECT                               |   128.13 MB/s\n    262144 | /dev/sda | AMORTIZED_FDATASYNC                    |   120.08 MB/s\n    262144 | /dev/sda | AMORTIZED_FDATASYNC + ALIGNED          |   120.64 MB/s\n    262144 | /dev/sda | AMORTIZED_FDATASYNC + O_DIRECT         |   123.79 MB/s\n    262144 | /dev/sda | AMORTIZED_FSYNC                        |   122.49 MB/s\n    262144 | /dev/sda | AMORTIZED_FSYNC + ALIGNED              |   115.11 MB/s\n    262144 | /dev/sda | AMORTIZED_FSYNC + O_DIRECT             |   122.84 MB/s\n    262144 | /dev/sda | FDATASYNC                              |    23.96 MB/s\n    262144 | /dev/sda | FDATASYNC + ALIGNED                    |    24.14 MB/s\n    262144 | /dev/sda | FDATASYNC + O_DIRECT                   |    24.37 MB/s\n    262144 | /dev/sda | FSYNC                                  |    24.31 MB/s\n    262144 | /dev/sda | FSYNC + ALIGNED                        |    24.30 MB/s\n    262144 | /dev/sda | FSYNC + O_DIRECT                       |    24.22 MB/s\n    262144 | /dev/sda | O_DSYNC                                |    24.23 MB/s\n    262144 | /dev/sda | O_DSYNC + ALIGNED                      |    24.22 MB/s\n    262144 | /dev/sda | O_DSYNC + O_DIRECT                     |    24.17 MB/s\n    262144 | /dev/sda | O_SYNC                                 |    24.27 MB/s\n    262144 | /dev/sda | O_SYNC + ALIGNED                       |    24.38 MB/s\n    262144 | /dev/sda | O_SYNC + O_DIRECT                      |    24.19 MB/s\n    524288 | /dev/sda | BUFFERED                               |  3657.14 MB/s\n    524288 | /dev/sda | BUFFERED + ALIGNED                     |  4000.00 MB/s\n    524288 | /dev/sda | O_DIRECT                               |   131.01 MB/s\n    524288 | /dev/sda | AMORTIZED_FDATASYNC                    |   122.96 MB/s\n    524288 | /dev/sda | AMORTIZED_FDATASYNC + ALIGNED          |   121.56 MB/s\n    524288 | /dev/sda | AMORTIZED_FDATASYNC + O_DIRECT         |   123.43 MB/s\n    524288 | /dev/sda | AMORTIZED_FSYNC                        |   121.90 MB/s\n    524288 | /dev/sda | AMORTIZED_FSYNC + ALIGNED              |   121.67 MB/s\n    524288 | /dev/sda | AMORTIZED_FSYNC + O_DIRECT             |   124.88 MB/s\n    524288 | /dev/sda | FDATASYNC                              |    40.87 MB/s\n    524288 | /dev/sda | FDATASYNC + ALIGNED                    |    40.86 MB/s\n    524288 | /dev/sda | FDATASYNC + O_DIRECT                   |    40.87 MB/s\n    524288 | /dev/sda | FSYNC                                  |    40.97 MB/s\n    524288 | /dev/sda | FSYNC + ALIGNED                        |    40.70 MB/s\n    524288 | /dev/sda | FSYNC + O_DIRECT                       |    40.61 MB/s\n    524288 | /dev/sda | O_DSYNC                                |    40.86 MB/s\n    524288 | /dev/sda | O_DSYNC + ALIGNED                      |    40.73 MB/s\n    524288 | /dev/sda | O_DSYNC + O_DIRECT                     |    41.04 MB/s\n    524288 | /dev/sda | O_SYNC                                 |    40.87 MB/s\n    524288 | /dev/sda | O_SYNC + ALIGNED                       |    40.82 MB/s\n    524288 | /dev/sda | O_SYNC + O_DIRECT                      |    40.92 MB/s\n   1048576 | /dev/sda | BUFFERED                               |  3657.14 MB/s\n   1048576 | /dev/sda | BUFFERED + ALIGNED                     |  4129.03 MB/s\n   1048576 | /dev/sda | O_DIRECT                               |   131.96 MB/s\n   1048576 | /dev/sda | AMORTIZED_FDATASYNC                    |   120.98 MB/s\n   1048576 | /dev/sda | AMORTIZED_FDATASYNC + ALIGNED          |   121.90 MB/s\n   1048576 | /dev/sda | AMORTIZED_FDATASYNC + O_DIRECT         |   124.51 MB/s\n   1048576 | /dev/sda | AMORTIZED_FSYNC                        |   121.90 MB/s\n   1048576 | /dev/sda | AMORTIZED_FSYNC + ALIGNED              |   115.42 MB/s\n   1048576 | /dev/sda | AMORTIZED_FSYNC + O_DIRECT             |   123.67 MB/s\n   1048576 | /dev/sda | FDATASYNC                              |    61.99 MB/s\n   1048576 | /dev/sda | FDATASYNC + ALIGNED                    |    62.38 MB/s\n   1048576 | /dev/sda | FDATASYNC + O_DIRECT                   |    61.60 MB/s\n   1048576 | /dev/sda | FSYNC                                  |    61.96 MB/s\n   1048576 | /dev/sda | FSYNC + ALIGNED                        |    61.90 MB/s\n   1048576 | /dev/sda | FSYNC + O_DIRECT                       |    61.60 MB/s\n   1048576 | /dev/sda | O_DSYNC                                |    62.44 MB/s\n   1048576 | /dev/sda | O_DSYNC + ALIGNED                      |    61.84 MB/s\n   1048576 | /dev/sda | O_DSYNC + O_DIRECT                     |    61.87 MB/s\n   1048576 | /dev/sda | O_SYNC                                 |    61.72 MB/s\n   1048576 | /dev/sda | O_SYNC + ALIGNED                       |    61.60 MB/s\n   1048576 | /dev/sda | O_SYNC + O_DIRECT                      |    62.38 MB/s\n   2097152 | /dev/sda | BUFFERED                               |  3555.56 MB/s\n   2097152 | /dev/sda | BUFFERED + ALIGNED                     |  4000.00 MB/s\n   2097152 | /dev/sda | O_DIRECT                               |   128.64 MB/s\n   2097152 | /dev/sda | AMORTIZED_FDATASYNC                    |   122.61 MB/s\n   2097152 | /dev/sda | AMORTIZED_FDATASYNC + ALIGNED          |   120.30 MB/s\n   2097152 | /dev/sda | AMORTIZED_FDATASYNC + O_DIRECT         |   122.84 MB/s\n   2097152 | /dev/sda | AMORTIZED_FSYNC                        |   120.08 MB/s\n   2097152 | /dev/sda | AMORTIZED_FSYNC + ALIGNED              |   122.61 MB/s\n   2097152 | /dev/sda | AMORTIZED_FSYNC + O_DIRECT             |   123.31 MB/s\n   2097152 | /dev/sda | FDATASYNC                              |    61.72 MB/s\n   2097152 | /dev/sda | FDATASYNC + ALIGNED                    |    62.11 MB/s\n   2097152 | /dev/sda | FDATASYNC + O_DIRECT                   |    61.87 MB/s\n   2097152 | /dev/sda | FSYNC                                  |    61.48 MB/s\n   2097152 | /dev/sda | FSYNC + ALIGNED                        |    62.11 MB/s\n   2097152 | /dev/sda | FSYNC + O_DIRECT                       |    62.14 MB/s\n   2097152 | /dev/sda | O_DSYNC                                |    61.72 MB/s\n   2097152 | /dev/sda | O_DSYNC + ALIGNED                      |    62.11 MB/s\n   2097152 | /dev/sda | O_DSYNC + O_DIRECT                     |    62.44 MB/s\n   2097152 | /dev/sda | O_SYNC                                 |    62.20 MB/s\n   2097152 | /dev/sda | O_SYNC + ALIGNED                       |    61.90 MB/s\n   2097152 | /dev/sda | O_SYNC + O_DIRECT                      |    62.11 MB/s\n   4194304 | /dev/sda | BUFFERED                               |  3459.46 MB/s\n   4194304 | /dev/sda | BUFFERED + ALIGNED                     |  3764.71 MB/s\n   4194304 | /dev/sda | O_DIRECT                               |   129.95 MB/s\n   4194304 | /dev/sda | AMORTIZED_FDATASYNC                    |   120.08 MB/s\n   4194304 | /dev/sda | AMORTIZED_FDATASYNC + ALIGNED          |   121.21 MB/s\n   4194304 | /dev/sda | AMORTIZED_FDATASYNC + O_DIRECT         |   123.67 MB/s\n   4194304 | /dev/sda | AMORTIZED_FSYNC                        |   123.67 MB/s\n   4194304 | /dev/sda | AMORTIZED_FSYNC + ALIGNED              |   122.14 MB/s\n   4194304 | /dev/sda | AMORTIZED_FSYNC + O_DIRECT             |   122.96 MB/s\n   4194304 | /dev/sda | FDATASYNC                              |    83.39 MB/s\n   4194304 | /dev/sda | FDATASYNC + ALIGNED                    |    82.85 MB/s\n   4194304 | /dev/sda | FDATASYNC + O_DIRECT                   |    83.82 MB/s\n   4194304 | /dev/sda | FSYNC                                  |    83.06 MB/s\n   4194304 | /dev/sda | FSYNC + ALIGNED                        |    82.90 MB/s\n   4194304 | /dev/sda | FSYNC + O_DIRECT                       |    82.85 MB/s\n   4194304 | /dev/sda | O_DSYNC                                |    83.06 MB/s\n   4194304 | /dev/sda | O_DSYNC + ALIGNED                      |    83.82 MB/s\n   4194304 | /dev/sda | O_DSYNC + O_DIRECT                     |    82.47 MB/s\n   4194304 | /dev/sda | O_SYNC                                 |    82.63 MB/s\n   4194304 | /dev/sda | O_SYNC + ALIGNED                       |    82.10 MB/s\n   4194304 | /dev/sda | O_SYNC + O_DIRECT                      |    81.58 MB/s\n   8388608 | /dev/sda | BUFFERED                               |  2612.24 MB/s\n   8388608 | /dev/sda | BUFFERED + ALIGNED                     |  2976.74 MB/s\n   8388608 | /dev/sda | O_DIRECT                               |   132.09 MB/s\n   8388608 | /dev/sda | AMORTIZED_FDATASYNC                    |   115.52 MB/s\n   8388608 | /dev/sda | AMORTIZED_FDATASYNC + ALIGNED          |   121.10 MB/s\n   8388608 | /dev/sda | AMORTIZED_FDATASYNC + O_DIRECT         |   119.18 MB/s\n   8388608 | /dev/sda | AMORTIZED_FSYNC                        |   117.32 MB/s\n   8388608 | /dev/sda | AMORTIZED_FSYNC + ALIGNED              |   120.75 MB/s\n   8388608 | /dev/sda | AMORTIZED_FSYNC + O_DIRECT             |   119.07 MB/s\n   8388608 | /dev/sda | FDATASYNC                              |   100.23 MB/s\n   8388608 | /dev/sda | FDATASYNC + ALIGNED                    |    98.92 MB/s\n   8388608 | /dev/sda | FDATASYNC + O_DIRECT                   |    94.67 MB/s\n   8388608 | /dev/sda | FSYNC                                  |    94.81 MB/s\n   8388608 | /dev/sda | FSYNC + ALIGNED                        |    95.31 MB/s\n   8388608 | /dev/sda | FSYNC + O_DIRECT                       |    95.31 MB/s\n   8388608 | /dev/sda | O_DSYNC                                |    93.64 MB/s\n   8388608 | /dev/sda | O_DSYNC + ALIGNED                      |    96.39 MB/s\n   8388608 | /dev/sda | O_DSYNC + O_DIRECT                     |    95.88 MB/s\n   8388608 | /dev/sda | O_SYNC                                 |    93.70 MB/s\n   8388608 | /dev/sda | O_SYNC + ALIGNED                       |    97.64 MB/s\n   8388608 | /dev/sda | O_SYNC + O_DIRECT                      |    94.60 MB/s\n  16777216 | /dev/sda | BUFFERED                               |  1939.39 MB/s\n  16777216 | /dev/sda | BUFFERED + ALIGNED                     |  2723.40 MB/s\n  16777216 | /dev/sda | O_DIRECT                               |   130.61 MB/s\n  16777216 | /dev/sda | AMORTIZED_FDATASYNC                    |   121.67 MB/s\n  16777216 | /dev/sda | AMORTIZED_FDATASYNC + ALIGNED          |   114.80 MB/s\n  16777216 | /dev/sda | AMORTIZED_FDATASYNC + O_DIRECT         |   123.55 MB/s\n  16777216 | /dev/sda | AMORTIZED_FSYNC                        |   120.98 MB/s\n  16777216 | /dev/sda | AMORTIZED_FSYNC + ALIGNED              |   122.61 MB/s\n  16777216 | /dev/sda | AMORTIZED_FSYNC + O_DIRECT             |   124.03 MB/s\n  16777216 | /dev/sda | FDATASYNC                              |   111.21 MB/s\n  16777216 | /dev/sda | FDATASYNC + ALIGNED                    |   112.68 MB/s\n  16777216 | /dev/sda | FDATASYNC + O_DIRECT                   |   110.34 MB/s\n  16777216 | /dev/sda | FSYNC                                  |   111.30 MB/s\n  16777216 | /dev/sda | FSYNC + ALIGNED                        |   112.78 MB/s\n  16777216 | /dev/sda | FSYNC + O_DIRECT                       |   111.89 MB/s\n  16777216 | /dev/sda | O_DSYNC                                |   108.20 MB/s\n  16777216 | /dev/sda | O_DSYNC + ALIGNED                      |   111.79 MB/s\n  16777216 | /dev/sda | O_DSYNC + O_DIRECT                     |   111.99 MB/s\n  16777216 | /dev/sda | O_SYNC                                 |   106.67 MB/s\n  16777216 | /dev/sda | O_SYNC + ALIGNED                       |   111.89 MB/s\n  16777216 | /dev/sda | O_SYNC + O_DIRECT                      |   111.01 MB/s\n  33554432 | /dev/sda | BUFFERED                               |  2245.61 MB/s\n  33554432 | /dev/sda | BUFFERED + ALIGNED                     |  2461.54 MB/s\n  33554432 | /dev/sda | O_DIRECT                               |   127.62 MB/s\n  33554432 | /dev/sda | AMORTIZED_FDATASYNC                    |   118.19 MB/s\n  33554432 | /dev/sda | AMORTIZED_FDATASYNC + ALIGNED          |   120.75 MB/s\n  33554432 | /dev/sda | AMORTIZED_FDATASYNC + O_DIRECT         |   121.56 MB/s\n  33554432 | /dev/sda | AMORTIZED_FSYNC                        |   118.74 MB/s\n  33554432 | /dev/sda | AMORTIZED_FSYNC + ALIGNED              |   121.21 MB/s\n  33554432 | /dev/sda | AMORTIZED_FSYNC + O_DIRECT             |   123.55 MB/s\n  33554432 | /dev/sda | FDATASYNC                              |   113.58 MB/s\n  33554432 | /dev/sda | FDATASYNC + ALIGNED                    |   116.58 MB/s\n  33554432 | /dev/sda | FDATASYNC + O_DIRECT                   |   115.84 MB/s\n  33554432 | /dev/sda | FSYNC                                  |   115.52 MB/s\n  33554432 | /dev/sda | FSYNC + ALIGNED                        |   115.32 MB/s\n  33554432 | /dev/sda | FSYNC + O_DIRECT                       |   116.05 MB/s\n  33554432 | /dev/sda | O_DSYNC                                |   116.68 MB/s\n  33554432 | /dev/sda | O_DSYNC + ALIGNED                      |   116.47 MB/s\n  33554432 | /dev/sda | O_DSYNC + O_DIRECT                     |   116.26 MB/s\n  33554432 | /dev/sda | O_SYNC                                 |   114.59 MB/s\n  33554432 | /dev/sda | O_SYNC + ALIGNED                       |   116.36 MB/s\n  33554432 | /dev/sda | O_SYNC + O_DIRECT                      |   116.05 MB/s\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fronomon%2Fdirect-io","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fronomon%2Fdirect-io","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fronomon%2Fdirect-io/lists"}