ISPConfig 3 & Proxmox sites have VERY SLOW TTFB

Discussion in 'General' started by TomStone, Feb 20, 2022.

  1. TomStone

    TomStone New Member

    Hey people!

    I have two sites running on my Dell R630, 128GB ram, 2x 10 core xeons, on a 1GBPS network connection in a datacenter a few km from me.

    Ive got two sites running, both wordpress, both get very slow with traffic, with just like 20% cpu usage, network all good too. The server has 2x Mirror NVME drives, so i doubt the hardware would be the issue. The problem is mainly TTFB, the actual loading of stuff is "relatively" ok, altough not ideal either.

    We do get quite a lot of traffic, both sites have around 1-2k active users. We did not have any problems when on Google hosting, just the fact that the servers were pretty underpowered for their price in this case, with so many plugins, which is why we switched to our own hardware.
    Compared to google, it seems to get slow even when not using 100% of the CPU. Thats whats so odd.

    Any ideas? It only seems to be a problem when theres more traffic, like there isnt enough ports or something...thank you!!!
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    You may need to optimize Wordpress, I do not know how. Maybe remove plugins that are not needed, that might help.
    To get some idea on how to make your websites faster, run monitoring and measurements to see where the time is spent or wasted. Your hardware seems very powefull, but bad websites run slow on any harware.
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    Using many plugins in WordPress is always an issue as it slows down WP.

    Do you use apache or Nginx as the web server?
    Do you use any proxies in front of the system like CloudFlare?
    Do you use a caching plugin in WordPress?

    On the options tab of the websites in ISPConfig, you can also increase the number of PHP processes of the site. Is this a big website in terms of number of pages? If yes, you might want to check MySQL with e.g. MySQLTuner to see if there are any settings to be improved in the database server part. There are also plugins that optimize WP database structure for better performance
  4. TomStone

    TomStone New Member

    I use Apache
    I do not, i tried cloudflare, didnt change a thing...
    I do use it on one of the two sites, and i managed to minify and optimise it by a lot. The problem is, whenever theres traffic, it slows BOTH sites down. Its like the server couldnt keep up, yet its only using a small percentage of its available CPU power. Like its waiting on something. My TTFB is 10-30 seconds at these times, which is WAY beyond normal lol. Thanks[/QUOTE]
  5. TomStone

    TomStone New Member

    Hey, i doubt it really is a problem of plugins. Sure, theres a lot on one site, but the other has like 4-5 plugins only. The TTFB of both sites gets up to 30 seconds at worst, which is abysmal, even if i were to use 100s of plugins. Like i wrote above, its like the server gets overloaded, or there is a open file limit or something along those lines. The number of open files is set to unlimited ("cat /proc/sys/fs/file-max shows unlimited"), but i have not tried other stuff. Any info is welcome, im frankly a little lost.
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    I recommend you start checking mysql settings then, WordPress highly depends on good database speed.

    Which WP caching plugin do you use and in which mode? Try using e.g. w3total cache or LiteSpeed cache and use Memcached as caching backend in the settings of the plugins to keep the cache in memory. memcached and PHP Memcached plugins are installed by default on ISPConfig systems if you followed our install guides. Alternatively, you can also use Redis as backend, but you have to install redis then first and probably also the PHP redis module.
  7. TomStone

    TomStone New Member

    Ok, installed W3, it does not allow me to choose memcached tho. Also, the Disk Basic seems oddly way too fast lol. Any tips/a tutorial on how to get Memcached working? Thanks !
  8. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    TTFB in wordpress, would come down mainly to DB and php performance, it won't start sending back any data until it's built the wordpress page. caching would certainly help avoid problems and reduce load. but in this case, it may be better to turn off all caching for a while, having it on may just make it harder to find where the issue actually is.

    try installing the 'query monitor' plugin on those sites, if there's anything slowing it down in php or mysql, that should make it easy to find.
  9. If you're using Debian/Ubuntu, it may be as simple as doing something like:

    sudo apt-get install memcached php-memcached

    RPM-based installations should have similar packages. memcached, as far as I remember, works 'out of the box' with zero configuration, so it's always a great choice :)

Share This Page