Лабораторная 3 - Костылев - БПИ2303 - на 5 #151
+7
-1
@@ -13,7 +13,8 @@ API_REPLICAS=2
|
|||||||
IDEMPOTENCY_TTL_SECONDS=86400
|
IDEMPOTENCY_TTL_SECONDS=86400
|
||||||
# Solution-specific: published LB ports, replica limits, workers and pool per replica,
|
# Solution-specific: published LB ports, replica limits, workers and pool per replica,
|
||||||
# LB queue per replica, drain window before closing the listener on SIGTERM, PostgreSQL
|
# LB queue per replica, drain window before closing the listener on SIGTERM, PostgreSQL
|
||||||
# limits, load generator limits (profile bench), cursor key file. API_PORT/SHORTTTL_PORT of lab2 are gone:
|
# limits, load generator limits (profile bench), CPU pinning for track 1 measurements (empty = not
|
||||||
|
# pinned), cursor key file. API_PORT/SHORTTTL_PORT of lab2 are gone:
|
||||||
# only the load balancer is published.
|
# only the load balancer is published.
|
||||||
LB_HTTP_PORT=8080
|
LB_HTTP_PORT=8080
|
||||||
LB_STATS_PORT=8404
|
LB_STATS_PORT=8404
|
||||||
@@ -28,4 +29,9 @@ PG_CPUS=2
|
|||||||
PG_MEMORY=1g
|
PG_MEMORY=1g
|
||||||
K6_CPUS=2
|
K6_CPUS=2
|
||||||
K6_MEMORY=512m
|
K6_MEMORY=512m
|
||||||
|
API_CPUSET=
|
||||||
|
LB_CPUSET=
|
||||||
|
PG_CPUSET=
|
||||||
|
VALKEY_CPUSET=
|
||||||
|
K6_CPUSET=
|
||||||
CURSOR_SECRET_FILE=/run/secrets/cursor_secret
|
CURSOR_SECRET_FILE=/run/secrets/cursor_secret
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ services:
|
|||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
read_only: true
|
read_only: true
|
||||||
cap_drop: [ALL]
|
cap_drop: [ALL]
|
||||||
|
cpuset: ${LB_CPUSET:-}
|
||||||
deploy:
|
deploy:
|
||||||
resources:
|
resources:
|
||||||
limits: {cpus: "${LB_CPUS:-1}", memory: 128m}
|
limits: {cpus: "${LB_CPUS:-1}", memory: 128m}
|
||||||
@@ -59,6 +60,7 @@ services:
|
|||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
read_only: true
|
read_only: true
|
||||||
tmpfs: [/tmp]
|
tmpfs: [/tmp]
|
||||||
|
cpuset: ${API_CPUSET:-}
|
||||||
depends_on:
|
depends_on:
|
||||||
migrate:
|
migrate:
|
||||||
condition: service_completed_successfully
|
condition: service_completed_successfully
|
||||||
@@ -111,6 +113,7 @@ services:
|
|||||||
secrets: [postgres_password]
|
secrets: [postgres_password]
|
||||||
volumes: [pgdata:/var/lib/postgresql/data]
|
volumes: [pgdata:/var/lib/postgresql/data]
|
||||||
shm_size: 256m
|
shm_size: 256m
|
||||||
|
cpuset: ${PG_CPUSET:-}
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "pg_isready", "-h", "127.0.0.1", "-U", "messenger", "-d", "messenger"]
|
test: ["CMD", "pg_isready", "-h", "127.0.0.1", "-U", "messenger", "-d", "messenger"]
|
||||||
interval: 2s
|
interval: 2s
|
||||||
@@ -140,6 +143,7 @@ services:
|
|||||||
- volatile-lru
|
- volatile-lru
|
||||||
secrets: [valkey.conf]
|
secrets: [valkey.conf]
|
||||||
volumes: [valkeydata:/data]
|
volumes: [valkeydata:/data]
|
||||||
|
cpuset: ${VALKEY_CPUSET:-}
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD-SHELL", "REDISCLI_AUTH=\"$$(sed -n 's/^requirepass //p' /run/secrets/valkey.conf)\" valkey-cli ping | grep -q PONG"]
|
test: ["CMD-SHELL", "REDISCLI_AUTH=\"$$(sed -n 's/^requirepass //p' /run/secrets/valkey.conf)\" valkey-cli ping | grep -q PONG"]
|
||||||
interval: 2s
|
interval: 2s
|
||||||
@@ -159,6 +163,7 @@ services:
|
|||||||
BASE_URL: http://lb:8080
|
BASE_URL: http://lb:8080
|
||||||
volumes: [./infra/k6:/scripts:ro]
|
volumes: [./infra/k6:/scripts:ro]
|
||||||
networks: [edge]
|
networks: [edge]
|
||||||
|
cpuset: ${K6_CPUSET:-}
|
||||||
deploy:
|
deploy:
|
||||||
resources:
|
resources:
|
||||||
limits: {cpus: "${K6_CPUS:-2}", memory: "${K6_MEMORY:-512m}"}
|
limits: {cpus: "${K6_CPUS:-2}", memory: "${K6_MEMORY:-512m}"}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
## 1. Стенд под измерения
|
## 1. Стенд под измерения
|
||||||
|
|
||||||
- [ ] 1.1 `compose.yaml`: закрепление CPU каждого сервиса через `*_CPUSET` (пусто по умолчанию), `.env.example`
|
- [x] 1.1 `compose.yaml`: закрепление CPU каждого сервиса через `*_CPUSET` (пусто по умолчанию), `.env.example`
|
||||||
- [ ] 1.2 Проверка группы: `docker compose --profile bench config --quiet`, `make limits` по-прежнему `PASS`
|
- [x] 1.2 Проверка группы: `docker compose --profile bench config --quiet`, `make limits` по-прежнему `PASS`
|
||||||
|
|
||||||
## 2. Сэмплеры и оркестратор
|
## 2. Сэмплеры и оркестратор
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user