Target 1000 concurrent users untuk TAO
CPU
CPU 10 core$ cat /proc/cpuinfo | grep "model name"
model name : Intel(R) Xeon(R) Gold 5115 CPU @ 2.40GHz
model name : Intel(R) Xeon(R) Gold 5115 CPU @ 2.40GHz
model name : Intel(R) Xeon(R) Gold 5115 CPU @ 2.40GHz
model name : Intel(R) Xeon(R) Gold 5115 CPU @ 2.40GHz
model name : Intel(R) Xeon(R) Gold 5115 CPU @ 2.40GHz
model name : Intel(R) Xeon(R) Gold 5115 CPU @ 2.40GHz
model name : Intel(R) Xeon(R) Gold 5115 CPU @ 2.40GHz
model name : Intel(R) Xeon(R) Gold 5115 CPU @ 2.40GHz
model name : Intel(R) Xeon(R) Gold 5115 CPU @ 2.40GHz
model name : Intel(R) Xeon(R) Gold 5115 CPU @ 2.40GHz
Memory
$free -gtotal used free shared buff/cache availableMem: 16 0 14 0 1 15Swap: 0 0 0
Tuning
Untuk mengetahui concurrent user, jalankan perintah :
$ netstat -plan | grep :80 | wc -l
$ netstat -plan | grep :443 | wc -l
Terkadang, tiba-tiba server seperti hang tidak bisa menerima request sama sekali, menurut diskusi [7], solusi yg bisa dicoba mengubah kongurasi php-fpm.conf
emergency_restart_threshold=3
emergency_restart_interval=1m
process_control_timeout=5s
listen.backlog
fpm/pool.d/www.conf
listen.backlog = 65536
Pastikan limit OS nya melebihi diatas, jalankan :
sysctl net.core.somaxconn
echo "net.core.somaxconn=65536" >> /etc/sysctl.conf
sysctl -p
Referensi
- PHP-FPM Process Calculator, https://spot13.com/pmcalculator/
- Optimizing PHP-FPM for High Performance, https://geekflare.com/php-fpm-optimization/
- Performance enhacements for Apache and PHP, https://blog.bitnami.com/2014/06/performance-enhacements-for-apache-and.html
- Optimizing PHP Application Concurrency, https://devcenter.heroku.com/articles/php-concurrency
- PHP-FPM tuning for high load – The Best practices!, https://bobcares.com/blog/php-fpm-tuning-high-load/
- Moodle performance - examples of configurations, https://moodle.org/mod/forum/discuss.php?d=395623
- Optimizing NGINX and PHP-fpm for high traffic sites, http://www.softwareprojects.com/resources/programming/t-optimizing-nginx-and-php-fpm-for-high-traffic-sites-2081.html
- Constantly have to reload PHP-FPM, https://serverfault.com/questions/575457/constantly-have-to-reload-php-fpm
- Apache2 and php fpm performance optimization — Step-by-step guide, https://medium.com/@sbuckpesch/apache2-and-php-fpm-performance-optimization-step-by-step-guide-1bfecf161534
- What Are The Best PHP Accelerators?, https://wp-rocket.me/blog/best-php-accelerators/
- How to Enable and Monitor PHP-FPM Status in Nginx, https://www.tecmint.com/enable-monitor-php-fpm-status-in-nginx/
- PHP-FPM settings tutorial. max_servers, min_servers, etc., https://thisinterestsme.com/php-fpm-settings/
No comments:
Post a Comment