My system is very slow but I can't find the reason

leobibiano

Active Member
Sep 7, 2020
32
5
8
Brazil
cPanel Access Level
DataCenter Provider
Hi!

I have a problem that is making me very worried.

Every request made for any type of access to my server takes a long time to respond.
I checked in "Service Status", but I can't find anything wrong, everything is ok.

Load Averages: 0.60 0.85 1.20

I use the AWS EC2 instance, I didn't find anything wrong with monitoring there either. CPU usage is always below 25% and memory is always below 50%.

Recently there was an update of WHM, I don't know if it can be related.

I don't understand what may be happening. Can someone help me?
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
4,357
546
273
cPanel Access Level
Root Administrator
Hey there! You mentioned that it's any type of request, which means the issue wouldn't be isolated to just one service. This sounds more like a network problem than a server-side problem if it is affecting all services on the machine.

One thing you could check would be the disk I/O performance. If you check the "top" command you'll see a "%wa" section, which is the disk wait time. Is that number higher than a few percent? If so, that could indicate disk performance issues on the machine. If not, I would speak with the host about these performance issues to have them check things on their end.
 

leobibiano

Active Member
Sep 7, 2020
32
5
8
Brazil
cPanel Access Level
DataCenter Provider
Hey there! You mentioned that it's any type of request, which means the issue wouldn't be isolated to just one service. This sounds more like a network problem than a server-side problem if it is affecting all services on the machine.

One thing you could check would be the disk I/O performance. If you check the "top" command you'll see a "%wa" section, which is the disk wait time. Is that number higher than a few percent? If so, that could indicate disk performance issues on the machine. If not, I would speak with the host about these performance issues to have them check things on their end.
I executed the command "top" as directed, the return is attached.

I didn't find anything unusual either.

what else could it be? How to diagnose this?
 

Attachments

leobibiano

Active Member
Sep 7, 2020
32
5
8
Brazil
cPanel Access Level
DataCenter Provider
What do you see from the output of the following two commands:

Code:
free -m

mysqladmin proc status

free -m

Code:
              total        used        free      shared  buff/cache   available
Mem:          15420       11021         157         507        4241        3563
Swap:             0           0           0

mysqladmin proc status

Code:
+----------+-------------------+----------------------+------------------+---------+------+--------------+------------------------------------------------------------------------------------------------------+
| Id       | User              | Host                 | db               | Command | Time | State        | Info                                                                  |
+----------+-------------------+----------------------+------------------+---------+------+--------------+------------------------------------------------------------------------------------------------------+
| 11426560 | root              | localhost            |                  | Query   | 0    | starting     | show processlist                                                                  |
+----------+-------------------+----------------------+------------------+---------+------+--------------+------------------------------------------------------------------------------------------------------+
 

leobibiano

Active Member
Sep 7, 2020
32
5
8
Brazil
cPanel Access Level
DataCenter Provider
It looks like the MySQL command is only showing the top line, when usually there is a summary of the connections at the bottom. That memory usage shows over 3.5G free, so that seems fine.
I'm sorry, it was my mistake. I left the last line out unintentionally.

Here is the complete answer again:

Code:
+----------+------+-----------+----+---------+------+----------+------------------+
| Id       | User | Host      | db | Command | Time | State    | Info             |
+----------+------+-----------+----+---------+------+----------+------------------+
| 11494223 | root | localhost |    | Query   | 0    | starting | show processlist |
+----------+------+-----------+----+---------+------+----------+------------------+
Uptime: 1101286  Threads: 1  Questions: 3534965056636  Slow queries: 0  Opens: 11799818  Flush tables: 1  Open tables: 2000  Queries per second avg: 3209851.988
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
4,357
546
273
cPanel Access Level
Root Administrator
Thanks for providing that output.

Are you expecting there to be that much traffic with MySQL? 3 million queries per second is an incredibly large amount of data.

Since the MySQL service has been up and running for 12 days I'm wondering if that number is actually not accurate. Can you try restarting MySQL to see if that number changes and if the performance on the machine improves?
 

leobibiano

Active Member
Sep 7, 2020
32
5
8
Brazil
cPanel Access Level
DataCenter Provider
Thanks for providing that output.

Are you expecting there to be that much traffic with MySQL? 3 million queries per second is an incredibly large amount of data.

Since the MySQL service has been up and running for 12 days I'm wondering if that number is actually not accurate. Can you try restarting MySQL to see if that number changes and if the performance on the machine improves?
Thanks for the feedback.

We have a lot of consultations per second, yes, but I can't say if it would reach 3 million.

I restarted Mysql, but the number remained high.

But anyway, even if that number is correct, to handle these database queries what matters is the CPU and memory load, right?

I realized today that it is slower than yesterday, it seems to me that every day it gets worse. What could be happening?
 

leobibiano

Active Member
Sep 7, 2020
32
5
8
Brazil
cPanel Access Level
DataCenter Provider
It would definitely be the CPU and RAM for the number of queries. As a test, if you stop the MySQL server for a few minutes, does the server seem faster?
This slowness only happens a few times a day, not all the time.

The companies that access my system, only access it during office hours. And that's when slowness happens.

When no one is using it, it goes back to normal.

I even thought about improving my server, however, as I said earlier, I don't know what's wrong, so I don't know what to improve.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
4,357
546
273
cPanel Access Level
Root Administrator
It's always tricky to track down intermittent problems in any system or machine. If you can get logged into SSH quickly and check the CPU, RAM, and MySQL system during the time of the slowness that may be the best way to get more details about the situation.
 

leobibiano

Active Member
Sep 7, 2020
32
5
8
Brazil
cPanel Access Level
DataCenter Provider
It's always tricky to track down intermittent problems in any system or machine. If you can get logged into SSH quickly and check the CPU, RAM, and MySQL system during the time of the slowness that may be the best way to get more details about the situation.
Okay, but that's where the difficulty is, because everything always seems normal, even at the time of slowness, the results always show everything normal.

It does not seem to me a problem of performance of the machine itself, but of response time. I thought it might be something on the server's network, but I don't know how to monitor it.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
4,357
546
273
cPanel Access Level
Root Administrator
If you aren't seeing a difference with the server monitoring tools during those times, it very well could be the network connection. That is something that you'd want to reach out to your hosting provider about to see if they can monitor that for you as there are not any cPanel tools that can do that type of monitoring.
 

leobibiano

Active Member
Sep 7, 2020
32
5
8
Brazil
cPanel Access Level
DataCenter Provider
If you aren't seeing a difference with the server monitoring tools during those times, it very well could be the network connection. That is something that you'd want to reach out to your hosting provider about to see if they can monitor that for you as there are not any cPanel tools that can do that type of monitoring.
Okay, I will do that. Thanks a lot for the help.