Skip to content

Commit

Permalink
review: add coment for max vec read bytes constant
Browse files Browse the repository at this point in the history
  • Loading branch information
VladLazar committed Oct 2, 2024
1 parent 9afca93 commit f1f245a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions libs/pageserver_api/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,12 @@ pub mod defaults {

pub const DEFAULT_INGEST_BATCH_SIZE: u64 = 100;

// Soft limit for the maximum size of a vectored read.
// This is determined by the largest NeonWalRecord that can exist (minus dbdir and reldir keys
// which are unbounded). As of this writing, that is a `NeonWalRecord::ClogSetCommitted` record,
// with 32k xids. That's the max number of XIDS on a single CLOG page. The size of such a record
// is `sizeof(Transactionid) * 32768 + (some fixed overhead from 'timestamp`, the Vec length and whatever extra serde serialization adds)`.
// That is, slightly above 128 kB.
pub const DEFAULT_MAX_VECTORED_READ_BYTES: usize = 130 * 1024; // 130 KiB

pub const DEFAULT_IMAGE_COMPRESSION: ImageCompressionAlgorithm =
Expand Down

0 comments on commit f1f245a

Please sign in to comment.