Commit 43ea19b0 authored by Emanuel Calvo's avatar Emanuel Calvo

Fixes on pgbouncer and odyssey startup

parent 99f8c8ae
......@@ -10,23 +10,28 @@ It is intended to test Odyssey on stressed environments.
## Architecture
In order to save infrastructure resources, benchs can run to pgbouncer and
odyssey but not at the same time. Both pools point to the same database endpoint and
client can point indistintively to each of the pools.
```mermaid
graph TB
odysseyp["Odyssey"] -. Pool Size: s/Threads*2 .-> Postgres
pgbench["PgBench"] --> odysseyp
pgbenchN["PgBench"] --> odysseyp
odysseyp["Odyssey"] -. Pool Size=32 .-> Postgres
pgbouncer["PgBouncer"] -. Pool Size=32 .-> Postgres
pgbench["PgBench"] -. unlimited clients .-> odysseyp
pgbench["PgBench"] -. max_client_conn=100k .-> pgbouncer
subgraph CLI["Client Compute"]
pgbench["PgBench"]
pgbench_N["PgBench...N"]
end
subgraph CLN["Client Compute N"]
pgbenchN["PgBench"]
pgbenchN_N["PgBench...N"]
subgraph PGB["Pgbouncer Compute"]
pgbouncer["PgBouncer"]
end
subgraph ODY["Odyssey Compute"]
odysseyp["Odyssey Parent"] -.- odysseysys
odysseyp["Odyssey Parent"] -.- odysseyworkerN
odysseyp["Odyssey Parent"] -. workers=N .- odysseyworkerN
odysseysys["Odyssey System"]
odysseyworkerN["Odyssey Workers"]
end
......@@ -84,12 +89,13 @@ make ENV=testing plan|apply
## Bench tests
From any client :
From any client (points to database endpoint):
```
/usr/local/bin/plainbench.sh -i
```
```
/usr/local/bin/plainbench.sh [odyssey|pgbouncer] [secs] [conn] [iter]
```
......
......@@ -41,7 +41,7 @@ module "odyssey_instance" {
module "client_instance" {
source = "../../modules/compute"
instance_name = "client-node"
replicas = 2
replicas = 1
mode = "client"
machine_type = "n1-standard-8" # 4 cores 15 GB
instance_zone = "europe-west4-b"
......
......@@ -94,8 +94,8 @@ User=odyssey
Group=odyssey
Type=simple
ExecStart=/usr/bin/odyssey /etc/odyssey/odyssey.conf
LimitNOFILE=100000
LimitNPROC=100000
LimitNOFILE=200000
LimitNPROC=200000
[Install]
WantedBy=multi-user.target
......
......@@ -16,7 +16,7 @@ write_files:
runcmd:
- [ sysctl, -w, fs.file-max=2500000 ]
- 'ulimit -n 64000'
- 'ulimit -n 220000'
- [ echo, never, '>/sys/kernel/mm/transparent_hugepage/enabled']
- [ echo, never, '>/sys/kernel/mm/transparent_hugepage/defrag']
- [ sysctl, -w, 'net.ipv4.tcp_fin_timeout=1']
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment