mirror of
https://github.com/neondatabase/neon.git
synced 2026-05-17 05:00:38 +00:00
part of https://github.com/neondatabase/neon/issues/7462 ## Summary of changes This pull request adds two APIs to the pageserver management API: list_aux_files and ingest_aux_files. The aux file pagebench is intended to be used on an empty timeline because the data do not go through the safekeeper. LSNs are advanced by 8 for each ingestion, to avoid invariant checks inside the pageserver. For now, I only care about space amplification / read amplification, so the bench is designed in a very simple way: ingest 10000 files, and I will manually dump the layer map to analyze. --------- Signed-off-by: Alex Chi Z <chi@neon.tech>
55 lines
1.6 KiB
Rust
55 lines
1.6 KiB
Rust
use clap::Parser;
|
|
use utils::logging;
|
|
|
|
/// Re-usable pieces of code that aren't CLI-specific.
|
|
mod util {
|
|
pub(crate) mod request_stats;
|
|
#[macro_use]
|
|
pub(crate) mod tokio_thread_local_stats;
|
|
/// Re-usable pieces of CLI-specific code.
|
|
pub(crate) mod cli {
|
|
pub(crate) mod targets;
|
|
}
|
|
}
|
|
|
|
/// The pagebench CLI sub-commands, dispatched in [`main`] below.
|
|
mod cmd {
|
|
pub(super) mod aux_files;
|
|
pub(super) mod basebackup;
|
|
pub(super) mod getpage_latest_lsn;
|
|
pub(super) mod ondemand_download_churn;
|
|
pub(super) mod trigger_initial_size_calculation;
|
|
}
|
|
|
|
/// Component-level performance test for pageserver.
|
|
#[derive(clap::Parser)]
|
|
enum Args {
|
|
Basebackup(cmd::basebackup::Args),
|
|
GetPageLatestLsn(cmd::getpage_latest_lsn::Args),
|
|
TriggerInitialSizeCalculation(cmd::trigger_initial_size_calculation::Args),
|
|
OndemandDownloadChurn(cmd::ondemand_download_churn::Args),
|
|
AuxFiles(cmd::aux_files::Args),
|
|
}
|
|
|
|
fn main() {
|
|
logging::init(
|
|
logging::LogFormat::Plain,
|
|
logging::TracingErrorLayerEnablement::Disabled,
|
|
logging::Output::Stderr,
|
|
)
|
|
.unwrap();
|
|
logging::replace_panic_hook_with_tracing_panic_hook().forget();
|
|
|
|
let args = Args::parse();
|
|
match args {
|
|
Args::Basebackup(args) => cmd::basebackup::main(args),
|
|
Args::GetPageLatestLsn(args) => cmd::getpage_latest_lsn::main(args),
|
|
Args::TriggerInitialSizeCalculation(args) => {
|
|
cmd::trigger_initial_size_calculation::main(args)
|
|
}
|
|
Args::OndemandDownloadChurn(args) => cmd::ondemand_download_churn::main(args),
|
|
Args::AuxFiles(args) => cmd::aux_files::main(args),
|
|
}
|
|
.unwrap()
|
|
}
|