From d4c4ee6a1406dadbb2c5ecb80ab3bd2eab7a3078 Mon Sep 17 00:00:00 2001 From: John Spray Date: Fri, 22 Dec 2023 13:40:22 +0000 Subject: [PATCH] f DNM demo --- demo_sharding.sh | 14 ++++++++------ demo_split.sh | 20 ++++++++++++++++++++ 2 files changed, 28 insertions(+), 6 deletions(-) create mode 100644 demo_split.sh diff --git a/demo_sharding.sh b/demo_sharding.sh index 189953d09e..58fa70818d 100644 --- a/demo_sharding.sh +++ b/demo_sharding.sh @@ -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 diff --git a/demo_split.sh b/demo_split.sh new file mode 100644 index 0000000000..a6100b7481 --- /dev/null +++ b/demo_split.sh @@ -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 \ No newline at end of file