Slow VPS

Started by _Ziggy_, October 15, 2009, 04:03:55 PM

Previous topic - Next topic

_Ziggy_

I am having problems when the vps server is updating at night. Sometimes the server crashes during updates and I have to do a reboot.

The VPS runs on Centos 5.4 with Interworx 4 controlpanel.

http://www.bluesforum.nl/status.php
Bluesforum.com   2.0                     Bluesforum.nl   2.0
Rockabilly-forum.com   2.0              Bluesharp.nl   2.0
Bungalowpark-forum.nl   2.0        Eee pad forum   2.01
Cristiano Ronaldo   2.02              Lockout Tagout   2.02


Looking to buy existing forums, send pm.

rsw686

You should increase your thread_cache_size in my.cnf as well. I have mine set to 10 on my forum with 800 members. Also it isn't ideal to have the server automatically update. You should do these manually to make sure updates that involve config changes don't cause you problems.
The Reptile File
Everything reptile for anyone reptile friendly

Aquaria Talk
Community for freshwater and saltwater aquariums enthusiasts

_Ziggy_

I have increased the thread_cache_size to 16.
I changed the key buffer size to 67108864 bytes.

After that I have restarted the mysql server.

What would be a reasonable time to wait after the restart and check the results on http://www.bluesforum.nl/status.php ?
Bluesforum.com   2.0                     Bluesforum.nl   2.0
Rockabilly-forum.com   2.0              Bluesharp.nl   2.0
Bungalowpark-forum.nl   2.0        Eee pad forum   2.01
Cristiano Ronaldo   2.02              Lockout Tagout   2.02


Looking to buy existing forums, send pm.

Aleksi "Lex" Kilpinen

At least a day to see where it is going, for some values a week may be even better.
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

_Ziggy_

My table cache is set on 64.
I think it is better to increase it, but I don't know how much?
Bluesforum.com   2.0                     Bluesforum.nl   2.0
Rockabilly-forum.com   2.0              Bluesharp.nl   2.0
Bungalowpark-forum.nl   2.0        Eee pad forum   2.01
Cristiano Ronaldo   2.02              Lockout Tagout   2.02


Looking to buy existing forums, send pm.

Something like that

Quote from: Ziggy on January 07, 2010, 08:27:49 AM
My table cache is set on 64.
I think it is better to increase it, but I don't know how much?

Given that you only have 256M of RAM, I would leave it as it is. Your status shows not a lot of tables opened, so it's not causing any big performance bottleneck in your place. The RAM would be better utilized outside of MySQL for other things.

_Ziggy_

The MySql server is running for 4 days.
I noticed my Swap is about 40%.
http://www.bluesforum.nl/status.php

I have had some problems during server updates and the server crashed.
I think this is caused by MySQL swapping too much.

I am thinking about adding some RAM, but I don't know how much (it is expensive).

I have included some of this weeks graphics.
Bluesforum.com   2.0                     Bluesforum.nl   2.0
Rockabilly-forum.com   2.0              Bluesharp.nl   2.0
Bungalowpark-forum.nl   2.0        Eee pad forum   2.01
Cristiano Ronaldo   2.02              Lockout Tagout   2.02


Looking to buy existing forums, send pm.

Something like that

You could go up to 384.

Here are some changes you could make to my.cnf:
innodb_buffer_pool_size = 1M
key_buffer_size = 48M
skip-bdb                 (add this)

That should free up some RAM.

Swapping will be unavoidable on a 256M machine. Swapping is okay though.

Another thing that can cause issues is a lack of disk space. Clean up things in /tmp, and run su -c 'yum clean packages' to remove cached packages.

_Ziggy_

I did this, but now I am getting this error from php admin:

#2002 - De server reageert niet (or the local MySQL server's socket is not correctly configured)
Bluesforum.com   2.0                     Bluesforum.nl   2.0
Rockabilly-forum.com   2.0              Bluesharp.nl   2.0
Bungalowpark-forum.nl   2.0        Eee pad forum   2.01
Cristiano Ronaldo   2.02              Lockout Tagout   2.02


Looking to buy existing forums, send pm.

Something like that

Try removing the line skip-bdb. Also make sure those other lines aren't duplicated in the [mysqld] section of my.cnf.

_Ziggy_

I put the original my.conf back, but it still doesn't work:


[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
old_passwords=1
max_connections=1000
max_connect_errors=100
connect_timeout=10
wait_timeout=28800
key_buffer_size=67108864
sort_buffer_size=2097144
read_buffer_size=131072
max_allowed_packet=1048576
thread_cache_size=16
table_cache=64
query_cache_limit=1048576
query_cache_size=0

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
Bluesforum.com   2.0                     Bluesforum.nl   2.0
Rockabilly-forum.com   2.0              Bluesharp.nl   2.0
Bungalowpark-forum.nl   2.0        Eee pad forum   2.01
Cristiano Ronaldo   2.02              Lockout Tagout   2.02


Looking to buy existing forums, send pm.

Something like that

Remember it's my.cnf not my.conf.

Is that exactly what you had before? What error does mysql show in the error log when you try to start it?

_Ziggy_

The mysql server settings in the Interworx controlpanel where all gone.
I put them back manually and restarted the vps.
The webserver and mysql server are running now.

Some of the other servers haven't started (yet?).
Pop3, secure pop3, IMAP, , Secure IMAP, SMTP, Outbound mail, Alt. inbound mail and DNS server still have to start.
Bluesforum.com   2.0                     Bluesforum.nl   2.0
Rockabilly-forum.com   2.0              Bluesharp.nl   2.0
Bungalowpark-forum.nl   2.0        Eee pad forum   2.01
Cristiano Ronaldo   2.02              Lockout Tagout   2.02


Looking to buy existing forums, send pm.

Something like that

That's likely related to your incomplete upgrade.

_Ziggy_

Everything is running now. http://www.bluesforum.nl/status.php

I have checked the upgrades everyday for the last couple of days. There where no incomplete upgrades. I have also checked just before I did 'yum clean packages'.

I think it has something to do with editing my.cnf outside of Interworx CP.

I have to go to bed, I have to go to work early tomorrow.   :)

Bluesforum.com   2.0                     Bluesforum.nl   2.0
Rockabilly-forum.com   2.0              Bluesharp.nl   2.0
Bungalowpark-forum.nl   2.0        Eee pad forum   2.01
Cristiano Ronaldo   2.02              Lockout Tagout   2.02


Looking to buy existing forums, send pm.

_Ziggy_

On january 12 I have added 128mb ram to my VPS. Since then I haven't had any problems with updates.
On january 28 I have moved another forum, 1500 members/36000 posts to my VPS and still no problems.

Now I am running 3 forums on the VPS:
1. 1500 members/ 36000 posts
2. 2000 members/ 73000 posts
3. 176 members/ 500 posts


I have checked http://www.bluesforum.nl/status.php often and typical results are:

Table cache usage: most of the time larger than 0.9, sometimes smaller than 0.5. It is not very often between 0.5 and 0.9.

Thread cache usage: Always smaller than 0.7

Query cache miss rate: Always larger than 0.5

Query cache prune rate: Always larger than 0.05

I think everything is running ok at the moment but I would like to know if I can do any adjustments to have all the figures right.

Bluesforum.com   2.0                     Bluesforum.nl   2.0
Rockabilly-forum.com   2.0              Bluesharp.nl   2.0
Bungalowpark-forum.nl   2.0        Eee pad forum   2.01
Cristiano Ronaldo   2.02              Lockout Tagout   2.02


Looking to buy existing forums, send pm.

Something like that

You could increase the size of your query cache (try 16M) and your table cache (try 512).

_Ziggy_

In my status file a process called "init" is very busy.

http://www.bluesforum.nl/status.php

I have no idea what it does?

I have had some problems with the server, I am not sure if this is releated to that.
Bluesforum.com   2.0                     Bluesforum.nl   2.0
Rockabilly-forum.com   2.0              Bluesharp.nl   2.0
Bungalowpark-forum.nl   2.0        Eee pad forum   2.01
Cristiano Ronaldo   2.02              Lockout Tagout   2.02


Looking to buy existing forums, send pm.

青山 素子

init is the root of the application tree. Its PID is 1 for a reason. The init process handles boot and, for System-V compatible systems, runlevel changes.

If init is using a lot of CPU, contact your host as something is likely very wrong.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


_Ziggy_

It uses 13.5% at the moment, is that a lot?

Is this a hardware related problem?
I don't have a service level agreement for the vps so if it is a software problem I have to solve it myself.  :o
Bluesforum.com   2.0                     Bluesforum.nl   2.0
Rockabilly-forum.com   2.0              Bluesharp.nl   2.0
Bungalowpark-forum.nl   2.0        Eee pad forum   2.01
Cristiano Ronaldo   2.02              Lockout Tagout   2.02


Looking to buy existing forums, send pm.

Advertisement: