Skip to content

Commit

Permalink
Bexhoma: Tests for pool component distributed
Browse files Browse the repository at this point in the history
  • Loading branch information
perdelt committed Jan 9, 2025
1 parent 65b2896 commit 68b6520
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 38 deletions.
96 changes: 66 additions & 30 deletions k8s/deploymenttemplate-PGBouncer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,34 +15,32 @@ apiVersion: v1
kind: Service
metadata:
labels: {app: bexhoma, component: sut, configuration: default, experiment: default}
name: bexhoma-service
name: bexhoma-sut
spec:
#type: ClusterIP
#clusterIP: None
ports:
- {port: 9091, protocol: TCP, name: port-dbms, targetPort: 5432}
- {port: 9300, protocol: TCP, name: port-monitoring, targetPort: 9300}
selector: {app: bexhoma, component: sut, configuration: default, experiment: default}
selector: {app: bexhoma, component: pool, configuration: default, experiment: default}
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels: {app: bexhoma, component: sut, configuration: default, experiment: default}
name: bexhoma-deployment-postgres
name: bexhoma-pool
labels: {app: bexhoma, component: pool, configuration: default, experiment: default}
spec:
replicas: 1
replicas: 4
selector:
matchLabels: {app: bexhoma, component: sut, configuration: default, experiment: default}
matchLabels: {app: bexhoma, component: pool, configuration: default, experiment: default}
template:
metadata:
labels: {app: bexhoma, component: sut, configuration: default, experiment: default}
labels: {app: bexhoma, component: pool, configuration: default, experiment: default, pool: bexhoma-pool}
spec:
automountServiceAccountToken: false
imagePullSecrets:
- {name: dockerhub}
nodeSelector:
tolerations:
#- key: "nvidia.com/gpu"
# effect: "NoSchedule"
terminationGracePeriodSeconds: 180
- key: "nvidia.com/gpu"
effect: "NoSchedule"
nodeSelector:
# kubernetes.io/hostname: cl-worker19
containers:
- name: pool
image: edoburu/pgbouncer
Expand All @@ -57,29 +55,32 @@ spec:
- name: DB_PASSWORD
value: postgres
- name: DB_HOST
value: localhost
valueFrom:
fieldRef:
fieldPath: metadata.labels['pool']
#value: $(expr $BEXHOMA_SUT_NAME)
- name: DB_PORT
value: "5433"
value: "9092"
- name: AUTH_TYPE
value: scram-sha-256 # remove/comment this line if using postgres:13 and lower
value: md5 # scram-sha-256 # remove/comment this line if using postgres:13 and lower
- name: POOL_MODE
value: session # mode = transaction not working for YCSB
value: transaction # session # mode = transaction not working for YCSB
- name: ADMIN_USERS
value: postgres
- name: DEFAULT_POOL_SIZE
value: "256"
- name: MIN_POOL_SIZE
value: "32"
- name: MIN_POOL_SIZE
value: "4"
- name: MAX_CLIENT_CONN
value: "256"
value: "32"
- name: LOG_CONNECTIONS
value: "0"
value: "1"
- name: LOG_DISCONNECTIONS
value: "0"
value: "1"
- name: LOG_POOLER_ERRORS
value: "0"
value: "1"
- name: LOG_STATS
value: "0"
value: "1"
- name: RESERVE_POOL_SIZE
value: "16"
- name: MAX_PREPARED_STATEMENTS
Expand All @@ -94,10 +95,45 @@ spec:
# periodSeconds: 60
ports:
- {containerPort: 5432}
#resources:
# limits: {cpu: 16000m, memory: 128Gi}
# requests: {cpu: 4000m, memory: 4Gi}
# #, ephemeral-storage: "1536Gi"}
resources:
limits: {cpu: 16000m, memory: 128Gi}
requests: {cpu: 4000m, memory: 4Gi}
#, ephemeral-storage: "1536Gi"}
---
apiVersion: v1
kind: Service
metadata:
labels: {app: bexhoma, component: pool, configuration: default, experiment: default}
name: bexhoma-pool
spec:
ports:
- {port: 9092, protocol: TCP, name: port-dbms, targetPort: 5433}
- {port: 9300, protocol: TCP, name: port-monitoring, targetPort: 9300}
selector: {app: bexhoma, component: sut, configuration: default, experiment: default}
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels: {app: bexhoma, component: sut, configuration: default, experiment: default}
name: bexhoma-deployment-postgres
spec:
replicas: 1
selector:
matchLabels: {app: bexhoma, component: sut, configuration: default, experiment: default}
template:
metadata:
labels: {app: bexhoma, component: sut, configuration: default, experiment: default}
spec:
automountServiceAccountToken: false
imagePullSecrets:
- {name: dockerhub}
nodeSelector:
# kubernetes.io/hostname: cl-worker11
tolerations:
- key: "nvidia.com/gpu"
effect: "NoSchedule"
terminationGracePeriodSeconds: 180
containers:
- name: dbms
image: postgres:16.1
env:
Expand Down
8 changes: 4 additions & 4 deletions k8s/deploymenttemplate-PGBouncerSidecar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ spec:
# periodSeconds: 60
ports:
- {containerPort: 5432}
resources:
limits: {cpu: 16000m, memory: 128Gi}
requests: {cpu: 4000m, memory: 4Gi}
#, ephemeral-storage: "1536Gi"}
#resources:
# limits: {cpu: 16000m, memory: 128Gi}
# requests: {cpu: 4000m, memory: 4Gi}
# #, ephemeral-storage: "1536Gi"}
- name: dbms
image: postgres:16.1
env:
Expand Down
8 changes: 4 additions & 4 deletions test-pool.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
######################################################################################


BEXHOMA_NODE_SUT="cl-worker11"
BEXHOMA_NODE_LOAD="cl-worker19"
BEXHOMA_NODE_BENCHMARK="cl-worker19"
BEXHOMA_NODE_SUT="cl-worker20"
BEXHOMA_NODE_LOAD="cl-worker13"
BEXHOMA_NODE_BENCHMARK="cl-worker13"
#BEXHOMA_NODE_BENCHMARK="cl-worker11"
LOG_DIR="./logs_tests"

Expand Down Expand Up @@ -278,7 +278,7 @@ nohup python ycsb.py -ms 1 -tr \
-sf $BEXHOMA_YCSB_SF_DATA \
-sfo $BEXHOMA_YCSB_SF_OPS \
--workload c \
-dbms PostgreSQL \
-dbms PostgreSQL PGBouncer \
-rnn $BEXHOMA_NODE_SUT -rnl $BEXHOMA_NODE_LOAD -rnb $BEXHOMA_NODE_BENCHMARK \
-tb 16384 \
-nlp 8 \
Expand Down

0 comments on commit 68b6520

Please sign in to comment.