···149149 let blocks = open_ks(
150150 "blocks",
151151 opts()
152152- // point reads are used a lot by stream
152152+ // point reads are used a lot by stream, we know the blocks exist though
153153 .expect_point_read_hits(true)
154154 .max_memtable_size(mb(cfg.db_blocks_memtable_size_mb))
155155- // 32 - 64 kb is probably fine, as the newer blocks will be in the first levels
155155+ // 16 - 128 kb is probably fine, as the newer blocks will be in the first levels
156156 // and any consumers will probably be streaming the newer events...
157157- .data_block_size_policy(BlockSizePolicy::new([kb(4), kb(8), kb(32), kb(64)])),
157157+ // and blocks are pretty big-ish like around 5kb usually so this helps i think
158158+ .data_block_size_policy(BlockSizePolicy::new([kb(8), kb(16), kb(64), kb(128)])),
158159 )?;
159160 let records = open_ks(
160161 "records",
···182183 .max_memtable_size(mb(cfg.db_pending_memtable_size_mb))
183184 .data_block_size_policy(BlockSizePolicy::all(kb(4))),
184185 )?;
185185- // resync point reads often miss (because most repos aren't resyncing), so keeping the bloom filter helps avoid disk hits
186186 let resync = open_ks(
187187 "resync",
188188 opts()
189189+ // we only point read in backfill when we check for existing resync state
190190+ // ...and also in repos api. so we can disable bloom filters
191191+ .expect_point_read_hits(true)
189192 .max_memtable_size(mb(cfg.db_pending_memtable_size_mb))
190193 .data_block_size_policy(BlockSizePolicy::all(kb(8))),
191194 )?;
···203206 // only iterators are used here, no point reads
204207 .expect_point_read_hits(true)
205208 .max_memtable_size(mb(cfg.db_events_memtable_size_mb))
209209+ // the compression here wont be good since events are quite random
210210+ // eg. by many different repos and different records etc.
211211+ // since its sequential we should still go with bigger block size though
206212 .data_block_size_policy(BlockSizePolicy::new([kb(16), kb(32)])),
207213 )?;
208214 let counts = open_ks(
···210216 opts()
211217 // count increments hit because counters are mostly pre-initialized
212218 .expect_point_read_hits(true)
213213- .max_memtable_size(mb(32))
219219+ .max_memtable_size(mb(16))
214220 // the data is very small
215221 .data_block_size_policy(BlockSizePolicy::all(kb(1))),
216222 )?;
···228234 let crawler = open_ks(
229235 "crawler",
230236 opts()
237237+ // only iterators are used here
238238+ .expect_point_read_hits(true)
231239 .max_memtable_size(mb(16))
232240 .data_block_size_policy(BlockSizePolicy::all(kb(1))),
233241 )?;