neoremind commented on issue #16044:
URL: https://github.com/apache/lucene/issues/16044#issuecomment-4830551502

   @jimczi thank you for catching the alignment bug in benchmark! I appreciate 
your patience, and my apology for the misleading prefetch related results in 
previous runs, should have checked the WILLNEED retcode or use `MMapDirectory` 
without the fully self-contained option.
   
   I get it fixed and reran, the results are consistent with what you showed. 
Updated code in [#16279](https://github.com/apache/lucene/pull/16279).
   
   Setup the same platforms as before.
   
   ## Random read results
   
   16KB reads x 16 reads/op = 256KB per op. Showing T01 and T08 (full data in 
appendix). Unit is ops/ms.
   
   ### CASE 1: Warm
   
   16G file fits in RAM, pre-warmed with `cat file > /dev/null`.
   
   | Strategy | Mac T01 | Mac T08 | EBS T01 | EBS T08 | NVME T01 | NVME T08 |
   |----------|---------|---------|---------|---------|----------|----------|
   | mmap (NORMAL) | 78 | 285 | 37 | 259 | 47 | 320 |
   | mmap (MADV_RANDOM) | 78 | 285 | 37 | 261 | 46 | 320 |
   | mmap + batchedPrefetch (NORMAL) | 62 | 206 | 25 | 117 | 35 | 162 |
   | mmap + batchedPrefetch (RANDOM) | 61 | 197 | 25 | 117 | 35 | 166 |
   | FFI pread | 38 | 76 | 22 | 134 | 32 | 206 |
   | FileChannel | 38 | 73 | 22 | 75 | 30 | 92 |
   
   ### CASE 2: Memory pressure
   
   32G file > ~29G available RAM (JVM takes 2G), pre-warmed.
   
   | Strategy | Mac T01 | Mac T08 | EBS T01 | EBS T08 | NVME T01 | NVME T08 |
   |----------|---------|---------|---------|---------|----------|----------|
   | mmap (NORMAL) | 4.7 | 25 | 0.81 | 4.0 | 2.7 | 17 |
   | mmap (MADV_RANDOM) | 5.0 | 28 | 0.46 | 3.1 | 2.1 | 15 |
   | mmap + batchedPrefetch (NORMAL) | **8.2** | **36** | **2.2** | **7.3** | 
**7.0** | **45** |
   | mmap + batchedPrefetch (RANDOM) | **7.5** | **34** | **2.2** | **7.0** | 
**7.8** | **45** |
   | FFI pread | 4.7 | 28 | 1.3 | 5.3 | 4.1 | 27 |
   | FileChannel | 4.3 | 26 | 1.1 | 4.7 | 3.7 | 25 |
   
   ### CASE 3: Many cold reads
   
   64G file (2x available RAM), ~50% cold reads, pre-warmed.
   
   | Strategy | Mac T01 | Mac T08 | EBS T01 | EBS T08 | NVME T01 | NVME T08 |
   |----------|---------|---------|---------|---------|----------|----------|
   | mmap (NORMAL) | 0.45 | 2.6 | 0.13 | 0.50 | 0.45 | 1.2 |
   | mmap (MADV_RANDOM) | 0.43 | 3.2 | 0.07 | 0.46 | 0.28 | 2.0 |
   | mmap + batchedPrefetch (NORMAL) | **1.2** | **4.3** | **1.4** | **1.7** | 
**3.1** | **7.2** |
   | mmap + batchedPrefetch (RANDOM) | **1.1** | **4.3** | **1.3** | **1.7** | 
**3.2** | **7.2** |
   | FFI pread | 0.91 | 4.3 | 0.24 | 1.7 | 0.54 | 3.9 |
   | FileChannel | 0.78 | 4.2 | 0.21 | 1.4 | 0.53 | 3.9 |
   
   ### CASE 4: Almost all cold reads
   
   64G file (2x available RAM), clear page cache before each iteration, cold 
start.
   
   | Strategy | Mac T01 | Mac T08 | EBS T01 | EBS T08 | NVME T01 | NVME T08 |
   |----------|---------|---------|---------|---------|----------|----------|
   | mmap (NORMAL) | 0.31 | 1.96 | 0.07 | 0.32 | 0.27 | 0.88 |
   | mmap (MADV_RANDOM) | 0.19 | 1.88 | 0.04 | 0.26 | 0.15 | 1.16 |
   | mmap + batchedPrefetch (NORMAL) | **0.39** | **2.7** | **1.2** | **1.4** | 
**2.9** | **6.3** |
   | mmap + batchedPrefetch (RANDOM) | **0.39** | **2.7** | **1.2** | **1.4** | 
**2.9** | **6.3** |
   | FFI pread | 0.38 | 2.6 | 0.13 | 1.1 | 0.29 | 2.3 |
   | FileChannel | 0.38 | 2.6 | 0.13 | 1.1 | 0.29 | 2.3 |
   
   With the fix, mmap + prefetch lets a single thread submit queue depth 16 of 
async I/O. The results show prefetch is the best under memory pressure, same as 
your result. 
   
   On my EC2 c6id.4xlarge Linux NVME, case 4 (almost all cold), not identical 
as yours *"T01 cell was 0.15 for mmap, no prefetch (MADV_RANDOM), and it's 4.19 
ops/ms (~67k IOPS, ~1.25 GB/s) for mmap + prefetch (page-aligned)"*, but 
momentum is the same, T01:
   - mmap + batchedPrefetch: 2.93 ops/ms (~10x than pread)
   - pread: 0.29 ops/ms
   - plain mmap: 0.27 ops/ms
   
   On EC2 c5.4xlarge Linux EBS, case 4, T01: mmap + batchedPrefetch (1.2) vs 
pread (0.13), ~9x higher throughput.
   
   And across all memory-pressure scenarios (case 2,3,4), mmap + 
batchedPrefetch beats pread consistently.
   
   ---
   
   What remains the same from previous analysis:
   
   1. When everything fits in RAM, mmap is 1.5-2x faster than pread on Linux. 
The batched prefetch adds ~25–30% overhead from unnecessary `posix_madvise` 
when pages are already in RAM. This somewhat echos back the design in 
`MemorySegmentIndexInput#prefetch` that skip prefetch when pages are loaded, 
avoids always-on prefetch for hot pages.
   
   2. Without prefetch, mmap alone is still not competitive with pread under 
memory pressure and cold reads on Linux. The page-fault path is inherently more 
expensive than pread's syscall path when pages aren't resident. Prefetch is 
what closes and/or removes the gap.
   
   3. Normal vs Random hint: Normal is good enough by default, from the 
benchmark, I see Random is particularly useful in high concurrent query 
workloads where memory eviction pressure is high on fast NVME device, the 
reason might be Random avoids page eviction waste. On EBS, the story is 
different, readahead amortizes the high latency on remote block fetch, so 
Normal wins there.
   
   ---
   
   I also updated the sequential scan benchmark. The test scenario is a forward 
scan through a file larger than RAM. I setup 1 thread, 128 x 16KB reads per op 
(= 2MB per op) over 64G file (>32G RAM), page cache dropped before each 
iteration.
   
   | Strategy | Mac | EBS | NVME |
   |----------|-----|-----|------|
   | mmap (NORMAL) | 4.14 | 1.93 | 9.43 |
   | mmap (MADV_SEQUENTIAL) | 2.48 | 1.92 | 7.60 |
   | mmap + RANDOM + batchedPrefetch | 7.34 | 1.79 | 11.18 |
   | mmap + RANDOM + slidingPrefetch (2MB window) | 5.42 | 2.39 | 10.01 |
   | FFI pread | 1.95 | 1.85 | 9.56 |
   | FileChannel | 2.02 | 1.75 | 9.52 |
   | O_DIRECT | 0.98 | 0.16 | 0.74 |
   
   On Mac and NVME, pure mmap (NORMAL) already beats pread or matches it. And 
mmap + RANDOM + batchedPrefetch beats all. On EBS, the 2MB sliding window wins 
instead, guess on a high-latency EBS with limited IOPS, one large contiguous 
prefetch is more worthwhile than many separate prefetches because the kernel 
could use larger I/O requests, same as last section's # 3 take.
   
   ---
   
   I agree that the `NativeThreadSet` contention remains the single most 
important valid motivation for a pread Directory. mmap with proper prefetch is 
clearly competitive for the I/O and computation interleaving angle.
   
   I also did some research, found that prefetch is pervasive like your 
examples for queries with respect to term lookups, postings reads, KNN vectors 
scorer, and for scenarios like stored fields, it's opt-in strategy. So it led 
me to learn more from Feng about the real case and workload that triggered this 
issue, what query path. That would help determine whether prefetch + mmap with 
proper advice can solve for that particular scenario, or whether pread is still 
justified.
   
   Lastly — do you think this JMH benchmark in 
[#16279](https://github.com/apache/lucene/pull/16279) is still valuable to be a 
PR? If it's useful, I could modify the benchmark to use the native 
`NIOFSDirectory` and `MMapDirectory`, otherwise I can close. 
   
   Thank you again for your patience and help on clarifying this!
   
   <details>
   <summary>Appendix a. Mac (M3 Pro) JMH results</summary>
   
   # MAC
   
   Macbook M3 Pro, 36G RAM, 26G free available RAM
   
   ## CASE 1. warm read
   
   File fit into memory completely, no real I/O.
   
   ```
   Benchmark                                                (readSize)  
(readsPerOp)   Mode  Cnt    Score    Error   Units
   RandomReadIOBenchmark.ffiPreadDirectIO_T01                    16384          
  16  thrpt    6   50.328 ±  0.929  ops/ms
   RandomReadIOBenchmark.ffiPreadDirectIO_T04                    16384          
  16  thrpt    6  109.672 ±  0.271  ops/ms
   RandomReadIOBenchmark.ffiPreadDirectIO_T08                    16384          
  16  thrpt    6   79.904 ±  0.597  ops/ms
   RandomReadIOBenchmark.ffiPreadDirectIO_T16                    16384          
  16  thrpt    6   68.252 ±  0.348  ops/ms
   RandomReadIOBenchmark.ffiPread_T01                            16384          
  16  thrpt    6   38.001 ±  0.255  ops/ms
   RandomReadIOBenchmark.ffiPread_T04                            16384          
  16  thrpt    6   96.154 ±  0.832  ops/ms
   RandomReadIOBenchmark.ffiPread_T08                            16384          
  16  thrpt    6   75.737 ±  2.233  ops/ms
   RandomReadIOBenchmark.ffiPread_T16                            16384          
  16  thrpt    6   68.337 ±  0.482  ops/ms
   RandomReadIOBenchmark.fileChannelDirectBuffer_T01             16384          
  16  thrpt    6   38.219 ±  1.490  ops/ms
   RandomReadIOBenchmark.fileChannelDirectBuffer_T04             16384          
  16  thrpt    6   94.932 ±  0.492  ops/ms
   RandomReadIOBenchmark.fileChannelDirectBuffer_T08             16384          
  16  thrpt    6   73.459 ±  1.534  ops/ms
   RandomReadIOBenchmark.fileChannelDirectBuffer_T16             16384          
  16  thrpt    6   69.937 ±  1.126  ops/ms
   RandomReadIOBenchmark.mmapBatchedPrefetch_T01                 16384          
  16  thrpt    6   62.009 ±  1.935  ops/ms
   RandomReadIOBenchmark.mmapBatchedPrefetch_T04                 16384          
  16  thrpt    6  183.874 ±  1.569  ops/ms
   RandomReadIOBenchmark.mmapBatchedPrefetch_T08                 16384          
  16  thrpt    6  205.950 ± 26.094  ops/ms
   RandomReadIOBenchmark.mmapBatchedPrefetch_T16                 16384          
  16  thrpt    6  194.784 ±  2.194  ops/ms
   RandomReadIOBenchmark.mmapMadvRandomBatchedPrefetch_T01       16384          
  16  thrpt    6   61.486 ±  0.269  ops/ms
   RandomReadIOBenchmark.mmapMadvRandomBatchedPrefetch_T04       16384          
  16  thrpt    6  183.992 ±  2.139  ops/ms
   RandomReadIOBenchmark.mmapMadvRandomBatchedPrefetch_T08       16384          
  16  thrpt    6  196.960 ±  6.433  ops/ms
   RandomReadIOBenchmark.mmapMadvRandomBatchedPrefetch_T16       16384          
  16  thrpt    6  210.695 ± 46.108  ops/ms
   RandomReadIOBenchmark.mmapMadvRandom_T01                      16384          
  16  thrpt    6   78.504 ±  0.516  ops/ms
   RandomReadIOBenchmark.mmapMadvRandom_T04                      16384          
  16  thrpt    6  224.713 ±  3.181  ops/ms
   RandomReadIOBenchmark.mmapMadvRandom_T08                      16384          
  16  thrpt    6  285.011 ±  4.886  ops/ms
   RandomReadIOBenchmark.mmapMadvRandom_T16                      16384          
  16  thrpt    6  294.829 ±  4.944  ops/ms
   RandomReadIOBenchmark.mmap_T01                                16384          
  16  thrpt    6   78.360 ±  0.492  ops/ms
   RandomReadIOBenchmark.mmap_T04                                16384          
  16  thrpt    6  225.383 ±  0.381  ops/ms
   RandomReadIOBenchmark.mmap_T08                                16384          
  16  thrpt    6  284.718 ±  4.404  ops/ms
   RandomReadIOBenchmark.mmap_T16                                16384          
  16  thrpt    6  295.680 ±  1.009  ops/ms
   ```
   
   ## CASE 2. memory constraints
   
   File barely fit into memory, a bit more than the total RAM size.
   
   ```
   Benchmark                                                (readSize)  
(readsPerOp)   Mode  Cnt   Score    Error   Units
   RandomReadIOBenchmark.ffiPreadDirectIO_T01                    16384          
  16  thrpt    6   8.041 ±  0.245  ops/ms
   RandomReadIOBenchmark.ffiPreadDirectIO_T04                    16384          
  16  thrpt    6  28.406 ±  8.345  ops/ms
   RandomReadIOBenchmark.ffiPreadDirectIO_T08                    16384          
  16  thrpt    6  46.511 ±  9.165  ops/ms
   RandomReadIOBenchmark.ffiPreadDirectIO_T16                    16384          
  16  thrpt    6  71.709 ±  1.317  ops/ms
   RandomReadIOBenchmark.ffiPread_T01                            16384          
  16  thrpt    6   4.726 ±  0.911  ops/ms
   RandomReadIOBenchmark.ffiPread_T04                            16384          
  16  thrpt    6  17.532 ±  0.860  ops/ms
   RandomReadIOBenchmark.ffiPread_T08                            16384          
  16  thrpt    6  27.796 ±  2.500  ops/ms
   RandomReadIOBenchmark.ffiPread_T16                            16384          
  16  thrpt    6  39.581 ±  3.651  ops/ms
   RandomReadIOBenchmark.fileChannelDirectBuffer_T01             16384          
  16  thrpt    6   4.254 ±  0.048  ops/ms
   RandomReadIOBenchmark.fileChannelDirectBuffer_T04             16384          
  16  thrpt    6  15.766 ±  0.900  ops/ms
   RandomReadIOBenchmark.fileChannelDirectBuffer_T08             16384          
  16  thrpt    6  25.876 ±  1.176  ops/ms
   RandomReadIOBenchmark.fileChannelDirectBuffer_T16             16384          
  16  thrpt    6  38.692 ±  2.333  ops/ms
   RandomReadIOBenchmark.mmapBatchedPrefetch_T01                 16384          
  16  thrpt    6   8.228 ±  2.710  ops/ms
   RandomReadIOBenchmark.mmapBatchedPrefetch_T04                 16384          
  16  thrpt    6  24.349 ±  3.047  ops/ms
   RandomReadIOBenchmark.mmapBatchedPrefetch_T08                 16384          
  16  thrpt    6  36.419 ±  1.840  ops/ms
   RandomReadIOBenchmark.mmapBatchedPrefetch_T16                 16384          
  16  thrpt    6  45.851 ± 16.273  ops/ms
   RandomReadIOBenchmark.mmapMadvRandomBatchedPrefetch_T01       16384          
  16  thrpt    6   7.491 ±  0.817  ops/ms
   RandomReadIOBenchmark.mmapMadvRandomBatchedPrefetch_T04       16384          
  16  thrpt    6  22.242 ±  2.240  ops/ms
   RandomReadIOBenchmark.mmapMadvRandomBatchedPrefetch_T08       16384          
  16  thrpt    6  33.553 ±  3.516  ops/ms
   RandomReadIOBenchmark.mmapMadvRandomBatchedPrefetch_T16       16384          
  16  thrpt    6  44.882 ±  2.499  ops/ms
   RandomReadIOBenchmark.mmapMadvRandom_T01                      16384          
  16  thrpt    6   4.973 ±  0.678  ops/ms
   RandomReadIOBenchmark.mmapMadvRandom_T04                      16384          
  16  thrpt    6  16.478 ±  4.038  ops/ms
   RandomReadIOBenchmark.mmapMadvRandom_T08                      16384          
  16  thrpt    6  27.551 ±  3.257  ops/ms
   RandomReadIOBenchmark.mmapMadvRandom_T16                      16384          
  16  thrpt    6  38.527 ±  7.858  ops/ms
   RandomReadIOBenchmark.mmap_T01                                16384          
  16  thrpt    6   4.700 ±  0.354  ops/ms
   RandomReadIOBenchmark.mmap_T04                                16384          
  16  thrpt    6  16.446 ±  1.423  ops/ms
   RandomReadIOBenchmark.mmap_T08                                16384          
  16  thrpt    6  24.617 ±  5.016  ops/ms
   RandomReadIOBenchmark.mmap_T16                                16384          
  16  thrpt    6  35.865 ±  3.309  ops/ms
   ```
   
   ## CASE 3. many cold reads
   
   File can fit into memory, total RAM can only hold half of the size of the 
file. No page cache clearing before each iteration.
   
   ```
   Benchmark                                                (readSize)  
(readsPerOp)   Mode  Cnt   Score   Error   Units
   RandomReadIOBenchmark.ffiPreadDirectIO_T01                    16384          
  16  thrpt    6   1.130 ± 0.144  ops/ms
   RandomReadIOBenchmark.ffiPreadDirectIO_T04                    16384          
  16  thrpt    6   4.182 ± 0.281  ops/ms
   RandomReadIOBenchmark.ffiPreadDirectIO_T08                    16384          
  16  thrpt    6   7.265 ± 0.437  ops/ms
   RandomReadIOBenchmark.ffiPreadDirectIO_T16                    16384          
  16  thrpt    6  10.947 ± 0.407  ops/ms
   RandomReadIOBenchmark.ffiPread_T01                            16384          
  16  thrpt    6   0.913 ± 0.086  ops/ms
   RandomReadIOBenchmark.ffiPread_T04                            16384          
  16  thrpt    6   2.739 ± 0.124  ops/ms
   RandomReadIOBenchmark.ffiPread_T08                            16384          
  16  thrpt    6   4.258 ± 0.197  ops/ms
   RandomReadIOBenchmark.ffiPread_T16                            16384          
  16  thrpt    6   5.628 ± 0.226  ops/ms
   RandomReadIOBenchmark.fileChannelDirectBuffer_T01             16384          
  16  thrpt    6   0.775 ± 0.015  ops/ms
   RandomReadIOBenchmark.fileChannelDirectBuffer_T04             16384          
  16  thrpt    6   2.635 ± 0.075  ops/ms
   RandomReadIOBenchmark.fileChannelDirectBuffer_T08             16384          
  16  thrpt    6   4.211 ± 0.051  ops/ms
   RandomReadIOBenchmark.fileChannelDirectBuffer_T16             16384          
  16  thrpt    6   5.629 ± 0.045  ops/ms
   RandomReadIOBenchmark.mmapBatchedPrefetch_T01                 16384          
  16  thrpt    6   1.182 ± 0.079  ops/ms
   RandomReadIOBenchmark.mmapBatchedPrefetch_T04                 16384          
  16  thrpt    6   3.234 ± 0.412  ops/ms
   RandomReadIOBenchmark.mmapBatchedPrefetch_T08                 16384          
  16  thrpt    6   4.277 ± 0.467  ops/ms
   RandomReadIOBenchmark.mmapBatchedPrefetch_T16                 16384          
  16  thrpt    6   5.086 ± 0.999  ops/ms
   RandomReadIOBenchmark.mmapMadvRandomBatchedPrefetch_T01       16384          
  16  thrpt    6   1.103 ± 0.030  ops/ms
   RandomReadIOBenchmark.mmapMadvRandomBatchedPrefetch_T04       16384          
  16  thrpt    6   3.165 ± 0.387  ops/ms
   RandomReadIOBenchmark.mmapMadvRandomBatchedPrefetch_T08       16384          
  16  thrpt    6   4.266 ± 0.555  ops/ms
   RandomReadIOBenchmark.mmapMadvRandomBatchedPrefetch_T16       16384          
  16  thrpt    6   4.940 ± 0.949  ops/ms
   RandomReadIOBenchmark.mmapMadvRandom_T01                      16384          
  16  thrpt    6   0.426 ± 0.046  ops/ms
   RandomReadIOBenchmark.mmapMadvRandom_T04                      16384          
  16  thrpt    6   1.938 ± 0.092  ops/ms
   RandomReadIOBenchmark.mmapMadvRandom_T08                      16384          
  16  thrpt    6   3.203 ± 0.473  ops/ms
   RandomReadIOBenchmark.mmapMadvRandom_T16                      16384          
  16  thrpt    6   4.418 ± 0.586  ops/ms
   RandomReadIOBenchmark.mmap_T01                                16384          
  16  thrpt    6   0.447 ± 0.013  ops/ms
   RandomReadIOBenchmark.mmap_T04                                16384          
  16  thrpt    6   1.530 ± 0.037  ops/ms
   RandomReadIOBenchmark.mmap_T08                                16384          
  16  thrpt    6   2.624 ± 0.256  ops/ms
   RandomReadIOBenchmark.mmap_T16                                16384          
  16  thrpt    6   3.344 ± 0.358  ops/ms
   ```
   
   ## CASE 4. all cold reads
   
   File can fit into memory, total RAM can only hold half of the size of the 
file. Clear page cache before each iteration
   
   ```
   Benchmark                                                (readSize)  
(readsPerOp)   Mode  Cnt  Score   Error   Units
   RandomReadIOBenchmark.ffiPreadDirectIO_T01                    16384          
  16  thrpt    6  0.460 ± 0.119  ops/ms
   RandomReadIOBenchmark.ffiPreadDirectIO_T04                    16384          
  16  thrpt    6  1.923 ± 0.088  ops/ms
   RandomReadIOBenchmark.ffiPreadDirectIO_T08                    16384          
  16  thrpt    6  3.685 ± 0.221  ops/ms
   RandomReadIOBenchmark.ffiPreadDirectIO_T16                    16384          
  16  thrpt    6  5.729 ± 0.107  ops/ms
   RandomReadIOBenchmark.ffiPread_T01                            16384          
  16  thrpt    6  0.383 ± 0.046  ops/ms
   RandomReadIOBenchmark.ffiPread_T04                            16384          
  16  thrpt    6  1.560 ± 0.039  ops/ms
   RandomReadIOBenchmark.ffiPread_T08                            16384          
  16  thrpt    6  2.595 ± 0.087  ops/ms
   RandomReadIOBenchmark.ffiPread_T16                            16384          
  16  thrpt    6  3.528 ± 0.033  ops/ms
   RandomReadIOBenchmark.fileChannelDirectBuffer_T01             16384          
  16  thrpt    6  0.378 ± 0.037  ops/ms
   RandomReadIOBenchmark.fileChannelDirectBuffer_T04             16384          
  16  thrpt    6  1.563 ± 0.034  ops/ms
   RandomReadIOBenchmark.fileChannelDirectBuffer_T08             16384          
  16  thrpt    6  2.627 ± 0.164  ops/ms
   RandomReadIOBenchmark.fileChannelDirectBuffer_T16             16384          
  16  thrpt    6  3.491 ± 0.139  ops/ms
   RandomReadIOBenchmark.mmapBatchedPrefetch_T01                 16384          
  16  thrpt    6  0.385 ± 0.025  ops/ms
   RandomReadIOBenchmark.mmapBatchedPrefetch_T04                 16384          
  16  thrpt    6  1.583 ± 0.061  ops/ms
   RandomReadIOBenchmark.mmapBatchedPrefetch_T08                 16384          
  16  thrpt    6  2.688 ± 0.071  ops/ms
   RandomReadIOBenchmark.mmapBatchedPrefetch_T16                 16384          
  16  thrpt    6  3.548 ± 0.098  ops/ms
   RandomReadIOBenchmark.mmapMadvRandomBatchedPrefetch_T01       16384          
  16  thrpt    6  0.387 ± 0.029  ops/ms
   RandomReadIOBenchmark.mmapMadvRandomBatchedPrefetch_T04       16384          
  16  thrpt    6  1.570 ± 0.037  ops/ms
   RandomReadIOBenchmark.mmapMadvRandomBatchedPrefetch_T08       16384          
  16  thrpt    6  2.667 ± 0.078  ops/ms
   RandomReadIOBenchmark.mmapMadvRandomBatchedPrefetch_T16       16384          
  16  thrpt    6  3.517 ± 0.142  ops/ms
   RandomReadIOBenchmark.mmapMadvRandom_T01                      16384          
  16  thrpt    6  0.187 ± 0.007  ops/ms
   RandomReadIOBenchmark.mmapMadvRandom_T04                      16384          
  16  thrpt    6  0.960 ± 0.029  ops/ms
   RandomReadIOBenchmark.mmapMadvRandom_T08                      16384          
  16  thrpt    6  1.877 ± 0.070  ops/ms
   RandomReadIOBenchmark.mmapMadvRandom_T16                      16384          
  16  thrpt    6  2.976 ± 0.124  ops/ms
   RandomReadIOBenchmark.mmap_T01                                16384          
  16  thrpt    6  0.307 ± 0.007  ops/ms
   RandomReadIOBenchmark.mmap_T04                                16384          
  16  thrpt    6  0.673 ± 0.029  ops/ms
   RandomReadIOBenchmark.mmap_T08                                16384          
  16  thrpt    6  1.955 ± 0.051  ops/ms
   RandomReadIOBenchmark.mmap_T16                                16384          
  16  thrpt    6  2.322 ± 0.129  ops/ms
   ```
   
   </details>
   
   <details>
   <summary>Appendix b. Linux EBS (EC2 c5.4xlarge) JMH results</summary>
   
   # Linux (EBS, io2, 20000 IOPS provisioned)
   
   c5.4xlarge, 16 vCPU, 32G RAM
   
   ## CASE 1. warm read
   
   ```
   Benchmark                                                (readSize)  
(readsPerOp)   Mode  Cnt    Score    Error   Units
   RandomReadIOBenchmark.ffiPreadDirectIO_T01                    16384          
  16  thrpt    6    0.152 ±  0.006  ops/ms
   RandomReadIOBenchmark.ffiPreadDirectIO_T04                    16384          
  16  thrpt    6    0.627 ±  0.013  ops/ms
   RandomReadIOBenchmark.ffiPreadDirectIO_T08                    16384          
  16  thrpt    6    1.261 ±  0.036  ops/ms
   RandomReadIOBenchmark.ffiPreadDirectIO_T16                    16384          
  16  thrpt    6    1.250 ±  0.001  ops/ms
   RandomReadIOBenchmark.ffiPread_T01                            16384          
  16  thrpt    6   22.045 ±  0.186  ops/ms
   RandomReadIOBenchmark.ffiPread_T04                            16384          
  16  thrpt    6   78.380 ±  1.012  ops/ms
   RandomReadIOBenchmark.ffiPread_T08                            16384          
  16  thrpt    6  134.079 ±  4.007  ops/ms
   RandomReadIOBenchmark.ffiPread_T16                            16384          
  16  thrpt    6  183.704 ±  0.410  ops/ms
   RandomReadIOBenchmark.fileChannelDirectBuffer_T01             16384          
  16  thrpt    6   21.853 ±  0.120  ops/ms
   RandomReadIOBenchmark.fileChannelDirectBuffer_T04             16384          
  16  thrpt    6   68.545 ±  2.011  ops/ms
   RandomReadIOBenchmark.fileChannelDirectBuffer_T08             16384          
  16  thrpt    6   75.257 ±  1.122  ops/ms
   RandomReadIOBenchmark.fileChannelDirectBuffer_T16             16384          
  16  thrpt    6   83.192 ±  9.082  ops/ms
   RandomReadIOBenchmark.mmapBatchedPrefetch_T01                 16384          
  16  thrpt    6   24.984 ±  0.869  ops/ms
   RandomReadIOBenchmark.mmapBatchedPrefetch_T04                 16384          
  16  thrpt    6   80.748 ±  1.320  ops/ms
   RandomReadIOBenchmark.mmapBatchedPrefetch_T08                 16384          
  16  thrpt    6  116.826 ±  0.473  ops/ms
   RandomReadIOBenchmark.mmapBatchedPrefetch_T16                 16384          
  16  thrpt    6  163.084 ±  0.469  ops/ms
   RandomReadIOBenchmark.mmapMadvRandomBatchedPrefetch_T01       16384          
  16  thrpt    6   24.815 ±  1.194  ops/ms
   RandomReadIOBenchmark.mmapMadvRandomBatchedPrefetch_T04       16384          
  16  thrpt    6   81.699 ±  2.148  ops/ms
   RandomReadIOBenchmark.mmapMadvRandomBatchedPrefetch_T08       16384          
  16  thrpt    6  117.014 ±  1.515  ops/ms
   RandomReadIOBenchmark.mmapMadvRandomBatchedPrefetch_T16       16384          
  16  thrpt    6  162.005 ±  2.717  ops/ms
   RandomReadIOBenchmark.mmapMadvRandom_T01                      16384          
  16  thrpt    6   37.188 ±  1.406  ops/ms
   RandomReadIOBenchmark.mmapMadvRandom_T04                      16384          
  16  thrpt    6  140.144 ±  1.838  ops/ms
   RandomReadIOBenchmark.mmapMadvRandom_T08                      16384          
  16  thrpt    6  260.608 ±  0.816  ops/ms
   RandomReadIOBenchmark.mmapMadvRandom_T16                      16384          
  16  thrpt    6  282.622 ±  1.384  ops/ms
   RandomReadIOBenchmark.mmap_T01                                16384          
  16  thrpt    6   37.334 ±  0.706  ops/ms
   RandomReadIOBenchmark.mmap_T04                                16384          
  16  thrpt    6  140.915 ±  1.565  ops/ms
   RandomReadIOBenchmark.mmap_T08                                16384          
  16  thrpt    6  258.861 ±  7.118  ops/ms
   RandomReadIOBenchmark.mmap_T16                                16384          
  16  thrpt    6  282.345 ±  2.026  ops/ms
   ```
   
   ## CASE 2. memory constraints
   
   
   ```
   Benchmark                                                (readSize)  
(readsPerOp)   Mode  Cnt  Score   Error   Units
   RandomReadIOBenchmark.ffiPreadDirectIO_T01                    16384          
  16  thrpt    6  0.154 ± 0.005  ops/ms
   RandomReadIOBenchmark.ffiPreadDirectIO_T04                    16384          
  16  thrpt    6  0.636 ± 0.007  ops/ms
   RandomReadIOBenchmark.ffiPreadDirectIO_T08                    16384          
  16  thrpt    6  1.276 ± 0.049  ops/ms
   RandomReadIOBenchmark.ffiPreadDirectIO_T16                    16384          
  16  thrpt    6  1.246 ± 0.027  ops/ms
   RandomReadIOBenchmark.ffiPread_T01                            16384          
  16  thrpt    6  1.277 ± 0.122  ops/ms
   RandomReadIOBenchmark.ffiPread_T04                            16384          
  16  thrpt    6  4.621 ± 0.326  ops/ms
   RandomReadIOBenchmark.ffiPread_T08                            16384          
  16  thrpt    6  5.306 ± 0.338  ops/ms
   RandomReadIOBenchmark.ffiPread_T16                            16384          
  16  thrpt    6  4.958 ± 0.168  ops/ms
   RandomReadIOBenchmark.fileChannelDirectBuffer_T01             16384          
  16  thrpt    6  1.073 ± 0.045  ops/ms
   RandomReadIOBenchmark.fileChannelDirectBuffer_T04             16384          
  16  thrpt    6  4.355 ± 0.210  ops/ms
   RandomReadIOBenchmark.fileChannelDirectBuffer_T08             16384          
  16  thrpt    6  4.733 ± 0.101  ops/ms
   RandomReadIOBenchmark.fileChannelDirectBuffer_T16             16384          
  16  thrpt    6  4.644 ± 0.103  ops/ms
   RandomReadIOBenchmark.mmapBatchedPrefetch_T01                 16384          
  16  thrpt    6  2.216 ± 0.087  ops/ms
   RandomReadIOBenchmark.mmapBatchedPrefetch_T04                 16384          
  16  thrpt    6  7.546 ± 0.576  ops/ms
   RandomReadIOBenchmark.mmapBatchedPrefetch_T08                 16384          
  16  thrpt    6  7.298 ± 0.726  ops/ms
   RandomReadIOBenchmark.mmapBatchedPrefetch_T16                 16384          
  16  thrpt    6  7.112 ± 0.701  ops/ms
   RandomReadIOBenchmark.mmapMadvRandomBatchedPrefetch_T01       16384          
  16  thrpt    6  2.234 ± 0.092  ops/ms
   RandomReadIOBenchmark.mmapMadvRandomBatchedPrefetch_T04       16384          
  16  thrpt    6  7.014 ± 0.606  ops/ms
   RandomReadIOBenchmark.mmapMadvRandomBatchedPrefetch_T08       16384          
  16  thrpt    6  6.983 ± 0.757  ops/ms
   RandomReadIOBenchmark.mmapMadvRandomBatchedPrefetch_T16       16384          
  16  thrpt    6  6.865 ± 0.698  ops/ms
   RandomReadIOBenchmark.mmapMadvRandom_T01                      16384          
  16  thrpt    6  0.456 ± 0.016  ops/ms
   RandomReadIOBenchmark.mmapMadvRandom_T04                      16384          
  16  thrpt    6  1.899 ± 0.060  ops/ms
   RandomReadIOBenchmark.mmapMadvRandom_T08                      16384          
  16  thrpt    6  3.143 ± 0.079  ops/ms
   RandomReadIOBenchmark.mmapMadvRandom_T16                      16384          
  16  thrpt    6  3.106 ± 0.052  ops/ms
   RandomReadIOBenchmark.mmap_T01                                16384          
  16  thrpt    6  0.810 ± 0.048  ops/ms
   RandomReadIOBenchmark.mmap_T04                                16384          
  16  thrpt    6  3.322 ± 0.163  ops/ms
   RandomReadIOBenchmark.mmap_T08                                16384          
  16  thrpt    6  3.992 ± 0.834  ops/ms
   RandomReadIOBenchmark.mmap_T16                                16384          
  16  thrpt    6  4.023 ± 0.814  ops/ms
   ```
   
   ## CASE 3. many cold reads
   
   ```
   Benchmark                                                (readSize)  
(readsPerOp)   Mode  Cnt  Score   Error   Units
   RandomReadIOBenchmark.ffiPreadDirectIO_T01                    16384          
  16  thrpt    6  0.145 ± 0.002  ops/ms
   RandomReadIOBenchmark.ffiPreadDirectIO_T04                    16384          
  16  thrpt    6  0.598 ± 0.007  ops/ms
   RandomReadIOBenchmark.ffiPreadDirectIO_T08                    16384          
  16  thrpt    6  1.196 ± 0.050  ops/ms
   RandomReadIOBenchmark.ffiPreadDirectIO_T16                    16384          
  16  thrpt    6  1.250 ± 0.001  ops/ms
   RandomReadIOBenchmark.ffiPread_T01                            16384          
  16  thrpt    6  0.238 ± 0.010  ops/ms
   RandomReadIOBenchmark.ffiPread_T04                            16384          
  16  thrpt    6  0.920 ± 0.030  ops/ms
   RandomReadIOBenchmark.ffiPread_T08                            16384          
  16  thrpt    6  1.677 ± 0.168  ops/ms
   RandomReadIOBenchmark.ffiPread_T16                            16384          
  16  thrpt    6  1.527 ± 0.071  ops/ms
   RandomReadIOBenchmark.fileChannelDirectBuffer_T01             16384          
  16  thrpt    6  0.212 ± 0.006  ops/ms
   RandomReadIOBenchmark.fileChannelDirectBuffer_T04             16384          
  16  thrpt    6  0.865 ± 0.026  ops/ms
   RandomReadIOBenchmark.fileChannelDirectBuffer_T08             16384          
  16  thrpt    6  1.428 ± 0.030  ops/ms
   RandomReadIOBenchmark.fileChannelDirectBuffer_T16             16384          
  16  thrpt    6  1.387 ± 0.033  ops/ms
   RandomReadIOBenchmark.mmapBatchedPrefetch_T01                 16384          
  16  thrpt    6  1.353 ± 0.076  ops/ms
   RandomReadIOBenchmark.mmapBatchedPrefetch_T04                 16384          
  16  thrpt    6  1.711 ± 0.008  ops/ms
   RandomReadIOBenchmark.mmapBatchedPrefetch_T08                 16384          
  16  thrpt    6  1.701 ± 0.011  ops/ms
   RandomReadIOBenchmark.mmapBatchedPrefetch_T16                 16384          
  16  thrpt    6  1.685 ± 0.020  ops/ms
   RandomReadIOBenchmark.mmapMadvRandomBatchedPrefetch_T01       16384          
  16  thrpt    6  1.309 ± 0.085  ops/ms
   RandomReadIOBenchmark.mmapMadvRandomBatchedPrefetch_T04       16384          
  16  thrpt    6  1.670 ± 0.017  ops/ms
   RandomReadIOBenchmark.mmapMadvRandomBatchedPrefetch_T08       16384          
  16  thrpt    6  1.659 ± 0.012  ops/ms
   RandomReadIOBenchmark.mmapMadvRandomBatchedPrefetch_T16       16384          
  16  thrpt    6  1.650 ± 0.013  ops/ms
   RandomReadIOBenchmark.mmapMadvRandom_T01                      16384          
  16  thrpt    6  0.071 ± 0.003  ops/ms
   RandomReadIOBenchmark.mmapMadvRandom_T04                      16384          
  16  thrpt    6  0.287 ± 0.005  ops/ms
   RandomReadIOBenchmark.mmapMadvRandom_T08                      16384          
  16  thrpt    6  0.462 ± 0.003  ops/ms
   RandomReadIOBenchmark.mmapMadvRandom_T16                      16384          
  16  thrpt    6  0.462 ± 0.005  ops/ms
   RandomReadIOBenchmark.mmap_T01                                16384          
  16  thrpt    6  0.127 ± 0.018  ops/ms
   RandomReadIOBenchmark.mmap_T04                                16384          
  16  thrpt    6  0.506 ± 0.022  ops/ms
   RandomReadIOBenchmark.mmap_T08                                16384          
  16  thrpt    6  0.497 ± 0.020  ops/ms
   RandomReadIOBenchmark.mmap_T16                                16384          
  16  thrpt    6  0.504 ± 0.017  ops/ms
   ```
   
   ## CASE 4. all cold reads
   
   
   ```
   Benchmark                                                (readSize)  
(readsPerOp)   Mode  Cnt  Score   Error   Units
   RandomReadIOBenchmark.ffiPreadDirectIO_T01                    16384          
  16  thrpt    6  0.151 ± 0.004  ops/ms
   RandomReadIOBenchmark.ffiPreadDirectIO_T04                    16384          
  16  thrpt    6  0.628 ± 0.033  ops/ms
   RandomReadIOBenchmark.ffiPreadDirectIO_T08                    16384          
  16  thrpt    6  1.289 ± 0.030  ops/ms
   RandomReadIOBenchmark.ffiPreadDirectIO_T16                    16384          
  16  thrpt    6  1.281 ± 0.034  ops/ms
   RandomReadIOBenchmark.ffiPread_T01                            16384          
  16  thrpt    6  0.134 ± 0.003  ops/ms
   RandomReadIOBenchmark.ffiPread_T04                            16384          
  16  thrpt    6  0.548 ± 0.016  ops/ms
   RandomReadIOBenchmark.ffiPread_T08                            16384          
  16  thrpt    6  1.079 ± 0.037  ops/ms
   RandomReadIOBenchmark.ffiPread_T16                            16384          
  16  thrpt    6  1.359 ± 0.037  ops/ms
   RandomReadIOBenchmark.fileChannelDirectBuffer_T01             16384          
  16  thrpt    6  0.131 ± 0.004  ops/ms
   RandomReadIOBenchmark.fileChannelDirectBuffer_T04             16384          
  16  thrpt    6  0.544 ± 0.008  ops/ms
   RandomReadIOBenchmark.fileChannelDirectBuffer_T08             16384          
  16  thrpt    6  1.094 ± 0.040  ops/ms
   RandomReadIOBenchmark.fileChannelDirectBuffer_T16             16384          
  16  thrpt    6  1.361 ± 0.037  ops/ms
   RandomReadIOBenchmark.mmapBatchedPrefetch_T01                 16384          
  16  thrpt    6  1.183 ± 0.103  ops/ms
   RandomReadIOBenchmark.mmapBatchedPrefetch_T04                 16384          
  16  thrpt    6  1.351 ± 0.077  ops/ms
   RandomReadIOBenchmark.mmapBatchedPrefetch_T08                 16384          
  16  thrpt    6  1.351 ± 0.075  ops/ms
   RandomReadIOBenchmark.mmapBatchedPrefetch_T16                 16384          
  16  thrpt    6  1.378 ± 0.095  ops/ms
   RandomReadIOBenchmark.mmapMadvRandomBatchedPrefetch_T01       16384          
  16  thrpt    6  1.187 ± 0.072  ops/ms
   RandomReadIOBenchmark.mmapMadvRandomBatchedPrefetch_T04       16384          
  16  thrpt    6  1.351 ± 0.075  ops/ms
   RandomReadIOBenchmark.mmapMadvRandomBatchedPrefetch_T08       16384          
  16  thrpt    6  1.351 ± 0.078  ops/ms
   RandomReadIOBenchmark.mmapMadvRandomBatchedPrefetch_T16       16384          
  16  thrpt    6  1.377 ± 0.091  ops/ms
   RandomReadIOBenchmark.mmapMadvRandom_T01                      16384          
  16  thrpt    6  0.038 ± 0.001  ops/ms
   RandomReadIOBenchmark.mmapMadvRandom_T04                      16384          
  16  thrpt    6  0.156 ± 0.007  ops/ms
   RandomReadIOBenchmark.mmapMadvRandom_T08                      16384          
  16  thrpt    6  0.262 ± 0.006  ops/ms
   RandomReadIOBenchmark.mmapMadvRandom_T16                      16384          
  16  thrpt    6  0.263 ± 0.007  ops/ms
   RandomReadIOBenchmark.mmap_T01                                16384          
  16  thrpt    6  0.070 ± 0.002  ops/ms
   RandomReadIOBenchmark.mmap_T04                                16384          
  16  thrpt    6  0.305 ± 0.024  ops/ms
   RandomReadIOBenchmark.mmap_T08                                16384          
  16  thrpt    6  0.320 ± 0.026  ops/ms
   RandomReadIOBenchmark.mmap_T16                                16384          
  16  thrpt    6  0.326 ± 0.032  ops/ms
   ```
   
   </details>
   
   <details>
   <summary>Appendix c. Linux NVME (EC2 c6id.4xlarge) JMH results</summary>
   
   
   # Linux (NVME ssd)
   
   c6id.4xlarge, 16 vCPU, 32G RAM
   
   ## CASE 1. warm read
   
   ```
   Benchmark                                                (readSize)  
(readsPerOp)   Mode  Cnt    Score    Error   Units
   RandomReadIOBenchmark.ffiPreadDirectIO_T01                    16384          
  16  thrpt    6    0.593 ±  0.001  ops/ms
   RandomReadIOBenchmark.ffiPreadDirectIO_T04                    16384          
  16  thrpt    6    2.254 ±  0.006  ops/ms
   RandomReadIOBenchmark.ffiPreadDirectIO_T08                    16384          
  16  thrpt    6    4.160 ±  0.018  ops/ms
   RandomReadIOBenchmark.ffiPreadDirectIO_T16                    16384          
  16  thrpt    6    4.804 ±  0.001  ops/ms
   RandomReadIOBenchmark.ffiPread_T01                            16384          
  16  thrpt    6   31.549 ±  1.051  ops/ms
   RandomReadIOBenchmark.ffiPread_T04                            16384          
  16  thrpt    6  115.482 ±  1.106  ops/ms
   RandomReadIOBenchmark.ffiPread_T08                            16384          
  16  thrpt    6  206.155 ±  8.015  ops/ms
   RandomReadIOBenchmark.ffiPread_T16                            16384          
  16  thrpt    6  262.329 ±  5.810  ops/ms
   RandomReadIOBenchmark.fileChannelDirectBuffer_T01             16384          
  16  thrpt    6   29.935 ±  1.104  ops/ms
   RandomReadIOBenchmark.fileChannelDirectBuffer_T04             16384          
  16  thrpt    6   91.984 ±  4.813  ops/ms
   RandomReadIOBenchmark.fileChannelDirectBuffer_T08             16384          
  16  thrpt    6   92.487 ± 13.579  ops/ms
   RandomReadIOBenchmark.fileChannelDirectBuffer_T16             16384          
  16  thrpt    6  101.364 ±  5.841  ops/ms
   RandomReadIOBenchmark.mmapBatchedPrefetch_T01                 16384          
  16  thrpt    6   35.051 ±  1.196  ops/ms
   RandomReadIOBenchmark.mmapBatchedPrefetch_T04                 16384          
  16  thrpt    6  113.359 ±  6.307  ops/ms
   RandomReadIOBenchmark.mmapBatchedPrefetch_T08                 16384          
  16  thrpt    6  162.372 ± 15.998  ops/ms
   RandomReadIOBenchmark.mmapBatchedPrefetch_T16                 16384          
  16  thrpt    6  209.195 ±  9.044  ops/ms
   RandomReadIOBenchmark.mmapMadvRandomBatchedPrefetch_T01       16384          
  16  thrpt    6   35.077 ±  1.908  ops/ms
   RandomReadIOBenchmark.mmapMadvRandomBatchedPrefetch_T04       16384          
  16  thrpt    6  112.625 ±  6.860  ops/ms
   RandomReadIOBenchmark.mmapMadvRandomBatchedPrefetch_T08       16384          
  16  thrpt    6  166.069 ±  8.173  ops/ms
   RandomReadIOBenchmark.mmapMadvRandomBatchedPrefetch_T16       16384          
  16  thrpt    6  216.882 ±  9.147  ops/ms
   RandomReadIOBenchmark.mmapMadvRandom_T01                      16384          
  16  thrpt    6   46.208 ±  1.517  ops/ms
   RandomReadIOBenchmark.mmapMadvRandom_T04                      16384          
  16  thrpt    6  175.019 ±  3.095  ops/ms
   RandomReadIOBenchmark.mmapMadvRandom_T08                      16384          
  16  thrpt    6  320.395 ±  4.058  ops/ms
   RandomReadIOBenchmark.mmapMadvRandom_T16                      16384          
  16  thrpt    6  334.148 ±  3.520  ops/ms
   RandomReadIOBenchmark.mmap_T01                                16384          
  16  thrpt    6   46.554 ±  1.521  ops/ms
   RandomReadIOBenchmark.mmap_T04                                16384          
  16  thrpt    6  176.418 ±  1.161  ops/ms
   RandomReadIOBenchmark.mmap_T08                                16384          
  16  thrpt    6  319.788 ±  7.485  ops/ms
   RandomReadIOBenchmark.mmap_T16                                16384          
  16  thrpt    6  333.884 ±  3.167  ops/ms
   ```
   
   ## CASE 2. memory constraints
   
   ```
   Benchmark                                                (readSize)  
(readsPerOp)   Mode  Cnt   Score    Error   Units
   RandomReadIOBenchmark.ffiPreadDirectIO_T01                    16384          
  16  thrpt    6   0.593 ±  0.001  ops/ms
   RandomReadIOBenchmark.ffiPreadDirectIO_T04                    16384          
  16  thrpt    6   2.254 ±  0.014  ops/ms
   RandomReadIOBenchmark.ffiPreadDirectIO_T08                    16384          
  16  thrpt    6   4.163 ±  0.008  ops/ms
   RandomReadIOBenchmark.ffiPreadDirectIO_T16                    16384          
  16  thrpt    6   4.804 ±  0.001  ops/ms
   RandomReadIOBenchmark.ffiPread_T01                            16384          
  16  thrpt    6   4.120 ±  0.183  ops/ms
   RandomReadIOBenchmark.ffiPread_T04                            16384          
  16  thrpt    6  15.283 ±  0.273  ops/ms
   RandomReadIOBenchmark.ffiPread_T08                            16384          
  16  thrpt    6  27.071 ±  1.086  ops/ms
   RandomReadIOBenchmark.ffiPread_T16                            16384          
  16  thrpt    6  32.837 ±  0.558  ops/ms
   RandomReadIOBenchmark.fileChannelDirectBuffer_T01             16384          
  16  thrpt    6   3.740 ±  0.092  ops/ms
   RandomReadIOBenchmark.fileChannelDirectBuffer_T04             16384          
  16  thrpt    6  13.837 ±  0.171  ops/ms
   RandomReadIOBenchmark.fileChannelDirectBuffer_T08             16384          
  16  thrpt    6  24.729 ±  0.264  ops/ms
   RandomReadIOBenchmark.fileChannelDirectBuffer_T16             16384          
  16  thrpt    6  32.938 ±  0.277  ops/ms
   RandomReadIOBenchmark.mmapBatchedPrefetch_T01                 16384          
  16  thrpt    6   7.022 ±  0.172  ops/ms
   RandomReadIOBenchmark.mmapBatchedPrefetch_T04                 16384          
  16  thrpt    6  25.149 ±  0.548  ops/ms
   RandomReadIOBenchmark.mmapBatchedPrefetch_T08                 16384          
  16  thrpt    6  45.167 ±  0.565  ops/ms
   RandomReadIOBenchmark.mmapBatchedPrefetch_T16                 16384          
  16  thrpt    6  61.556 ±  2.558  ops/ms
   RandomReadIOBenchmark.mmapMadvRandomBatchedPrefetch_T01       16384          
  16  thrpt    6   7.779 ±  0.178  ops/ms
   RandomReadIOBenchmark.mmapMadvRandomBatchedPrefetch_T04       16384          
  16  thrpt    6  24.772 ±  1.835  ops/ms
   RandomReadIOBenchmark.mmapMadvRandomBatchedPrefetch_T08       16384          
  16  thrpt    6  44.702 ±  1.319  ops/ms
   RandomReadIOBenchmark.mmapMadvRandomBatchedPrefetch_T16       16384          
  16  thrpt    6  63.099 ± 10.572  ops/ms
   RandomReadIOBenchmark.mmapMadvRandom_T01                      16384          
  16  thrpt    6   2.068 ±  0.113  ops/ms
   RandomReadIOBenchmark.mmapMadvRandom_T04                      16384          
  16  thrpt    6   8.074 ±  0.346  ops/ms
   RandomReadIOBenchmark.mmapMadvRandom_T08                      16384          
  16  thrpt    6  14.753 ±  0.419  ops/ms
   RandomReadIOBenchmark.mmapMadvRandom_T16                      16384          
  16  thrpt    6  25.430 ±  0.437  ops/ms
   RandomReadIOBenchmark.mmap_T01                                16384          
  16  thrpt    6   2.663 ±  0.462  ops/ms
   RandomReadIOBenchmark.mmap_T04                                16384          
  16  thrpt    6  10.064 ±  0.447  ops/ms
   RandomReadIOBenchmark.mmap_T08                                16384          
  16  thrpt    6  17.488 ±  0.447  ops/ms
   RandomReadIOBenchmark.mmap_T16                                16384          
  16  thrpt    6  25.329 ±  4.458  ops/ms
   ```
   
   ## CASE 3. many cold reads
   
   ```
   Benchmark                                                (readSize)  
(readsPerOp)   Mode  Cnt  Score   Error   Units
   RandomReadIOBenchmark.ffiPreadDirectIO_T01                    16384          
  16  thrpt    6  0.592 ± 0.001  ops/ms
   RandomReadIOBenchmark.ffiPreadDirectIO_T04                    16384          
  16  thrpt    6  2.249 ± 0.008  ops/ms
   RandomReadIOBenchmark.ffiPreadDirectIO_T08                    16384          
  16  thrpt    6  4.147 ± 0.021  ops/ms
   RandomReadIOBenchmark.ffiPreadDirectIO_T16                    16384          
  16  thrpt    6  4.804 ± 0.001  ops/ms
   RandomReadIOBenchmark.ffiPread_T01                            16384          
  16  thrpt    6  0.542 ± 0.010  ops/ms
   RandomReadIOBenchmark.ffiPread_T04                            16384          
  16  thrpt    6  2.072 ± 0.022  ops/ms
   RandomReadIOBenchmark.ffiPread_T08                            16384          
  16  thrpt    6  3.927 ± 0.030  ops/ms
   RandomReadIOBenchmark.ffiPread_T16                            16384          
  16  thrpt    6  5.233 ± 0.103  ops/ms
   RandomReadIOBenchmark.fileChannelDirectBuffer_T01             16384          
  16  thrpt    6  0.530 ± 0.011  ops/ms
   RandomReadIOBenchmark.fileChannelDirectBuffer_T04             16384          
  16  thrpt    6  2.032 ± 0.011  ops/ms
   RandomReadIOBenchmark.fileChannelDirectBuffer_T08             16384          
  16  thrpt    6  3.852 ± 0.018  ops/ms
   RandomReadIOBenchmark.fileChannelDirectBuffer_T16             16384          
  16  thrpt    6  5.029 ± 0.036  ops/ms
   RandomReadIOBenchmark.mmapBatchedPrefetch_T01                 16384          
  16  thrpt    6  3.077 ± 0.049  ops/ms
   RandomReadIOBenchmark.mmapBatchedPrefetch_T04                 16384          
  16  thrpt    6  7.198 ± 0.035  ops/ms
   RandomReadIOBenchmark.mmapBatchedPrefetch_T08                 16384          
  16  thrpt    6  7.195 ± 0.019  ops/ms
   RandomReadIOBenchmark.mmapBatchedPrefetch_T16                 16384          
  16  thrpt    6  7.188 ± 0.039  ops/ms
   RandomReadIOBenchmark.mmapMadvRandomBatchedPrefetch_T01       16384          
  16  thrpt    6  3.155 ± 0.059  ops/ms
   RandomReadIOBenchmark.mmapMadvRandomBatchedPrefetch_T04       16384          
  16  thrpt    6  7.188 ± 0.033  ops/ms
   RandomReadIOBenchmark.mmapMadvRandomBatchedPrefetch_T08       16384          
  16  thrpt    6  7.186 ± 0.021  ops/ms
   RandomReadIOBenchmark.mmapMadvRandomBatchedPrefetch_T16       16384          
  16  thrpt    6  7.168 ± 0.010  ops/ms
   RandomReadIOBenchmark.mmapMadvRandom_T01                      16384          
  16  thrpt    6  0.275 ± 0.003  ops/ms
   RandomReadIOBenchmark.mmapMadvRandom_T04                      16384          
  16  thrpt    6  1.065 ± 0.011  ops/ms
   RandomReadIOBenchmark.mmapMadvRandom_T08                      16384          
  16  thrpt    6  1.979 ± 0.018  ops/ms
   RandomReadIOBenchmark.mmapMadvRandom_T16                      16384          
  16  thrpt    6  3.361 ± 0.014  ops/ms
   RandomReadIOBenchmark.mmap_T01                                16384          
  16  thrpt    6  0.445 ± 0.010  ops/ms
   RandomReadIOBenchmark.mmap_T04                                16384          
  16  thrpt    6  1.209 ± 0.050  ops/ms
   RandomReadIOBenchmark.mmap_T08                                16384          
  16  thrpt    6  1.220 ± 0.036  ops/ms
   RandomReadIOBenchmark.mmap_T16                                16384          
  16  thrpt    6  1.222 ± 0.037  ops/ms
   ```
   
   ## CASE 4. all cold reads
   
   ```
   Benchmark                                                (readSize)  
(readsPerOp)   Mode  Cnt  Score    Error   Units
   RandomReadIOBenchmark.ffiPreadDirectIO_T01                    16384          
  16  thrpt    6  0.592 ±  0.001  ops/ms
   RandomReadIOBenchmark.ffiPreadDirectIO_T04                    16384          
  16  thrpt    6  2.254 ±  0.008  ops/ms
   RandomReadIOBenchmark.ffiPreadDirectIO_T08                    16384          
  16  thrpt    6  4.169 ±  0.010  ops/ms
   RandomReadIOBenchmark.ffiPreadDirectIO_T16                    16384          
  16  thrpt    6  4.948 ±  0.051  ops/ms
   RandomReadIOBenchmark.ffiPread_T01                            16384          
  16  thrpt    6  0.292 ±  0.001  ops/ms
   RandomReadIOBenchmark.ffiPread_T04                            16384          
  16  thrpt    6  1.154 ±  0.006  ops/ms
   RandomReadIOBenchmark.ffiPread_T08                            16384          
  16  thrpt    6  2.269 ±  0.008  ops/ms
   RandomReadIOBenchmark.ffiPread_T16                            16384          
  16  thrpt    6  4.384 ±  0.005  ops/ms
   RandomReadIOBenchmark.fileChannelDirectBuffer_T01             16384          
  16  thrpt    6  0.292 ±  0.001  ops/ms
   RandomReadIOBenchmark.fileChannelDirectBuffer_T04             16384          
  16  thrpt    6  1.152 ±  0.004  ops/ms
   RandomReadIOBenchmark.fileChannelDirectBuffer_T08             16384          
  16  thrpt    6  2.268 ±  0.004  ops/ms
   RandomReadIOBenchmark.fileChannelDirectBuffer_T16             16384          
  16  thrpt    6  4.377 ±  0.010  ops/ms
   RandomReadIOBenchmark.mmapBatchedPrefetch_T01                 16384          
  16  thrpt    6  2.928 ±  0.147  ops/ms
   RandomReadIOBenchmark.mmapBatchedPrefetch_T04                 16384          
  16  thrpt    6  6.214 ±  2.830  ops/ms
   RandomReadIOBenchmark.mmapBatchedPrefetch_T08                 16384          
  16  thrpt    6  6.269 ±  2.848  ops/ms
   RandomReadIOBenchmark.mmapBatchedPrefetch_T16                 16384          
  16  thrpt    6  6.338 ±  2.463  ops/ms
   RandomReadIOBenchmark.mmapMadvRandomBatchedPrefetch_T01       16384          
  16  thrpt    6  2.923 ±  0.157  ops/ms
   RandomReadIOBenchmark.mmapMadvRandomBatchedPrefetch_T04       16384          
  16  thrpt    6  6.211 ±  2.797  ops/ms
   RandomReadIOBenchmark.mmapMadvRandomBatchedPrefetch_T08       16384          
  16  thrpt    6  6.263 ±  2.822  ops/ms
   RandomReadIOBenchmark.mmapMadvRandomBatchedPrefetch_T16       16384          
  16  thrpt    6  6.656 ±  3.094  ops/ms
   RandomReadIOBenchmark.mmapMadvRandom_T01                      16384          
  16  thrpt    6  0.152 ±  0.002  ops/ms
   RandomReadIOBenchmark.mmapMadvRandom_T04                      16384          
  16  thrpt    6  0.602 ±  0.021  ops/ms
   RandomReadIOBenchmark.mmapMadvRandom_T08                      16384          
  16  thrpt    6  1.158 ±  0.080  ops/ms
   RandomReadIOBenchmark.mmapMadvRandom_T16                      16384          
  16  thrpt    6  2.084 ±  0.260  ops/ms
   RandomReadIOBenchmark.mmap_T01                                16384          
  16  thrpt    6  0.270 ±  0.017  ops/ms
   RandomReadIOBenchmark.mmap_T04                                16384          
  16  thrpt    6  0.865 ±  0.266  ops/ms
   RandomReadIOBenchmark.mmap_T08                                16384          
  16  thrpt    6  0.876 ±  0.260  ops/ms
   RandomReadIOBenchmark.mmap_T16                                16384          
  16  thrpt    6  0.937 ±  0.321  ops/ms
   ```
   
   </details>
   
   <details>
   <summary>Appendix d. Sequential scan results</summary>
   
   ### Mac (M3 Pro), 64G file, cold, single-threaded
   
   ```
   Benchmark                                                (readSize)  
(readsPerOp)   Mode  Cnt  Score   Error   Units
   SequentialReadIOBenchmark.ffiPread                            16384          
 128  thrpt       1.953          ops/ms
   SequentialReadIOBenchmark.ffiPreadDirectIO                    16384          
 128  thrpt       0.976          ops/ms
   SequentialReadIOBenchmark.fileChannelDirectBuffer             16384          
 128  thrpt       2.017          ops/ms
   SequentialReadIOBenchmark.mmap                                16384          
 128  thrpt       4.143          ops/ms
   SequentialReadIOBenchmark.mmapMadvRandomBatchedPrefetch       16384          
 128  thrpt       7.343          ops/ms
   SequentialReadIOBenchmark.mmapMadvRandomSlidingPrefetch       16384          
 128  thrpt       5.416          ops/ms
   SequentialReadIOBenchmark.mmapMadvSequential                  16384          
 128  thrpt       2.483          ops/ms
   
   ```
   
   ### Linux EBS (EC2 c5.4xlarge), 64G file, cold, single-threaded
   
   ```
   Benchmark                                                (readSize)  
(readsPerOp)   Mode  Cnt  Score   Error   Units
   SequentialReadIOBenchmark.ffiPread                            16384          
 128  thrpt       1.847          ops/ms
   SequentialReadIOBenchmark.ffiPreadDirectIO                    16384          
 128  thrpt       0.164          ops/ms
   SequentialReadIOBenchmark.fileChannelDirectBuffer             16384          
 128  thrpt       1.749          ops/ms
   SequentialReadIOBenchmark.mmap                                16384          
 128  thrpt       1.931          ops/ms
   SequentialReadIOBenchmark.mmapMadvRandomBatchedPrefetch       16384          
 128  thrpt       1.794          ops/ms
   SequentialReadIOBenchmark.mmapMadvRandomSlidingPrefetch       16384          
 128  thrpt       2.388          ops/ms
   SequentialReadIOBenchmark.mmapMadvSequential                  16384          
 128  thrpt       1.924          ops/ms
   ```
   
   ### Linux NVME (EC2 c6id.4xlarge), 64G file, cold, single-threaded
   
   ```
   Benchmark                                                (readSize)  
(readsPerOp)   Mode  Cnt   Score   Error   Units
   SequentialReadIOBenchmark.ffiPread                            16384          
 128  thrpt        9.556          ops/ms
   SequentialReadIOBenchmark.ffiPreadDirectIO                    16384          
 128  thrpt        0.736          ops/ms
   SequentialReadIOBenchmark.fileChannelDirectBuffer             16384          
 128  thrpt        9.521          ops/ms
   SequentialReadIOBenchmark.mmap                                16384          
 128  thrpt        9.427          ops/ms
   SequentialReadIOBenchmark.mmapMadvRandomBatchedPrefetch       16384          
 128  thrpt       11.176          ops/ms
   SequentialReadIOBenchmark.mmapMadvRandomSlidingPrefetch       16384          
 128  thrpt       10.005          ops/ms
   SequentialReadIOBenchmark.mmapMadvSequential                  16384          
 128  thrpt        7.598          ops/ms
   ```
   
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to