Web Hosting Talk







View Full Version : Server getting very slow !


blackmoont
03-26-2004, 12:45 PM
Hi , I have a dual xeon box , after a few month of using , this box getting slower , but i dont know what to do now ? I am planing remove cpanel , updrage apache 1.3.28 to apache 2 . Should i do it ?
Thank you .

Sheps
03-26-2004, 02:01 PM
Well. First off. A copy of ps -aux might help. If you want to attach a copy. Do:

ps -aux > /home/youruserdir/psaux.txt

Attach it, and it will atleast gives us somewhere to do. Also, a copy and paste of your "uptime" would be good.

If nothing looks wrong in there, then the problem might be from the kernel, or somewhere else. Apache or MySQL might not be optimized.

Hard to say really..

blackmoont
03-26-2004, 05:50 PM
Hi , thank you , please read a attch file for mo info .
In this file , thanhno is a user own a big forum , with 143 user onlinein this time .

phpdeveloper
03-26-2004, 06:25 PM
You seem to be running php as cgi not as apache module, this overloads your box. Also, make sure you have optimized mysql and enabled query caching, this will decrease the load considerably. 143 users online is not too many, dual xeon can handle 5 times more than that, just make these changes to the server.

justbenice
03-26-2004, 07:17 PM
Hi, thanks . This is my my.cnf :
[client]
port = 3306

[mysqld]
port = 3306
#socket = /var/tmp/mysql.sock
skip-locking
set-variable = key_buffer=16M
set-variable = max_allowed_packet=1M
set-variable = table_cache=64
set-variable = sort_buffer=512K
set-variable = net_buffer_length=8K
set-variable = myisam_sort_buffer_size=8M
set-variable = max_connections=512


[mysqldump]
quick
set-variable = max_allowed_packet=16M

[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates

[isamchk]
set-variable = key_buffer=20M
set-variable = sort_buffer=20M
set-variable = read_buffer=2M
set-variable = write_buffer=2M

[myisamchk]
set-variable = key_buffer=20M
set-variable = sort_buffer=20M
set-variable = read_buffer=2M
set-variable = write_buffer=2M


It enable query cache already . I'v compile my apache last week with php as a apache module but it doesnt help much :( . I'v do all a strick to speed up my box like mmcache turk but i still slow :D . That why i am thinking of remove cpanel and using apache 2 .

stftk
03-27-2004, 04:57 AM
that my.cnf dosnt have query caching...

Add this in the section [mysqld] -

query_cache_limit=1M
query_cache_size=32M
query_cache_type=1

Here is a copy of the my.cnf I am using, it works well and has query caching, you should try this rather than yours above:

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
skip-locking
skip-innodb
query_cache_limit=1M
query_cache_size=32M
query_cache_type=1
max_connections=500
interactive_timeout=100
wait_timeout=100
connect_timeout=10
thread_cache_size=128
key_buffer=16M
join_buffer=1M
max_allowed_packet=16M
table_cache=1024
record_buffer=1M
sort_buffer_size=2M
read_buffer_size=2M
max_connect_errors=10
thread_concurrency=4
myisam_sort_buffer_size=64M
log-bin
server-id=1

[mysql.server]
user=mysql
basedir=/var/lib

[safe_mysqld]
err-log=/var/log/mysqld.log
pid-file=/var/lib/mysql/mysql.pid <-- Not necessary
open_files_limit=8192

[mysqldump]
quick
max_allowed_packet=16M

[mysql]
no-auto-rehash
#safe-updates

[isamchk]
key_buffer=64M
sort_buffer=64M
read_buffer=16M
write_buffer=16M

[myisamchk]
key_buffer=64M
sort_buffer=64M
read_buffer=16M
write_buffer=16M

[mysqlhotcopy]
interactive-timeout