Here are the recipes we use from within Forge:
App Server
##
# Disable Unused Services
###
# 1. Beanstalkd
sudo systemctl stop beanstalkd
sudo systemctl disable beanstalkd
# 2. Memcached
sudo systemctl stop memcached
sudo systemctl disable memcached
# 3. Redis
sudo systemctl stop redis
sudo systemctl disable redis
##
# Adjust php process management
###
sudo sed -i "s/pm.max_children = .*/pm.max_children = 10/" /etc/php/7.1/fpm/pool.d/www.conf
sudo sed -i "s/pm.start_servers = .*/pm.start_servers = 4/" /etc/php/7.1/fpm/pool.d/www.conf
sudo sed -i "s/pm.min_spare_servers = .*/pm.min_spare_servers = 2/" /etc/php/7.1/fpm/pool.d/www.conf
sudo sed -i "s/pm.max_spare_servers = .*/pm.max_spare_servers = 4/" /etc/php/7.1/fpm/pool.d/www.conf
sudo sed -i "s/;pm.max_requests = .*/pm.max_requests = 1000/" /etc/php/7.1/fpm/pool.d/www.conf
sudo service php7.1-fpm restart
Worker and CRON Server
##
# Disable Unused Services
###
# 1. Beanstalkd
sudo systemctl stop beanstalkd
sudo systemctl disable beanstalkd
# 2. Memcached
sudo systemctl stop memcached
sudo systemctl disable memcached
# 3. Redis
sudo systemctl stop redis
sudo systemctl disable redis
# 4. Nginx
sudo systemctl stop nginx
sudo systemctl disable nginx
# 5. PHP-FPM
sudo systemctl stop php7.1-fpm
sudo systemctl disable php7.1-fpm
MySQL Server
##
# Disable Unused Services
###
# 1. Nginx
sudo systemctl stop nginx
sudo systemctl disable nginx
# 2. PHP-FPM
sudo systemctl stop php7.1-fpm
sudo systemctl disable php7.1-fpm
# 3. Beanstalkd
sudo systemctl stop beanstalkd
sudo systemctl disable beanstalkd
# 4. Memcached
sudo systemctl stop memcached
sudo systemctl disable memcached
# 5. Redis
sudo systemctl stop redis
sudo systemctl disable redis
Cache (Redis) Server
##
# Disable Unused Services
###
# 1. Nginx
sudo systemctl stop nginx
sudo systemctl disable nginx
# 2. PHP-FPM
sudo systemctl stop php7.1-fpm
sudo systemctl disable php7.1-fpm
# 3. Beanstalkd
sudo systemctl stop beanstalkd
sudo systemctl disable beanstalkd
# 4. Memcached
sudo systemctl stop memcached
sudo systemctl disable memcached