Server load too high



I am running the tagboard service on my server. Few months ago I bought
the new dedicated server with Dual Xeon 3.2 GHz and 2GB Ram.
The board is written in PHP with Mysql. Not long ago I updated the
version PHP to 5. and the problem started.

The load on the server skyrocked between 39-52. And I seriously have no
idea what to do about it.

This is remotedly hosted servise and there are number of connections
from other websites to my own. However I don't have any other working
websites on this server. Each client is connected to the database with
mysql_connect. But I do not know why there is a problem with server
load and why the database takes so much from the server resources?
Below is a sample of the Current CPU usage. As you can see the database
connection takes a lot of resources.

Pid Owner Priority Cpu % Mem % Command
7128 mysql 0 1.3 2.0 /usr/sbin/mysqld
--basedir=/ --datadir=/var/lib/mysql --user=mysql
--pid-file=/var/lib/mysql/host.yobug.com.pid --skip-locking
7112 nobody 0 0.1 0.8
/usr/local/apache/bin/httpd -DSSL

I also checked CPU/Memory/MySQL Usage and last few days I this since I
installed php version 5 the CPU % usage is almost 99-123%! The website
can't work like this.

I thought about couple of solutions but if you can help please write a
constructive response.

1. I was thinking changing the structure of the database. Since all
the posts are in one single table I thought to change it to separate
tables for each customer. Than the process of posting or writing to the
database table would be much faster since the tables would not be
locked for others and the processes don't have to wait.

2. reinstalling PHP to older version php4.

Is there any way that the problem can be solved? if Yes let me know.

.



Relevant Pages

  • Re: Reducing load for LAMP app?
    ... MySQL: as much as possible, he keeps query results in RAM, but ... His hoster says that Apache server is under significant load. ... Using apc is pretty much transparent, but memcached will require modifying your database abstraction layer using the memcached functions. ... With persistent connections, you must have the maximum number of connections *ever* required allocated *all of the time* - even if no one is using your server. ...
    (comp.lang.php)
  • RE: Access denied for user root@localhost (using password: NO)
    ... >> Do you run php database driven apps on the same server as you use to ... are selling/giving/whatever customer access to php on this server, ...
    (freebsd-questions)
  • Re: Multithreading for standalone php
    ... I'm working on a project that will need to connect to 2 different servers and to speed things up (being ssl) I was hoping to be able to do this simultaneously. ... I need my web visitor to hit a button and be able to enter information on another server while at the same time my system is looking up data ... Would this be the sort of thing possible with PHP or would it have to use threads? ... You probably could still spawn a C/C++ program to do the database work, but I'm not sure it's worth the extra effort and complications. ...
    (comp.lang.php)
  • Re: Slow connections & Select database
    ... we are having problems with slow connections on our informix database. ... I've tried both shm connections and tcp connections on the db server, and the shm are a bit slow but tcp are much worse. ... Changing sqlhosts to include an IP address only helps the client end of things find the server's IP address by avoiding a forward DNS look-up. ...
    (comp.databases.informix)
  • Re: Too Many Client tasks
    ... You are either not closing database connections or there are just too many ... concurrent users for MS Access to accomodate. ... > error until I reboot the server. ...
    (microsoft.public.inetserver.asp.db)