Skip to content

Commit 30b3994

Browse files
author
Yannic Nevado Hidalgo
committed
final wokring version
1 parent 44ebb33 commit 30b3994

File tree

7 files changed

+25
-148
lines changed

7 files changed

+25
-148
lines changed

cassandra-statefulset/cassandra-statefulset.yaml

Lines changed: 0 additions & 92 deletions
This file was deleted.

elk-stack-config/filebeat.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

loadbalancer/metallb-configmap.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ data:
1010
protocol: layer2
1111
# ip addr range
1212
addresses:
13-
- 192.168.224.106-192.168.224.200
13+
# - 192.168.000.000-192.168.000.000

patroni/patroni-master.yml renamed to patroni/custom-patroni.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ bootstrap:
9595
pg_hba:
9696
- hostssl all all 0.0.0.0/0 scram-sha-256
9797
- host all all 0.0.0.0/0 scram-sha-256
98-
- host all zalando 192.168.232.109/24 scram-sha-256
9998
- local all all trust
10099
- hostssl all +zalandos 127.0.0.1/32 pam
101100
- host all all 127.0.0.1/32 md5

pg_bench

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,33 @@
1-
$ psql -d postgres -U postgres -c "DROP DATABASE IF EXISTS test"
2-
3-
# Testdatenbank mti dem Namen test_container erstellen
4-
$ psql -d postgres -U postgres -c "CREATE DATABASE test"
1+
# create the test database with the name "test"
2+
psql -d postgres -U postgres -c "CREATE DATABASE test"
53

64
# -i = initialize
7-
# -s = scale default database value(16MB) * 50 = 800MB
5+
# -s = scale default database value(16MB) * s
86
# time = measure the time for executing the command
9-
# -i = 100 ~ 32min; -i = 200 ~ 62min
10-
$ time pgbench -i -s 50 test -U postgres (~18min.)
11-
12-
table # of rows
13-
---------------------------------
14-
pgbench_branches 50
15-
pgbench_tellers 500
16-
pgbench_accounts 5.000.000
7+
pgbench -i -s 50 test -U postgres
8+
9+
# from pgbench created tables
10+
#tablename number of rows
11+
--------------------------------------
12+
pgbench_branches s
13+
pgbench_tellers s*10
14+
pgbench_accounts s*100.000
1715
pgbench_history 0
1816

17+
# c = number of client connections to simulate
18+
# j = number of worker processes for pgbench
19+
# t = tps per client session => c*t
20+
pgbench -c 10 -j 2 -t 10000 test -U postgres
1921

20-
# c = clients -> number of clients to connect with
21-
# j = threads -> number of worker processes for pgbench
22-
# t = transactions -> number of transactions per client session => 10*100.000 = 1.000.000 transactions
23-
# -t 100000 -> nach 42min abgebrochen -> ram const stabil unter req; cpu const. über req
24-
# -t 10000 -> number of transactions per client session => 10*10.000 = 100.000 transactions
25-
$ time pgbench -c 10 -j 2 -t 10000 test -U postgres
22+
# read-only test
23+
# create the test database with the name "test_read"
24+
psql -d postgres -U postgres -c "CREATE DATABASE test_read"
2625

26+
# -S = use built in select only script
27+
pgbench -h <Standby LoadBalancer IP> -p 5432 -d -c 50 -j 10 -t 10000 -S test_read -U postgres
2728

28-
# kill database with to much ressourcen
29-
$ pgbench -c 90 -j 10 -t 100000 test -U postgres
29+
# kill database with heavy resource usage
30+
pgbench -c 90 -j 10 -t 100000 test -U postgres
3031

3132
# get size of database
32-
SELECT pg_size_pretty( pg_database_size('test') );
33+
SELECT pg_size_pretty( pg_database_size('databasename') );

reset_postgres_operator_setup.sh

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,4 @@ kubectl delete postgresql postgres-instance -n zalando-postgres
1616

1717
sleep 3
1818

19-
kubectl delete service postgres-instance postgres-instance-config postgres-instance-repl -n zalando-postgres
20-
21-
# sleep 3
22-
23-
# kubectl delete poddisruptionbudgets postgres-acid-minimal-cluster-pdb -n zalando-postgres
24-
25-
# kubectl delete pvc pgdata-acid-minimal-cluster-0 pgdata-acid-minimal-cluster-1 pgdata-acid-minimal-cluster-2 -n zalando-postgres
19+
kubectl delete service postgres-instance postgres-instance-config postgres-instance-repl -n zalando-postgres

storageclasses_longhorn/reduced-redundancy.yml

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)