mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-07 13:32:57 +00:00
storcon: change default stripe size to 16 MB (#11168)
## Problem The current stripe size of 256 MB is a bit large, and can cause load imbalances across shards. A stripe size of 16 MB appears more reasonable to avoid hotspots, although we don't see evidence of this in benchmarks. Resolves https://github.com/neondatabase/cloud/issues/25634. Touches https://github.com/neondatabase/cloud/issues/21870. ## Summary of changes * Change the default stripe size to 16 MB. * Remove `ShardParameters::DEFAULT_STRIPE_SIZE`, and only use `pageserver_api::shard::DEFAULT_STRIPE_SIZE`. * Update a bunch of tests that assumed a certain stripe size.
This commit is contained in:
@@ -800,7 +800,7 @@ impl ComputeHook {
|
||||
|
||||
#[cfg(test)]
|
||||
pub(crate) mod tests {
|
||||
use pageserver_api::shard::{ShardCount, ShardNumber};
|
||||
use pageserver_api::shard::{DEFAULT_STRIPE_SIZE, ShardCount, ShardNumber};
|
||||
use utils::id::TenantId;
|
||||
|
||||
use super::*;
|
||||
@@ -808,6 +808,7 @@ pub(crate) mod tests {
|
||||
#[test]
|
||||
fn tenant_updates() -> anyhow::Result<()> {
|
||||
let tenant_id = TenantId::generate();
|
||||
let stripe_size = DEFAULT_STRIPE_SIZE;
|
||||
let mut tenant_state = ComputeHookTenant::new(
|
||||
TenantShardId {
|
||||
tenant_id,
|
||||
@@ -848,7 +849,7 @@ pub(crate) mod tests {
|
||||
shard_count: ShardCount::new(2),
|
||||
shard_number: ShardNumber(1),
|
||||
},
|
||||
stripe_size: ShardStripeSize(32768),
|
||||
stripe_size,
|
||||
preferred_az: None,
|
||||
node_id: NodeId(1),
|
||||
});
|
||||
@@ -864,7 +865,7 @@ pub(crate) mod tests {
|
||||
shard_count: ShardCount::new(2),
|
||||
shard_number: ShardNumber(0),
|
||||
},
|
||||
stripe_size: ShardStripeSize(32768),
|
||||
stripe_size,
|
||||
preferred_az: None,
|
||||
node_id: NodeId(1),
|
||||
});
|
||||
@@ -874,7 +875,7 @@ pub(crate) mod tests {
|
||||
anyhow::bail!("Wrong send result");
|
||||
};
|
||||
assert_eq!(request.shards.len(), 2);
|
||||
assert_eq!(request.stripe_size, Some(ShardStripeSize(32768)));
|
||||
assert_eq!(request.stripe_size, Some(stripe_size));
|
||||
|
||||
// Simulate successful send
|
||||
*guard = Some(ComputeRemoteState {
|
||||
|
||||
Reference in New Issue
Block a user