gebeer Posted February 7, 2023 Share Posted February 7, 2023 Hi all, I'm currently working on a PW app that is expected to get a lot of traffic for a few days. Peak will be around 5000 requests/second. The app is hosted on a virtuel server within the client's network and has some quite impressive specs: - 32 core CPUs - 80 GB RAM Now I am wodering if the server will be able to handle high loads. ATM we have around 100 open sessions per second and mysqld process is already spiking around 10% and php-fpm around 2-5%. We did load tests with 5000 virtual users through https://loadforge.com/ and the server is starting to produce hangs at only around 50 requests/second. On the code side there is nothing really special. No expensive queries that I am aware of. Caching is not really an option because frontend views mostly depend on frequently changing data and most views have form submissions. There is one dashboard view with long polling XHR requests for JSON data. This data can also not be cached because it changes frequently so I think permamnently updating cache on data changes would be equally expensive as just not caching it. Unfortunately we have no server monitoring tools at our disposal. But I would think that a server with these specs should be able to easily handle hundreds of requests/s. The IT responsivle for the server do not seem to have a lot of experience with LAMP stack web servers. So I'm concerned there might be some MySQL missconfigurations. Anyways, if any of you have experience with high load PW apps, please share your expertise ? 1 Link to comment Share on other sites More sharing options...
eydun Posted February 7, 2023 Share Posted February 7, 2023 My experience is that MySQL-connections is the first bottle-neck. Try to cache as much as possible. Link to comment Share on other sites More sharing options...
gebeer Posted February 7, 2023 Author Share Posted February 7, 2023 2 minutes ago, eydun said: My experience is that MySQL-connections is the first bottle-neck. Try to cache as much as possible. Thanks for the input! File-Cache you mean then? Because https://processwire.com/api/ref/wire-cache/ is DB driven, I think. Link to comment Share on other sites More sharing options...
gebeer Posted February 7, 2023 Author Share Posted February 7, 2023 Update: When I measured CPU and MEM usage, I used Linux top command. I just discovered that you need to switch the mode to correctly display multi-core CPU percentage ? https://unix.stackexchange.com/questions/34435/top-output-cpu-usage-100 After switching to Solaris mode the numbers look much better with around 100 open sessions ? mysqld: 0.1% php-fpm: 0.1% Link to comment Share on other sites More sharing options...
eydun Posted February 7, 2023 Share Posted February 7, 2023 > File-Cache you mean then? Yes, absolutely File-Cache. >After switching to Solaris mode the numbers look much better Glad to hear ? Link to comment Share on other sites More sharing options...
Recommended Posts