pub const DEFAULT_TAIL_CACHE_SIZE: ByteSize;Expand description
Default for LogConfig::tail_cache_size.
A consumer that falls more than this far behind the producer reads from
the disk, because O_DIRECT writes leave nothing in the page cache, and
the disk reads slow it down further. At 1 MiB, one default
max.partition.fetch.bytes, a consumer of a single partition taking about
600 MB/s fell seconds behind (krabka-broker#1370), and 32 MiB kept its
end-to-end p99 under 100 ms. The cache is also most of what a partition
in direct mode holds in memory: a broker with 100 such partitions taking
1 KiB records used 7–8 GB of anonymous memory at 32 MiB and 3.7 GB at
8 MiB, with a higher rate (1.22M against 1.09–1.16M records/s) and a lower
end-to-end p99, while the single-partition consumer at 1.3 GB/s measured
the same rate at 8 and 16 MiB and within 5% of 32 MiB.