You are here: Re: Server load too high « PHP Language « IT news, forums, messages
Re: Server load too high

Posted by Colin McKinnon on 01/09/06 00:10

ewunia@earthlink.net wrote:

> 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.
>

Seriously not good. Go read up on performance tuning. An full answer would
take several chapters - not a quick NNTP post.

....but...

1) check the load is due to mysql - what you posted does not support this.

2) disable the unused services. Disable the unused apache modules. disable
the unused PHP extensions.

2) use an accelerator on the machines running PHP

3) add an auto-prepend script which registers a shutdown function which
closes any mysql connections.

4) configure the DBMS to log slow queries, identify them and fix them/the
schema

>
> 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.
>

Wrong MySQL does not work like that. While smaller tables would allow
inserts to be done slightly quicker the increase in resource usage would
offset it the benefit, not to mention the development/maintainence
headaches. By all means change data types / add indexes etc. You do know
how to use the EXPLAIN command?

>
> 2. reinstalling PHP to older version php4.
>

Sounds like a good medium-term idea if its practical. It may not fix the
problem though - but that in itself gives you a lot more information - so
definitely worth trying.

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

Yes. 750 UKP/day plus expenses ;)

You need to experiment, isolate the problem before you can eliminate it.
Which can be tricky on a production machine, but looks like you don't have
a lot of choice.

C.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация