Basically we have to host the audio recording of conferences.
The traffic is not very large (4000 visitors per month in GA), but of materials about TB.
For this case there is a CMS developed by us, who knows how these records are to lose the right way to look for etc.
Requirements: PHP 7, Apache, MySQL.
I took on a OVH dedicated server (32GB RAM, 8cores), it came at Hyper-V and Ubuntu 18.04 VM (8GB RAM, 3cores).
And it slows down. And it seems from over the network. One of the symptoms is sometimes the site opens quickly and sometimes the first page waiting for 10-20 seconds!
Until understood, saw me hanging a bunch of connections in the CLOSE_WAIT state:
root@ub18s:/home/slavik# netstat-tupn | grep CLOSE_WAIT
tcp 1 103452 22.214.171.124:443 126.96.36.199:58602 CLOSE_WAIT 30305/apache2
tcp 1 99258 188.8.131.52:443 184.108.40.206:39694 CLOSE_WAIT 30937/apache2
tcp 1 29358 220.127.116.11:443 18.104.22.168:41087 CLOSE_WAIT 32766/apache2
tcp 1 114636 22.214.171.124:443 126.96.36.199:54569 CLOSE_WAIT 30338/apache2
And this is not good. And about this is the questions on StackOverflow, but the solutions I found - like the problem of network stack Ubuntu.
Well I tried and tadalail another VM is now CentOS 7 (8GB, 3 cores).
All working class, fast, a backlog CLOSE_WAIT present.
But in CentOS is constantly hanging single process kswapd0, which loads one core to 100%. It seems to be associated with swapping memory. Also tried all different settings - not overpowered, too similar to the issue of the OS kernel.
Though it shouldn't be displayed - nothing ever seems slow, but somehow unpleasant.
Now I think to try Debian? 9.6?
Or is there some configuration that people advise?
P. S. Put a 9.6 Debian + Nginx + PHP-FPM. Here for about a month works. Very stable.