mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 08:55:24 +00:00
e961cfe0c3
Instead of synchronously updating the seen_time column for a host on an update, batch these updates to be written together every 1 second. This results in a ~33% reduction in MySQL CPU usage in a local test with 4,000 simulated hosts and MySQL running in Docker.
67 lines
1.6 KiB
YAML
67 lines
1.6 KiB
YAML
---
|
|
version: '2'
|
|
services:
|
|
mysql:
|
|
image: mysql:5.7
|
|
volumes:
|
|
- mysql-persistent-volume:/tmp
|
|
command: mysqld --datadir=/tmp/mysqldata --event-scheduler=ON
|
|
environment: &mysql-default-environment
|
|
MYSQL_ROOT_PASSWORD: toor
|
|
MYSQL_DATABASE: fleet
|
|
MYSQL_USER: fleet
|
|
MYSQL_PASSWORD: insecure
|
|
ports:
|
|
- "3306:3306"
|
|
|
|
mysql_test:
|
|
image: mysql:5.7
|
|
# innodb-file-per-table=OFF gives ~20% speedup for test runs.
|
|
command: mysqld --datadir=/tmpfs --slow_query_log=1 --log_output=TABLE --log-queries-not-using-indexes --event-scheduler=ON --innodb-file-per-table=OFF
|
|
tmpfs: /tmpfs
|
|
environment: *mysql-default-environment
|
|
ports:
|
|
- "3307:3306"
|
|
|
|
mailhog:
|
|
image: mailhog/mailhog:latest
|
|
ports:
|
|
- "8025:8025"
|
|
- "1025:1025"
|
|
|
|
redis:
|
|
image: redis:5
|
|
ports:
|
|
- "6379:6379"
|
|
|
|
saml_idp:
|
|
image: fleetdm/docker-idp:latest
|
|
environment:
|
|
SIMPLESAMLPHP_SP_ENTITY_ID: 'https://localhost:8080'
|
|
SIMPLESAMLPHP_SP_ASSERTION_CONSUMER_SERVICE: 'https://localhost:8080/api/v1/fleet/sso/callback'
|
|
ports:
|
|
- "9080:8080"
|
|
- "9443:8443"
|
|
|
|
# CAdvisor container allows monitoring other containers. Useful for
|
|
# development.
|
|
cadvisor:
|
|
image: google/cadvisor:latest
|
|
ports:
|
|
- "5678:8080"
|
|
volumes:
|
|
- /:/rootfs:ro
|
|
- /var/run:/var/run:rw
|
|
- /sys:/sys:ro
|
|
- /var/lib/docker/:/var/lib/docker:ro
|
|
|
|
prometheus:
|
|
image: prom/prometheus:latest
|
|
ports:
|
|
- "9090:9090"
|
|
volumes:
|
|
- ./tools/app/prometheus.yml:/etc/prometheus/prometheus.yml
|
|
|
|
volumes:
|
|
mysql-persistent-volume:
|