fixing stuff

This commit is contained in:
Bojan Kucera 2025-06-09 22:00:41 -04:00
parent 28e58c3227
commit ac23b70146
2 changed files with 32 additions and 18 deletions

View file

@ -5,6 +5,14 @@ services:
container_name: trading-bot-dragonfly
ports:
- "6379:6379"
deploy:
resources:
limits:
cpus: '4.0' # Use up to 4 CPU cores
memory: 8G # Use up to 8GB RAM
reservations:
cpus: '2.0' # Reserve at least 2 CPU cores
memory: 4G # Reserve at least 4GB RAM
command:
- dragonfly
- --logtostderr
@ -13,8 +21,14 @@ services:
- --proactor_threads=8
- --bind=0.0.0.0
- --admin_port=6380
- --cluster_mode=emulated
- --proactor_threads=8 # Number of I/O threads (CPU cores)
- --cache_mode=true # Enable cache mode for better performance
- --cluster_mode=emulated # Better for single-node performance
- --hz=500 # Increase background task frequency
- --tcp_keepalive=60
- --conn_use_incoming_cpu=true # Better CPU utilization
- --lock_on_hashtags
- --default_lua_flags=allow-undeclared-keys
volumes:
- dragonfly_data:/data
restart: unless-stopped