Files
mindesbunister d7c6bc8375 Phase 0: Performance Quick Wins
Implemented comprehensive performance optimizations across 7 services:

Redis Caching:
- Firefly III: Added Redis cache for sessions and application cache (84.6% hit rate)
- Gitea: Configured Redis for cache, sessions, and task queues
- Synapse: Enabled Redis cache for Matrix homeserver
- Nextcloud: Already had Redis, added tmpfs and proper container naming

Database Tuning:
- Zabbix: Added MySQL tuning (existing performance.cnf with 3GB buffer already optimal)
- Paperless: MariaDB tuning (256MB buffer, 64MB log, 50 connections)
- Trading Bot: PostgreSQL tuning (128MB shared_buffers, optimized work_mem)
- Firefly III: MariaDB optimization (512MB buffer, 128MB log, 100 connections)

Tmpfs Mounts (in-memory temporary storage):
- Nextcloud: 1GB /tmp, 512MB /var/tmp
- Paperless: 512MB /tmp, 256MB /var/tmp
- Jellyfin: 2GB /tmp, 1GB /var/tmp (for transcoding)

Container Naming:
- Nextcloud: Renamed from compose_files_* to nextcloud-redis, nextcloud-db, nextcloud-app

Documentation:
- Updated INFRASTRUCTURE_ROADMAP.md with Phase 0 section and completion tracking
- Created PERFORMANCE_IMPROVEMENTS_2025-11-12.md with detailed change log
- Created deploy-performance-improvements.sh automation script

All services verified healthy and running with improvements.
2025-11-13 10:18:10 +01:00

126 lines
3.7 KiB
YAML
Executable File

version: '3.3'
services:
zabbix-server: # The main Zabbix Server Software Service
logging:
driver: loki
options:
loki-url: "http://localhost:3100/loki/api/v1/push"
image: zabbix/zabbix-server-mysql:6.4-ubuntu-latest
container_name: zabbix-server
restart: unless-stopped
environment: # The Postgres database value variable
DB_SERVER_HOST: mysql-zabbix
MYSQL_USER: zabbix
MYSQL_PASSWORD: eccmts42*
MYSQL_DATABASE: zabbix
ZBX_HISTORYSTORAGETYPES: log,text #Zabbix configuration variables
ZBX_DEBUGLEVEL: 1
ZBX_HOUSEKEEPINGFREQUENCY: 1
ZBX_MAXHOUSEKEEPERDELETE: 5000
ports:
- "10051:10051"
depends_on:
- mysql-zabbix
links:
- mysql-zabbix
# - zabbix-postfix
volumes: # Volumes for scripts and related files you can add
- /home/icke/zabbix-server/alertscripts:/usr/lib/zabbix/alertscripts
- /home/icke/zabbix-server/externalscripts:/usr/lib/zabbix/externalscripts
- /home/icke/zabbix-server/userparameter_diskstats.conf:/etc/zabbix/zabbix_agentd.d/userparameter_diskstats.conf
- /home/icke/zabbix-server/lld-disks.py:/usr/local/bin/lld-disks.py
networks:
zabbix:
ipv4_address: 172.19.0.2
# zabbix-agent: # Zabbix agent service that tracks usage and send to zabbix server
# image: zabbix/zabbix-agent:latest
# container_name: zabbix-agent
# privileged: true #access mode for allowing resource access
# #network_mode: "host"
# links:
# - zabbix-server
# restart: unless-stopped
# environment:
# - ZBX_SERVER_HOST=172.19.0.2 #the IP/Dns of Zabbix server
# networks:
# zabbix:
# ipv4_address: 172.19.0.3
# zabbix-postfix:
# ports:
# - "25:25"
# image: catatnight/postfix
# container_name: zabbix-postfix
# environment:
# smtp_user: monitor:eccmts42*
# maildomain: mail.egonetix.de
zabbix-web: # The main Zabbix web UI or interface
logging:
driver: loki
options:
loki-url: "http://localhost:3100/loki/api/v1/push"
image: zabbix/zabbix-web-nginx-mysql:6.4-ubuntu-latest
container_name: zabbix-web
restart: unless-stopped
environment: # Postgre database variables
DB_SERVER_HOST: mysql-zabbix
MYSQL_USER: zabbix
MYSQL_PASSWORD: eccmts42*
MYSQL_DATABASE: zabbix
ZBX_SERVER_HOST: zabbix-server # Zabbix related and Php variables
ZBX_POSTMAXSIZE: 64M
PHP_TZ: "Europe/Berlin"
ZBX_MAXEXECUTIONTIME: 500
links:
- mysql-zabbix
- zabbix-server
depends_on:
- mysql-zabbix
- zabbix-server
ports: # Port where Zabbix UI is available
- "8084:8080"
networks:
zabbix:
ipv4_address: 172.19.0.4
mysql-zabbix:
#image: mariadb:10.6
logging:
driver: loki
options:
loki-url: "http://localhost:3100/loki/api/v1/push"
image: mysql:8.0
container_name: mysql-zabbix
command: --innodb-buffer-pool-size=2G --innodb-log-file-size=256M --max-connections=150 --innodb-flush-log-at-trx-commit=2
# ports:
# - "6603:3306"
environment:
# - default-authentication-plugin=mysql_native_password
- MYSQL_ROOT_PASSWORD=eccmts42*
- MYSQL_DATABASE=zabbix
- MYSQL_USER=zabbix
- MYSQL_PASSWORD=eccmts42*
volumes:
- /home/icke/mysql-zabbix/var:/var/lib/mysql
- /home/icke/mysql-zabbix/performance.cnf:/etc/mysql/conf.d/performance.cnf:ro
restart: unless-stopped
networks:
zabbix:
ipv4_address: 172.19.0.5
networks:
zabbix:
driver: bridge
ipam:
config:
- subnet: 172.19.0.0/29
volumes:
zabbix-server:
zabbix-web:
mysql-zabbix:
# zabbix-postfix:
# zabbix-agent: