Performance Issues over 10 Connections

Started by tjbalon, August 06, 2016, 03:14:20 PM

Previous topic - Next topic

tjbalon

For a long time I used share hosting on a 1270v2 of a friends company. This has been a good route for me, as we had cPanel, didn't have to worry about much upkeep, etc.

As of 2 months ago, we purchased our own dedicated server at OVH (1630v3, 2 cores / 2 threads allocated, 8gb of ram, 256gb ssd space).

I've yet to transfer the website because using loader.io, over about 10 connections we bomb out.

I am using nginx + php5-fpm. More than willing to swap over to Apache2 if need be.

Cases I've tried with 50 connections over 1m with loader.io:
Default SMF installation (Works perfect, 50 successful connections, low load time)
Default SMF installation, database of ours with 250k posts or so. (Loads fine for the most part, doesn't really slow down)
Our SMF installation, has quite a few mods, our database, disabled our theme (After about 20 connections it slows down a lot but no failures)
Our current configuration in Dallas (After 2-5 connections, goodbye. Website goes and 404's for a few minutes.)

This puzzles me. Is it my web configuration? My MYSQL?

While I understand having our website heavily modded and a custom theme will increase load time, this box is more powerful than texas, and texas handles it fine when other clients aren't abusing with wordpress websites. This should be handling it completely fine with that logic.

I can't tell if the clog is with nginx, php5-fpm, mysql, OVH's firewall? No telling.

During load HTOP looks completely fine. I can do whatever tests, etc.

Any help is extremely appreciated. Not sure if anyone like CoreISP is around today, but I know he pointed me in the right direction on a different issue.

LiroyvH

You could try seeing if the output of debug helps you, in Settings.php:

$db_show_debug = true;


The output shows to all users, but can be helpful figuring out why it cripples.

Need more details. How big is the database? What have you, for example, done to optimize mySQL; and what engine are you using?
((U + C + I)x(10 − S)) / 20xAx1 / (1 − sin(F / 10))
President/CEO of Simple Machines - Server Manager
Please do not PM for support - anything else is usually OK.

tjbalon

#2
Will make that change now.

DB is 158.3MB

Majority of tables are running MyISAM in both locations (TX and CA).

For the MySQL server according to mysqltuner things look fine. Enabled slow queries, added more available connections (10k), the sql server is running on it's own VMWare on the same box (2c2t 8gbram).

--
I've tried both nginx and apache.

nginx I changed quite a few things around adding more worker processes, more connections, and shutting off mutex locks to prevent blocking. (This did not work). + php5-fpm

Apache however I left default, things loaded slower.


--------------
I enabled the show debug, ran a load.io at 5 clients/s over 30s.

While loading on my side, the load took 10.3s.
index.php?action=forum took 9152ms (~10s)

On my load during this I ran 19 queries.
Those being my longest:
in .../Sources/Subs-DreamPortal.php line 2496, which took 9.704E-5 seconds at 0.01191497 into request. (This is a shoutbox)
in .../Sources/badgeawards2.php line 692, which took 9.489E-5 seconds at 0.00960708 into request. (Badges)
in .../Sources/badgeawards2.php line 825, which took 9.799E-5 seconds at 0.00911498 into request. (Badges again)
in .../Sources/Load.php line 1521, which took 9.298E-5 seconds at 0.00285506 into request.

Disabling badgeawards, same thing. Same thing with disabling dreamportal.

LiroyvH

-edit- scratch all that I wrote here initially, I seem to have missed something:
Did I properly understand from your first post that everything runs perfectly fine with fresh SMF installs, even if you import the database; it only runs like sh** when you also import the original files...?

I am mildly curious why you would virtualize this setup though, if the database is merely 158MB. Unless you have other things running on there as well, heh.
Otherwise it's just another layer of complexity and different resource methodology. VMWare doesn't usually run perfect out of the box.
((U + C + I)x(10 − S)) / 20xAx1 / (1 − sin(F / 10))
President/CEO of Simple Machines - Server Manager
Please do not PM for support - anything else is usually OK.

tjbalon

The current shared hosting is running through visualizer on Ubuntu. (The one in texas that handles all this currently)

I have to split these up sadly as I'm using a Windows VM for something else, low powered through.

CPU/IOTop look fine.

---

A fresh install, no data... yes it runs fine.

With our database, it slows a little bit, not entirely terrible. (This is no theme no mods). Some connections still timeout.

With all our stuff, website crashes, gateway errors, etc after that.

It makes no sense how more powerful hardware with a better configuration (debian with nginx + php5-fpm) would cause these issues opposed to centos with apache2 and php5-cli? Whatever cPanel ships with by default.

Off topic @CoreISP, I know you have a lot of server work behind you, do you do paid jobs? I've been working on this for 2 months with no prevail, I feel like I am too in experienced, but can keep debugging here if that is not an option. If so, let me know if I should PM you with more questions privately, or if working here will help (not sure what else I can show you).

---
Lastly: Do those queries I mentioned look fine?

Thank you for your time!

LiroyvH

No it doesn't make any sense at all with those specs, especially not as the forum doesnt really sound like its huge but relatively small, unless something is terribly wrong in a configuration somewhere (which can include vmware) or something is really rather rotten in one of the mods you're using. But if it runs fine on the previous server, it's likely the former that has an issue... But what exactly is a good question as there are quite the amount of configs that may matter... :/ And VMWare can be a bit voodoo sometimes in the way it handles resources.
Which VMWare product is it?

Yes I do, feel free to PM.
((U + C + I)x(10 − S)) / 20xAx1 / (1 − sin(F / 10))
President/CEO of Simple Machines - Server Manager
Please do not PM for support - anything else is usually OK.

tjbalon

VMWare ESXi.

I did send you a PM.

Thank you again for your time.

leghorn23

It seems likely to be MySQL. Turn on debugging and try to get to the bottom of whats bogging it down. EXPLAIN can help tons to figure out what the root of the problem is (missing index for example) as you have a fairly large DB.

Advertisement: