News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

SMF Tables causing high CPU Usage

Started by lonrot, May 10, 2008, 08:55:01 PM

Previous topic - Next topic

lonrot

Hello, I'm running a VPS with virtuozzo.

I have had terrible performance these days. And I haven't found a solution. My site address is www.consolemaniak.com

Check the ticket reply my hosting support has given to me.

QuoteHello,

We have checked your VPS and found that your mysql is taking high CPU resources on the server, please check the attached logs for the same. Please try to tune your mysql configuration and do let us know if you need any assistance on this.
Thank you.

This is the log:
| Id  | User                 | Host            | db                     | Command | Time | State | Info             |
+-----+----------------------+-----------------+------------------------+---------+------+-------+------------------+
| 24  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 7    |       |                  |
| 43  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 13   |       |                  |
| 64  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 27   |       |                  |
| 72  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 23   |       |                  |
| 75  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 7    |       |                  |
| 76  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 0    |       |                  |
| 77  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 22   |       |                  |
| 78  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 2    |       |                  |
| 79  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 31   |       |                  |
| 82  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 46   |       |                  |
| 83  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 34   |       |                  |
| 87  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 12   |       |                  |
| 90  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 0    |       |                  |
| 91  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 42   |       |                  |
| 92  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 38   |       |                  |
| 93  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 44   |       |                  |
| 94  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 0    |       |                  |
| 96  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 30   |       |                  |
| 97  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 9    |       |                  |
| 98  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 1    |       |                  |
| 99  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 0    |       |                  |
| 100 | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 0    |       |                  |
| 101 | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 1    |       |                  |
| 102 | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 1    |       |                  |
| 103 | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 2    |       |                  |
| 107 | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 10   |       |                  |
| 108 | unauthenticated user | connecting host |                        | Connect |      | login |                  |
| 109 | root                 | localhost       |                        | Query   | 0    |       | show processlist |
+-----+----------------------+-----------------+------------------------+---------+------+-------+------------------+

+-----+----------------------+-----------------+------------------------+---------+------+----------------+---------------------------------------------+
| Id  | User                 | Host            | db                     | Command | Time | State          | Info                                        |
+-----+----------------------+-----------------+------------------------+---------+------+----------------+---------------------------------------------+
| 24  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 10   |                |                                             |
| 43  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 16   |                |                                             |
| 64  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 30   |                |                                             |
| 72  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 26   |                |                                             |
| 75  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 1    |                |                                             |
| 76  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 0    |                |                                             |
| 77  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 1    |                |                                             |
| 78  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 0    |                |                                             |
| 79  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 34   |                |                                             |
| 82  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 49   |                |                                             |
| 83  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 37   |                |                                             |
| 87  | consolem_console     | localhost       | consolem_consolemaniak | Query   | 0    | Writing to net | SELECT variable, value
                        FROM smf_settings |
| 90  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 2    |                |                                             |
| 91  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 45   |                |                                             |
| 92  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 41   |                |                                             |
| 93  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 47   |                |                                             |
| 94  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 3    |                |                                             |
| 96  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 33   |                |                                             |
| 97  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 12   |                |                                             |
| 98  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 4    |                |                                             |
| 99  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 1    |                |                                             |
| 100 | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 1    |                |                                             |
| 101 | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 4    |                |                                             |
| 102 | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 4    |                |                                             |
| 103 | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 5    |                |                                             |
| 107 | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 13   |                |                                             |
| 108 | unauthenticated user | connecting host |                        | Connect |      | login          |                                             |
| 109 | root                 | localhost       |                        | Query   | 0    |                | show processlist                            |
| 110 | unauthenticated user | connecting host |                        | Connect |      | login          |                                             |
| 111 | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 1    |                |                                             |
+-----+----------------------+-----------------+------------------------+---------+------+----------------+---------------------------------------------+

+-----+----------------------+-----------------+------------------------+---------+------+----------------+------------------------------------------------------------------------------------------------------+
| Id  | User                 | Host            | db                     | Command | Time | State          | Info                                                                                                 |
+-----+----------------------+-----------------+------------------------+---------+------+----------------+------------------------------------------------------------------------------------------------------+
| 24  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 12   |                |                                                                                                      |
| 43  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 18   |                |                                                                                                      |
| 64  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 32   |                |                                                                                                      |
| 72  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 28   |                |                                                                                                      |
| 75  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 3    |                |                                                                                                      |
| 76  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 2    |                |                                                                                                      |
| 77  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 3    |                |                                                                                                      |
| 78  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 0    |                |                                                                                                      |
| 82  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 51   |                |                                                                                                      |
| 83  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 39   |                |                                                                                                      |
| 87  | consolem_console     | localhost       | consolem_consolemaniak | Query   | 2    | Sorting result | SELECT t.ID_FIRST_MSG
                FROM (smf_topics as t, smf_boards as b)
                WHERE t.ID_BOARD IN (56,19,26,44,2 |
| 90  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 4    |                |                                                                                                      |
| 91  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 47   |                |                                                                                                      |
| 92  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 43   |                |                                                                                                      |
| 93  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 49   |                |                                                                                                      |
| 94  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 5    |                |                                                                                                      |
| 96  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 35   |                |                                                                                                      |
| 97  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 0    |                |                                                                                                      |
| 98  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 6    |                |                                                                                                      |
| 99  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 1    |                |                                                                                                      |
| 100 | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 1    |                |                                                                                                      |
| 101 | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 6    |                |                                                                                                      |
| 102 | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 6    |                |                                                                                                      |
| 103 | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 7    |                |                                                                                                      |
| 107 | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 15   |                |                                                                                                      |
| 108 | consolem_console     | localhost       | consolem_consolemaniak | Query   | 2    | Sending data   | SELECT variable, value, ID_MEMBER, ID_THEME
                        FROM smf_themes
                        WHERE ID_MEMBER IN (-1, 0, -1)
                         |
| 109 | root                 | localhost       |                        | Query   | 0    |                | show processlist                                                                                     |
| 110 | unauthenticated user | connecting host |                        | Connect |      | login          |                                                                                                      |
| 111 | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 3    |                |                                                                                                      |
+-----+----------------------+-----------------+------------------------+---------+------+----------------+------------------------------------------------------------------------------------------------------+

+-----+----------------------+-----------------+------------------------+---------+------+--------------+------------------------------------------------------------------------------------------------------+
| Id  | User                 | Host            | db                     | Command | Time | State        | Info                                                                                                 |
+-----+----------------------+-----------------+------------------------+---------+------+--------------+------------------------------------------------------------------------------------------------------+
| 24  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 14   |              |                                                                                                      |
| 43  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 20   |              |                                                                                                      |
| 64  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 34   |              |                                                                                                      |
| 72  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 30   |              |                                                                                                      |
| 75  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 5    |              |                                                                                                      |
| 76  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 0    |              |                                                                                                      |
| 77  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 5    |              |                                                                                                      |
| 78  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 0    |              |                                                                                                      |
| 82  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 53   |              |                                                                                                      |
| 87  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 0    |              |                                                                                                      |
| 90  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 6    |              |                                                                                                      |
| 92  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 45   |              |                                                                                                      |
| 93  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 51   |              |                                                                                                      |
| 94  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 7    |              |                                                                                                      |
| 96  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 37   |              |                                                                                                      |
| 97  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 2    |              |                                                                                                      |
| 98  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 8    |              |                                                                                                      |
| 99  | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 3    |              |                                                                                                      |
| 100 | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 3    |              |                                                                                                      |
| 101 | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 8    |              |                                                                                                      |
| 102 | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 8    |              |                                                                                                      |
| 103 | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 9    |              |                                                                                                      |
| 107 | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 17   |              |                                                                                                      |
| 108 | consolem_console     | localhost       | consolem_consolemaniak | Query   | 4    | Sending data | SELECT variable, value, ID_MEMBER, ID_THEME
                        FROM smf_themes
                        WHERE ID_MEMBER IN (-1, 0, -1)
                         |
| 109 | root                 | localhost       |                        | Query   | 0    |              | show processlist                                                                                     |
| 110 | unauthenticated user | connecting host |                        | Connect |      | login        |                                                                                                      |
| 111 | consolem_console     | localhost       | consolem_consolemaniak | Sleep   | 5    |              |                                                                                                      |
+-----+----------------------+-----------------+------------------------+---------+------+--------------+------------------------------------------------------------------------------------------------------+

karlbenson

Well to me the log is useless. other than showing the length of time.
Its not actually showing most of the queries which were being ran. (If it were we could say which ones were causing it)
The queries that are shown are minor ones. (that should be very very very quick).

Try the performance topics at the top of the forum.
What mods do you have installed. Things that constantly update like Chatrooms/Shoutboxes use a ton of queries.

metallica48423

one of the stickies in this board has a file called status.php attached to it -- could you download it and upload it to your forum, and link us to it?  Thanks
Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

QuoteMicrosoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"


Useful Links:
Online Manual!
How to Help us Help you
Search
Settings Repair Tool

lonrot

http://consolemaniak.com/status.php

The current SMF directory is a clean one (no mods) since using the original will only end up as a server crash...

Aleksi "Lex" Kilpinen

Just a few things I've noticed can help a lot:

Threads_cached: 0
Threads_connected: 1
Threads_created: 12944

You could benefit from a thread cache, even a small one, so that everytime MySQL needs a new thread, it won't have to create one, but just reuse a cached thread.

Also, you have Query cache enabled, but no memory for it.  query_cache_size: 0
So assigning some memory for query cache, could lighten the load, as the database server wouldn't actually need to run a query for every little thing, but could pull some info from memory.

As for the rest of the settings, it seems you've quite recently restarted the server?
(Uptime: 31303) so the values shown will change a lot over time, and it's hard to say much right now...
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

lonrot

Sorry guys but I'll have to ask where should I change all these parameters, have looked at the Sticky topics but can't find it.

H

You need to edit the thread and query settings which are probably in /etc/my.cnf.
-H
Former Support Team Lead
                              I recommend:
Namecheap (domains)
Fastmail (e-mail)
Linode (VPS)
                             

lonrot


H

That is very strange.

What is the output of the following command at the console?

updatedb && locate my.cnf
-H
Former Support Team Lead
                              I recommend:
Namecheap (domains)
Fastmail (e-mail)
Linode (VPS)
                             


metallica48423

Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

QuoteMicrosoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"


Useful Links:
Online Manual!
How to Help us Help you
Search
Settings Repair Tool

lonrot

#11


login as: root
[email protected]'s password:
Last login: Tue May 13 03:32:42 2008 from 201.195.185.38
[root@vps1184 ~]# updatedb && locate my.cnf
^[
updatedb && locate my.cnf
/root/.my.cnf
/usr/local/Zend/etc/my.cnf.org
/usr/local/cpanel/whostmgr/my.cnf
/etc/my.cnf
/etc/my.cnf.tunned
/backup/cpbackup/weekly/files/_root_.my.cnf.gz
/backup/cpbackup/weekly/files/_etc_my.cnf.gz
/backup/cpbackup/monthly/files/_root_.my.cnf.gz
/backup/cpbackup/monthly/files/_etc_my.cnf.gz
[root@vps1184 ~]# updatedb && locate my.cnf
/root/.my.cnf
/usr/local/Zend/etc/my.cnf.org
/usr/local/cpanel/whostmgr/my.cnf
/etc/my.cnf
/etc/my.cnf.tunned
/backup/cpbackup/weekly/files/_root_.my.cnf.gz
/backup/cpbackup/weekly/files/_etc_my.cnf.gz
/backup/cpbackup/monthly/files/_root_.my.cnf.gz
/backup/cpbackup/monthly/files/_etc_my.cnf.gz
[root@vps1184 ~]# updatedb && locate my.cnf
/root/.my.cnf
/usr/local/Zend/etc/my.cnf.org
/usr/local/cpanel/whostmgr/my.cnf
/etc/my.cnf
/etc/my.cnf.tunned
/backup/cpbackup/weekly/files/_root_.my.cnf.gz
/backup/cpbackup/weekly/files/_etc_my.cnf.gz
/backup/cpbackup/monthly/files/_root_.my.cnf.gz
/backup/cpbackup/monthly/files/_etc_my.cnf.gz
[root@vps1184 ~]# updatedb && locate my.cnf
/root/.my.cnf
/usr/local/Zend/etc/my.cnf.org
/usr/local/cpanel/whostmgr/my.cnf
/etc/my.cnf
/etc/my.cnf.tunned
/backup/cpbackup/weekly/files/_root_.my.cnf.gz
/backup/cpbackup/weekly/files/_etc_my.cnf.gz
/backup/cpbackup/monthly/files/_root_.my.cnf.gz
/backup/cpbackup/monthly/files/_etc_my.cnf.gz
[root@vps1184 ~]#
/root/.my.cnf
/usr/local/Zend/etc/my.cnf.org
/usr/local/cpanel/whostmgr/my.cnf
/etc/my.cnf
/etc/my.cnf.tunned
/backup/cpbackup/weekly/files/_root_.my.cnf.gz
/backup/cpbackup/weekly/files/_etc_my.cnf.gz
/backup/cpbackup/monthly/files/_root_.my.cnf.gz
/backup/cpbackup/monthly/files/_etc_my.cnf.gz
[root@vps1184 ~]# /root/.my.cnf
-bash: /root/.my.cnf: Permission denied
[root@vps1184 ~]# /usr/local/Zend/etc/my.cnf.org
-bash: /usr/local/Zend/etc/my.cnf.org: Permission denied
[root@vps1184 ~]# /usr/local/cpanel/whostmgr/my.cnf
-bash: /usr/local/cpanel/whostmgr/my.cnf: Permission denied
[root@vps1184 ~]# /etc/my.cnf
-bash: /etc/my.cnf: Permission denied
[root@vps1184 ~]# /etc/my.cnf.tunned
-bash: /etc/my.cnf.tunned: Permission denied
[root@vps1184 ~]# /backup/cpbackup/weekly/files/_root_.my.cnf.gz
-bash: /backup/cpbackup/weekly/files/_root_.my.cnf.gz: Permission denied
[root@vps1184 ~]# /backup/cpbackup/weekly/files/_etc_my.cnf.gz
-bash: /backup/cpbackup/weekly/files/_etc_my.cnf.gz: Permission denied
[root@vps1184 ~]# /backup/cpbackup/monthly/files/_root_.my.cnf.gz
-bash: /backup/cpbackup/monthly/files/_root_.my.cnf.gz: Permission denied
[root@vps1184 ~]# /backup/cpbackup/monthly/files/_etc_my.cnf.gz
-bash: /backup/cpbackup/monthly/files/_etc_my.cnf.gz: Permission denied
[root@vps1184 ~]# [root@vps1184 ~]# updatedb && locate my.cnf
-bash: [root@vps1184: command not found
[root@vps1184 ~]# /root/.my.cnf
-bash: /root/.my.cnf: Permission denied
[root@vps1184 ~]# /usr/local/Zend/etc/my.cnf.org
-bash: /usr/local/Zend/etc/my.cnf.org: Permission denied
[root@vps1184 ~]# /usr/local/cpanel/whostmgr/my.cnf
-bash: /usr/local/cpanel/whostmgr/my.cnf: Permission denied
[root@vps1184 ~]# /etc/my.cnf
-bash: /etc/my.cnf: Permission denied
[root@vps1184 ~]# /etc/my.cnf.tunned
-bash: /etc/my.cnf.tunned: Permission denied
[root@vps1184 ~]# /backup/cpbackup/weekly/files/_root_.my.cnf.gz
-bash: /backup/cpbackup/weekly/files/_root_.my.cnf.gz: Permission denied
[root@vps1184 ~]# /backup/cpbackup/weekly/files/_etc_my.cnf.gz
-bash: /backup/cpbackup/weekly/files/_etc_my.cnf.gz: Permission denied
[root@vps1184 ~]# /backup/cpbackup/monthly/files/_root_.my.cnf.gz
-bash: /backup/cpbackup/monthly/files/_root_.my.cnf.gz: Permission denied
[root@vps1184 ~]# /backup/cpbackup/monthly/files/_etc_my.cnf.gz
-bash: /backup/cpbackup/monthly/files/_etc_my.cnf.gz: Permission denied
[root@vps1184 ~]# [root@vps1184 ~]#
-bash: [root@vps1184: command not found
[root@vps1184 ~]#

Ben_S

That shows it's in /etc, which you previously said was emoty.
Liverpool FC Forum with 14 million+ posts.

metallica48423

you can't just enter the file path and file name to open a file, they aren't executables.

you need to use a text viewer such as nano or vi to view the contents of the file.
Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

QuoteMicrosoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"


Useful Links:
Online Manual!
How to Help us Help you
Search
Settings Repair Tool

lonrot

#14
This is what I have managed to do:

login as: root
[email protected]'s password:
Last login: Tue May 13 14:16:35 2008 from 60.54.14.50
[root@vps1184 ~]# cd /etc/
[root@vps1184 etc]# ls
DIR_COLORS                       named.conf.fixrndc
DIR_COLORS.xterm                 named.conf.prefixrndc
X11                              nameserverips
adjtime                          netplug
aliases                          netplug.d
alternatives                     nscd.conf
antirelayddisable                nsswitch.conf
antivirus.exim                   odbc.ini
apt                              odbcinst.ini
audit.rules                      openldap
auditd.conf                      opt
authlib                          pam.d
backupmxhosts                    passwd
bashrc                           passwd,v
buildapache                      passwd-
chkserv.d                        passwd.OLD
cpanel_exim_system_filter        portsentry
cpanelsync.exclude               ppp
cpbackup.conf                    printcap
cpbackup.public.conf             profile
cpupdate.conf                    profile.d
cron.d                           proftpd
cron.daily                       proftpd.conf
cron.deny                        proftpd.conf,v
cron.hourly                      proftpd.conf.bytes
cron.monthly                     proftpd.conf.tmpeditlib
cron.weekly                      protocols
crontab                          pure-ftpd
csh.cshrc                        pure-ftpd.conf
csh.login                        pure-ftpd.pem
default                          pwdb.conf
demodomains                      quota.conf
demouids                         quota.conf,v
demousers                        quotagrpadmins
dev.d                            quotatab
domain_keys_active               rc
domainips                        rc.d
domainusers                      rc.local
entropychatdisable               rc.sysinit
environment                      rc0.d
exim                             rc1.d
exim.aclspam                     rc2.d
exim.conf                        rc3.d
exim.conf.buildtest              rc4.d
exim.conf.dist                   rc5.d
exim.conf.mailman2.dist          rc6.d
exim.conf.mailman2.exiscan.dist  redhat-release
exim.crt                         relayhosts
exim.key                         relayhostsusers
exim.pl                          remotedomains
exim.pl.local                    remotedomains,v
eximrejects                      resolv.conf
eximrejects.rpmorig              rndc.conf
eximstatsdisable                 rndc.key
exports                          rpc
fdprm                            rpm
filesystems                      samba
fonts                            screenrc
fstab                            scsi_id.config
ftpd-rsa-key.pem                 secondarymx
ftpd-rsa.pem                     secondarymx,v
gpm-root.conf                    secondarymx.rpmnew
group                            securetty
group-                           security
host.conf                        senderverifybypasshosts
hosts                            sensors.conf
hosts.allow                      services
hosts.deny                       setuptool.d
hotplug.d                        sgml
httpd                            shadow
httpd.old                        shadow,v
httpddisable.wascreatedbyea3     shadow-
init.d                           shells
initlog.conf                     skel
inittab                          skipsmtpcheckhosts
inputrc                          snmp
interchangedisable               spamddisable
ipaddrpool                       spamdisable
iproute2                         spammeripblocks
ips                              spammers
ips.dnsmaster                    ssh
issue                            ssl
issue.net                        stunnel
jwhois.conf                      sudoers
krb5.conf                        sysconfig
ld.so.cache                      sysctl.conf
ld.so.conf                       sysctl.conf-pre-kernel
ld.so.conf.d                     syslog.conf
libuser.conf                     termcap
localaliases                     trueuserdomains
localdomains                     trueuserowners
localdomains,v                   trustedmailhosts
localdomains.rpmnew              udev
localtime                        updatedb.conf
login.defs                       userbwlimits
logrotate.conf                   userdomains
logrotate.d                      userplans
lynx-site.cfg                    valiases
lynx.cfg                         vdomainaliases
lynx.cfg.cs                      vfilters
lynx.cfg.ja                      vftp
lynx.cfg.sk                      vimrc
mail                             vmail
mail.rc                          vz
mailcap                          warnquota.conf
makedev.d                        wgetrc
man.config                       wwwacct.conf
melangedisable                   wwwacct.conf.shadow
mime.types                       xinetd.conf
motd                             xinetd.d
mtab                             xml
my.cnf                           yum
my.cnf.tunned                    yum.conf
named.conf                       yum.conf.rpmnew
named.conf,v                     yum.repos.d
[root@vps1184 etc]# my.cnf
-bash: my.cnf: command not found
[root@vps1184 etc]# ./my.cnf
./my.cnf: line 1: [mysqld]: command not found
./my.cnf: line 2: set-variable: command not found
./my.cnf: line 3: safe-show-database: command not found
[root@vps1184 etc]#

Ben_S

You need to edit the file with a text editor such as pico/nano or vi etc. You won't stand a chance with vi so try nano /etc/my.cnf or pico /etc/my.cnf

However you really should buy a book and learn how to use your os or pay someone to manage it for you.
Liverpool FC Forum with 14 million+ posts.

SinnerSaint

It seems that my problem is somewhat similar to lonrot. I am having site slowdowns, mostly during 1am to 2am (GMT +8) and MySQL/CPU usage hits 100%. Although sometimes the slowdown happens in a different time. My host suggested that the problem might have been caused by too many sleeping MySQL processes. Here is their reply:

QuotePlease check the mysql processlist and checking the mysql usage we could find that the database allpi3_allpi3 has been sleeping  many times when we check the server on load. This could be due to an un-optimized usage.

-bash-3.00# mysqladmin processlist
+-------+---------------+-----------+-----------+---------+------+-------+------------------+
| Id    | User          | Host      | db        | Command | Time | State | Info             |
+-------+---------------+-----------+-----------+---------+------+-------+------------------+
| 4352  | eximstats     | localhost | eximstats | Sleep   | 359  |       |                  |
| 25585 | allpi3_allpi3 | localhost |           | Sleep   | 19   |       |                  |
| 25588 | allpi3_allpi3 | localhost |           | Sleep   | 18   |       |                  |
| 25590 | allpi3_allpi3 | localhost |           | Sleep   | 18   |       |                  |
| 25597 | allpi3_allpi3 | localhost |           | Sleep   | 9    |       |                  |
| 25598 | allpi3_allpi3 | localhost |           | Sleep   | 9    |       |                  |
| 25599 | allpi3_allpi3 | localhost |           | Sleep   | 8    |       |                  |
| 25600 | allpi3_allpi3 | localhost |           | Sleep   | 8    |       |                  |
| 25603 | allpi3_allpi3 | localhost |           | Sleep   | 4    |       |                  |
| 25604 | allpi3_allpi3 | localhost |           | Sleep   | 4    |       |                  |
| 25606 | root          | localhost |           | Query   | 0    |       | show processlist |
+-------+---------------+-----------+-----------+---------+------+-------+------------------+

Since I am not yet familiar with MySQL processes, I asked them what "sleeping" means and here is their reply:

QuoteSleeping is a state of the process, simply saying it means that the process has been called upon to be used, but is not used and hence it consumes the resources as if it would be using them if correctly worked. Since the process is not active, it is a loss of resources, as the resource used by it is not freed for other process, hope this is clear. Optimization is the technique if making the processes consume as much less resource as possible and yet work efficiently also.

Is there a way to optimize my databases or other configurations of my VPS? My forum has the following details:

  • Link to my forum: http://www.allpinoystuff.net/forum/index.php
  • status.php: http://www.allpinoystuff.net/status.php
  • phpinfo.php: http://www.allpinoystuff.net/phpinfo.php
  • This is a VPS server running on CENTOS Enterprise 4.6 i686 on virtuozzo - WHM X v3.1.0 and with guaranteed RAM of 384MB
  • Number of posts: 90,435
  • Average users online: 28 users over 15 minutes
  • Mods installed: Users Online Today Mod 1.4.0, nneonneo's AJAX ShoutBox 1.14b, VisualWarning 1.32, Custom Profile Field Mod 3.16, Ad Managment 2.3, Global Headers Footers 1.3, SMF Sitemap 1.2.1, Karma Description Mod 2.3
  • The performance issue is still the same even with the default theme
  • I already have eAccelerator 0.9.5.2 installed
  • I haven't converted my tables to InnoDB, although some of them might be InnoDB already
  • I don't know how to tweak MySQL's settings to optimize memory usage and general efficiency. This seems to be the problem according to my host.
  • I am sure that other users in the same node of my VPS are not eating up resources because we are guaranteed with specific amounts of RAM
  • The last things I have done before these issues surfaced were updating nneonneo's Shoutbox to 1.14b and installing Karma Description Mod but I doubt they are the cause of this because there are no reports of similar problems in the support thread of the above mentioned Mods
SinnerSaint

metallica48423

well... your open vs. open number will definitely cause bottlenecks

Most likely though, the cause of your slowdown is eximstats running updating the stats, judging by the first line in your paste.

do you have access to edit my.cnf and restart MySQL?

Sleep, i believe, can also denote the state of waiting for a query to process and return its result.  eximstats runs on a daily basis depending on its setup, usually at night, and is VERY heavy, in terms of resource usage. 
Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

QuoteMicrosoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"


Useful Links:
Online Manual!
How to Help us Help you
Search
Settings Repair Tool

Ben_S

Sleeping process take up bugger all resources, if you want to get rid of them disable persistant connections, but really, the resources they rake up are nothing.

Any host that thinks it's worth showing a customer sleeping processes should be avoided.
Liverpool FC Forum with 14 million+ posts.

lonrot

It's kind of sad, but the only solution I found to fix this was moving to Invision Power Board, the site is much stable now. And the speed, well is incredible fast. :S

Advertisement: