Skip to content

Commit 4ddd681

Browse files
committed
Use Neon's pgbench for pgvector benchmarks
1 parent 77ea9b1 commit 4ddd681

File tree

1 file changed

+17
-40
lines changed

1 file changed

+17
-40
lines changed

.github/workflows/benchmarking.yml

Lines changed: 17 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ jobs:
319319
{ "pg_version": 16, "region_id": "azure-eastus2", "platform": "neonvm-azure-captest-new", "db_size": "50gb","runner": '"$runner_azure"', "image": "neondatabase/build-tools:pinned-bookworm" },
320320
{ "pg_version": 16, "region_id": "'"$region_id_default"'", "platform": "neonvm-captest-sharding-reuse", "db_size": "50gb","runner": '"$runner_default"', "image": "'"$image_default"'" },
321321
{ "pg_version": 17, "region_id": "'"$region_id_default"'", "platform": "neonvm-captest-freetier", "db_size": "3gb" ,"runner": '"$runner_default"', "image": "'"$image_default"'" },
322-
{ "pg_version": 17, "region_id": "'"$region_id_default"'", "platform": "neonvm-captest-new", "db_size": "10gb","runner": '"$runner_default"', "image": "'"$image_default"'" },
322+
{ "pg_version": 17, "region_id": "'"$region_id_default"'", "platform": "neonvm-captest-new", "db_size": "10gb","runner": '"$runner_default"', "image": "'"$image_default"'" },
323323
{ "pg_version": 17, "region_id": "'"$region_id_default"'", "platform": "neonvm-captest-new-many-tables","db_size": "10gb","runner": '"$runner_default"', "image": "'"$image_default"'" },
324324
{ "pg_version": 17, "region_id": "'"$region_id_default"'", "platform": "neonvm-captest-new", "db_size": "50gb","runner": '"$runner_default"', "image": "'"$image_default"'" }]
325325
}'
@@ -458,7 +458,7 @@ jobs:
458458
459459
echo "connstr=${CONNSTR}" >> $GITHUB_OUTPUT
460460
461-
# we want to compare Neon project OLTP throughput and latency at scale factor 10 GB
461+
# we want to compare Neon project OLTP throughput and latency at scale factor 10 GB
462462
# without (neonvm-captest-new)
463463
# and with (neonvm-captest-new-many-tables) many relations in the database
464464
- name: Create many relations before the run
@@ -590,36 +590,20 @@ jobs:
590590
steps:
591591
- uses: actions/checkout@v4
592592

593-
# until https://github.com/neondatabase/neon/issues/8275 is fixed we temporarily install postgresql-16
594-
# instead of using Neon artifacts containing pgbench
595-
- name: Install postgresql-16 where pytest expects it
596-
run: |
597-
# Just to make it easier to test things locally on macOS (with arm64)
598-
arch=$(uname -m | sed 's/x86_64/amd64/g' | sed 's/aarch64/arm64/g')
599-
600-
cd /home/nonroot
601-
wget -q "https://apt.postgresql.org/pub/repos/apt/pool/main/p/postgresql-17/libpq5_17.2-1.pgdg120+1_${arch}.deb"
602-
wget -q "https://apt.postgresql.org/pub/repos/apt/pool/main/p/postgresql-16/postgresql-client-16_16.6-1.pgdg120+1_${arch}.deb"
603-
wget -q "https://apt.postgresql.org/pub/repos/apt/pool/main/p/postgresql-16/postgresql-16_16.6-1.pgdg120+1_${arch}.deb"
604-
dpkg -x libpq5_17.2-1.pgdg120+1_${arch}.deb pg
605-
dpkg -x postgresql-16_16.6-1.pgdg120+1_${arch}.deb pg
606-
dpkg -x postgresql-client-16_16.6-1.pgdg120+1_${arch}.deb pg
607-
608-
mkdir -p /tmp/neon/pg_install/v16/bin
609-
mkdir -p /tmp/neon/pg_install/v17/bin
610-
ln -s /home/nonroot/pg/usr/lib/postgresql/16/bin/pgbench /tmp/neon/pg_install/v16/bin/pgbench
611-
ln -s /home/nonroot/pg/usr/lib/postgresql/16/bin/psql /tmp/neon/pg_install/v16/bin/psql
612-
ln -s /home/nonroot/pg/usr/lib/$(uname -m)-linux-gnu /tmp/neon/pg_install/v16/lib
613-
ln -s /home/nonroot/pg/usr/lib/postgresql/16/bin/pgbench /tmp/neon/pg_install/v17/bin/pgbench
614-
ln -s /home/nonroot/pg/usr/lib/postgresql/16/bin/psql /tmp/neon/pg_install/v17/bin/psql
615-
ln -s /home/nonroot/pg/usr/lib/$(uname -m)-linux-gnu /tmp/neon/pg_install/v17/lib
616-
617-
LD_LIBRARY_PATH="/home/nonroot/pg/usr/lib/$(uname -m)-linux-gnu:${LD_LIBRARY_PATH:-}"
618-
export LD_LIBRARY_PATH
619-
echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}" >> ${GITHUB_ENV}
620-
621-
/tmp/neon/pg_install/v16/bin/pgbench --version
622-
/tmp/neon/pg_install/v16/bin/psql --version
593+
- name: Configure AWS credentials
594+
uses: aws-actions/configure-aws-credentials@v4
595+
with:
596+
aws-region: eu-central-1
597+
role-to-assume: ${{ vars.DEV_AWS_OIDC_ROLE_ARN }}
598+
role-duration-seconds: 18000 # 5 hours
599+
600+
- name: Download Neon artifact
601+
uses: ./.github/actions/download
602+
with:
603+
name: neon-${{ runner.os }}-${{ runner.arch }}-release-artifact
604+
path: /tmp/neon/
605+
prefix: latest
606+
aws-oicd-role-arn: ${{ vars.DEV_AWS_OIDC_ROLE_ARN }}
623607

624608
- name: Set up Connection String
625609
id: set-up-connstr
@@ -642,13 +626,6 @@ jobs:
642626
643627
echo "connstr=${CONNSTR}" >> $GITHUB_OUTPUT
644628
645-
- name: Configure AWS credentials
646-
uses: aws-actions/configure-aws-credentials@v4
647-
with:
648-
aws-region: eu-central-1
649-
role-to-assume: ${{ vars.DEV_AWS_OIDC_ROLE_ARN }}
650-
role-duration-seconds: 18000 # 5 hours
651-
652629
- name: Benchmark pgvector hnsw indexing
653630
uses: ./.github/actions/run-python-test-set
654631
with:
@@ -906,7 +883,7 @@ jobs:
906883
exit 1
907884
;;
908885
esac
909-
886+
910887
echo "CONNSTR_SECRET_NAME=${CONNSTR_SECRET_NAME}" >> $GITHUB_ENV
911888
912889
- name: Set up Connection String

0 commit comments

Comments
 (0)