Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ prerelease version. The new interpretation is as follows:
#### Changes
* `agave-validator exit` now saves bank state before exiting. This enables restarts from local state when snapshot generation is disabled.
* Added `--accounts-index-limit` to specify the memory limit of the accounts index.
* Snapshot archive unpacking now uses direct I/O by default to improve performance by bypassing the OS page cache. Use `--no-accounts-db-snapshots-direct-io` to opt out if your file system does not support `O_DIRECT`. Direct I/O will be extended to snapshot creation in a future release.
### CLI
#### Breaking
* Removed deprecated arguments
Expand Down
10 changes: 10 additions & 0 deletions ledger-tool/src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,15 @@ pub fn accounts_db_args<'a, 'b>() -> Box<[Arg<'a, 'b>]> {
.takes_value(true)
.help("The number of ancient storages the ancient slot combining should converge to.")
.hidden(hidden_unless_forced()),
Arg::with_name("no_accounts_db_snapshots_direct_io")
.long("no-accounts-db-snapshots-direct-io")
.help("Disable direct I/O use for accounts-db snapshot operations")
.long_help(
"Do *not* use direct I/O for accounts-db file operations related to snapshot \
processsing. Direct I/O can improve performance by bypassing OS page cache, but \
requires the file systems hosting snapshots and accounts-db directories to \
support files opened with the O_DIRECT flag.",
),
]
.into_boxed_slice()
}
Expand Down Expand Up @@ -364,6 +373,7 @@ pub fn get_accounts_db_config(
use_registered_io_uring_buffers: resource_limits::check_memlock_limit_for_disk_io(
solana_accounts_db::accounts_db::TOTAL_IO_URING_BUFFERS_SIZE_LIMIT,
),
snapshots_use_direct_io: !arg_matches.is_present("no_accounts_db_snapshots_direct_io"),
..AccountsDbConfig::default()
}
}
Expand Down
11 changes: 11 additions & 0 deletions validator/src/commands/run/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1027,6 +1027,17 @@ pub fn add_args<'a>(app: App<'a, 'a>, default_args: &'a DefaultArgs) -> App<'a,
)
.hidden(hidden_unless_forced()),
)
.arg(
Arg::with_name("no_accounts_db_snapshots_direct_io")
.long("no-accounts-db-snapshots-direct-io")
.help("Disable direct I/O use for accounts-db snapshot operations")
.long_help(
"Do *not* use direct I/O for accounts-db file operations related to snapshot \
processsing. Direct I/O can improve performance by bypassing OS page cache, but \
requires the file systems hosting snapshots and accounts-db directories to \
support files opened with the O_DIRECT flag.",
),
)
.arg(
Arg::with_name("accounts_index_scan_results_limit_mb")
.long("accounts-index-scan-results-limit-mb")
Expand Down
2 changes: 1 addition & 1 deletion validator/src/commands/run/execute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@ pub fn execute(
use_registered_io_uring_buffers: resource_limits::check_memlock_limit_for_disk_io(
solana_accounts_db::accounts_db::TOTAL_IO_URING_BUFFERS_SIZE_LIMIT,
),
snapshots_use_direct_io: false,
snapshots_use_direct_io: !matches.is_present("no_accounts_db_snapshots_direct_io"),
};

let on_start_geyser_plugin_config_files = if matches.is_present("geyser_plugin_config") {
Expand Down
Loading