Skip to content

Commit

Permalink
Heuristics for tail prefetch size
Browse files Browse the repository at this point in the history
  • Loading branch information
hx235 committed Apr 28, 2023
1 parent 21722b6 commit ca7ff4e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion table/block_based/block_based_table_reader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,8 @@ Status BlockBasedTable::PrefetchTail(
// That's because we need to issue readahead before we read the
// properties,
// at which point we don't yet know the index type.
tail_prefetch_size = prefetch_all || preload_all ? 512 * 1024 : 4 * 1024;
tail_prefetch_size =
prefetch_all || preload_all ? 4 * 1024 + 0.01 * file_size : 4 * 1024;
ROCKS_LOG_WARN(logger,
"Tail prefetch size %zu is calculated based on heuristics",
tail_prefetch_size);
Expand Down

0 comments on commit ca7ff4e

Please sign in to comment.