f DNM demo

This commit is contained in:
John Spray
2023-12-22 13:40:22 +00:00
parent 758bb24445
commit d4c4ee6a14
2 changed files with 28 additions and 6 deletions

View File

@@ -1,11 +1,15 @@
export RUST_LOG=DEBUG
INITIAL_SHARDS=4
FINAL_SHARDS=4
INITIAL_SHARDS=1
PAGESERVERS=8
FINAL_SHARDS=8
STRIPE_SIZE=1024
SCALE=10
ARGS=--release
RUST_LOG=info
TENANT_ID=1f359dd625e519a1a4e8d7509690f6fc
set -e
set -x
@@ -16,7 +20,7 @@ set -e
cargo build $ARGS --features=testing
cargo neon $ARGS init --num-pageservers=$FINAL_SHARDS && RUST_LOG=debug cargo neon $ARGS start && cargo neon $ARGS tenant create --shard-count=$INITIAL_SHARDS --shard-stripe-size=$STRIPE_SIZE --tenant-id=1f359dd625e519a1a4e8d7509690f6fc --timeline-id=3d34095be52fec4c44a92e774c573b57 --set-default
cargo neon $ARGS init --num-pageservers=$PAGESERVERS && RUST_LOG=$RUST_LOG cargo neon $ARGS start && cargo neon $ARGS tenant create --shard-count=$INITIAL_SHARDS --shard-stripe-size=$STRIPE_SIZE --tenant-id=$TENANT_ID --timeline-id=3d34095be52fec4c44a92e774c573b57 --set-default
cargo neon $ARGS endpoint create && cargo neon $ARGS endpoint start ep-main
@@ -24,6 +28,4 @@ pgbench postgres -i -h 127.0.0.1 -p 55432 -U cloud_admin -s $SCALE
cargo neon $ARGS tenant status
cargo neon $ARGS tenant shard-split --shard-count=$FINAL_SHARDS
cargo neon $ARGS tenant status
# pgbench postgres -h 127.0.0.1 -p 55432 -U cloud_admin -T 600 -P 1 -c 32

20
demo_split.sh Normal file
View File

@@ -0,0 +1,20 @@
FINAL_SHARDS=8
TENANT_ID=1f359dd625e519a1a4e8d7509690f6fc
ARGS=--release
cargo neon $ARGS endpoint stop ep-main
cargo neon $ARGS tenant shard-split --shard-count=$FINAL_SHARDS
cargo neon $ARGS tenant status
cargo neon $ARGS tenant migrate --tenant-id=$TENANT_ID-0008 --id=1
cargo neon $ARGS tenant migrate --tenant-id=$TENANT_ID-0108 --id=2
cargo neon $ARGS tenant migrate --tenant-id=$TENANT_ID-0208 --id=3
cargo neon $ARGS tenant migrate --tenant-id=$TENANT_ID-0308 --id=4
cargo neon $ARGS tenant migrate --tenant-id=$TENANT_ID-0408 --id=5
cargo neon $ARGS tenant migrate --tenant-id=$TENANT_ID-0508 --id=6
cargo neon $ARGS tenant migrate --tenant-id=$TENANT_ID-0608 --id=7
cargo neon $ARGS tenant migrate --tenant-id=$TENANT_ID-0708 --id=8
cargo neon $ARGS tenant status
cargo neon $ARGS endpoint start ep-main