Performance tuning your servers for YetiShare
Your server configuration can have a significant impact on the performance of YetiShare. Below are some of the server settings we'd recommend using. This page will be added to over time so it's not a definitive list. It assumes you have at least a VPS server with root access.
- Enable XSendFile to take load away from PHP - https://support.mfscripts.com/public/kb_view/1/
Nginx (recommended over Apache)
- Enable X-Accel-Redirect to take load away from PHP - https://support.mfscripts.com/public/kb_view/2/
- Additional advice on general Nginx performance tuning here: https://www.digitalocean.com/community/tutorials/h...
- Some Nginx security advice (note: not all tested): http://www.cyberciti.biz/tips/linux-unix-bsd-nginx...
- Amend /etc/nginx/nginx.conf
Restart Nginx after any changes.
- Amend the following values in your global php.ini file:
memory_limit = 512M
upload_max_filesize = 500M
post_max_size = 500M
max_execution_time = 180
max_input_time = 180
Restart your webserver to apply the changes.
PHP-FPM (if using Nginx)
- Amend /etc/php5/fpm/pool.d/www.conf
request_terminate_timeout = 300
pm = ondemand
pm.max_children = 75
pm.process_idle_timeout = 10s
Source for max_children - http://myshell.co.uk/blog/2012/07/adjusting-child-processes-for-php-fpm-nginx/
PHP Fast CGI
- If you're using FastCGI with PHP/Apache ensure you allow for any timeouts on large downloads, by default they will close connections after 5 minutes so you may get partially completed downloads. In your Apache config file add the following:
If you're using WHM/cPanel you can add this to /usr/local/apache/conf/includes/post_virtualhost_global.conf
Save and restart Apache.
1) Enable query cache.
Edit my.cnf file (sometimes in /etc/mysql/my.cnf)
Add or uncomment the following lines:
query_cache_size = 268435456
query_cache_type = 1
query_cache_limit = 1048576
2) Increase max connections in MySQL. In your my.cnf file, add or amend the following:
max_connections = 600
Restart MySQL. (this command will be different depending on your OS)
service mysql restart
Save and restart MySQL. You may need to adjust this value depending on your traffic levels and server resources available.
- Use CloudFlare to reduce load, speed up website content to your users and protect against DOS attacks.
- IMPORTANT - If using CloudFlare, ensure you have the following disabled (on the 'speed' tab), these are known to cause issues: