github.com/cockroachdb/pebble@v1.1.2/objstorage/objstorageprovider/testdata/provider/local_readahead (about) 1 open p1 1 2 ---- 3 <local fs> mkdir-all: p1 0755 4 <local fs> open-dir: p1 5 <local fs> open-dir: p1 6 <local fs> create: p1/REMOTE-OBJ-CATALOG-000001 7 <local fs> sync: p1/REMOTE-OBJ-CATALOG-000001 8 <local fs> create: p1/marker.remote-obj-catalog.000001.REMOTE-OBJ-CATALOG-000001 9 <local fs> close: p1/marker.remote-obj-catalog.000001.REMOTE-OBJ-CATALOG-000001 10 <local fs> sync: p1 11 <local fs> sync: p1/REMOTE-OBJ-CATALOG-000001 12 13 create 1 local 1 2000000 14 ---- 15 <local fs> create: p1/000001.sst 16 <local fs> sync-data: p1/000001.sst 17 <local fs> sync-data: p1/000001.sst 18 <local fs> close: p1/000001.sst 19 20 # We should see prefetch calls, and eventually a reopen with sequential reads 21 # option. 22 read 1 23 0 1000 24 1000 15000 25 16000 30000 26 46000 10000 27 56000 50000 28 106000 30000 29 140000 80000 30 ---- 31 <local fs> open: p1/000001.sst (options: *vfs.randomReadsOption) 32 size: 2000000 33 <local fs> read-at(0, 1000): p1/000001.sst 34 0 1000: ok (salt 1) 35 <local fs> read-at(1000, 15000): p1/000001.sst 36 1000 15000: ok (salt 1) 37 <local fs> prefetch(16000, 65536): p1/000001.sst 38 <local fs> read-at(16000, 30000): p1/000001.sst 39 16000 30000: ok (salt 1) 40 <local fs> read-at(46000, 10000): p1/000001.sst 41 46000 10000: ok (salt 1) 42 <local fs> prefetch(56000, 131072): p1/000001.sst 43 <local fs> read-at(56000, 50000): p1/000001.sst 44 56000 50000: ok (salt 1) 45 <local fs> read-at(106000, 30000): p1/000001.sst 46 106000 30000: ok (salt 1) 47 <local fs> open: p1/000001.sst (options: *vfs.sequentialReadsOption) 48 <local fs> read-at(140000, 80000): p1/000001.sst 49 140000 80000: ok (salt 1) 50 <local fs> close: p1/000001.sst 51 <local fs> close: p1/000001.sst 52 53 # We should directly see a reopen with sequential reads option. 54 read 1 for-compaction 55 0 1000 56 1000 15000 57 ---- 58 <local fs> open: p1/000001.sst (options: *vfs.randomReadsOption) 59 <local fs> open: p1/000001.sst (options: *vfs.sequentialReadsOption) 60 size: 2000000 61 <local fs> read-at(0, 1000): p1/000001.sst 62 0 1000: ok (salt 1) 63 <local fs> read-at(1000, 15000): p1/000001.sst 64 1000 15000: ok (salt 1) 65 <local fs> close: p1/000001.sst 66 <local fs> close: p1/000001.sst 67 68 # Test non-default readahead modes. 69 70 read 1 readahead=off 71 0 1000 72 1000 15000 73 16000 30000 74 46000 10000 75 56000 50000 76 106000 30000 77 140000 80000 78 ---- 79 <local fs> open: p1/000001.sst (options: *vfs.randomReadsOption) 80 size: 2000000 81 <local fs> read-at(0, 1000): p1/000001.sst 82 0 1000: ok (salt 1) 83 <local fs> read-at(1000, 15000): p1/000001.sst 84 1000 15000: ok (salt 1) 85 <local fs> read-at(16000, 30000): p1/000001.sst 86 16000 30000: ok (salt 1) 87 <local fs> read-at(46000, 10000): p1/000001.sst 88 46000 10000: ok (salt 1) 89 <local fs> read-at(56000, 50000): p1/000001.sst 90 56000 50000: ok (salt 1) 91 <local fs> read-at(106000, 30000): p1/000001.sst 92 106000 30000: ok (salt 1) 93 <local fs> read-at(140000, 80000): p1/000001.sst 94 140000 80000: ok (salt 1) 95 <local fs> close: p1/000001.sst 96 97 read 1 for-compaction readahead=off 98 0 1000 99 1000 15000 100 16000 30000 101 46000 10000 102 56000 50000 103 106000 30000 104 140000 80000 105 ---- 106 <local fs> open: p1/000001.sst (options: *vfs.randomReadsOption) 107 size: 2000000 108 <local fs> read-at(0, 1000): p1/000001.sst 109 0 1000: ok (salt 1) 110 <local fs> read-at(1000, 15000): p1/000001.sst 111 1000 15000: ok (salt 1) 112 <local fs> read-at(16000, 30000): p1/000001.sst 113 16000 30000: ok (salt 1) 114 <local fs> read-at(46000, 10000): p1/000001.sst 115 46000 10000: ok (salt 1) 116 <local fs> read-at(56000, 50000): p1/000001.sst 117 56000 50000: ok (salt 1) 118 <local fs> read-at(106000, 30000): p1/000001.sst 119 106000 30000: ok (salt 1) 120 <local fs> read-at(140000, 80000): p1/000001.sst 121 140000 80000: ok (salt 1) 122 <local fs> close: p1/000001.sst 123 124 read 1 readahead=sys-readahead 125 0 1000 126 1000 15000 127 16000 30000 128 46000 10000 129 56000 50000 130 106000 30000 131 140000 80000 132 ---- 133 <local fs> open: p1/000001.sst (options: *vfs.randomReadsOption) 134 size: 2000000 135 <local fs> read-at(0, 1000): p1/000001.sst 136 0 1000: ok (salt 1) 137 <local fs> read-at(1000, 15000): p1/000001.sst 138 1000 15000: ok (salt 1) 139 <local fs> prefetch(16000, 65536): p1/000001.sst 140 <local fs> read-at(16000, 30000): p1/000001.sst 141 16000 30000: ok (salt 1) 142 <local fs> read-at(46000, 10000): p1/000001.sst 143 46000 10000: ok (salt 1) 144 <local fs> prefetch(56000, 131072): p1/000001.sst 145 <local fs> read-at(56000, 50000): p1/000001.sst 146 56000 50000: ok (salt 1) 147 <local fs> read-at(106000, 30000): p1/000001.sst 148 106000 30000: ok (salt 1) 149 <local fs> prefetch(140000, 262144): p1/000001.sst 150 <local fs> read-at(140000, 80000): p1/000001.sst 151 140000 80000: ok (salt 1) 152 <local fs> close: p1/000001.sst 153 154 # TODO(radu): for informed/sys-readahead, we should start with the maximum 155 # prefetch window. 156 read 1 for-compaction readahead=sys-readahead 157 0 1000 158 1000 15000 159 16000 30000 160 46000 10000 161 56000 50000 162 106000 30000 163 140000 80000 164 ---- 165 <local fs> open: p1/000001.sst (options: *vfs.randomReadsOption) 166 size: 2000000 167 <local fs> read-at(0, 1000): p1/000001.sst 168 0 1000: ok (salt 1) 169 <local fs> read-at(1000, 15000): p1/000001.sst 170 1000 15000: ok (salt 1) 171 <local fs> prefetch(16000, 65536): p1/000001.sst 172 <local fs> read-at(16000, 30000): p1/000001.sst 173 16000 30000: ok (salt 1) 174 <local fs> read-at(46000, 10000): p1/000001.sst 175 46000 10000: ok (salt 1) 176 <local fs> prefetch(56000, 131072): p1/000001.sst 177 <local fs> read-at(56000, 50000): p1/000001.sst 178 56000 50000: ok (salt 1) 179 <local fs> read-at(106000, 30000): p1/000001.sst 180 106000 30000: ok (salt 1) 181 <local fs> prefetch(140000, 262144): p1/000001.sst 182 <local fs> read-at(140000, 80000): p1/000001.sst 183 140000 80000: ok (salt 1) 184 <local fs> close: p1/000001.sst