PDA

View Full Version : I want more speed!


LanciaStratos
Wed 3rd Sep '03, 1:10am
I finally got my website moved over to a brand new dedicated server, but it isn't running as fast as I want it to. Is there anything I can do to speed it up? So far I have PHP Accelerator installed, and Leknor is showing the pages to be gzipped (http://leknor.com/code/gziped.php?url=http%3A%2F%2Fwww.gtplanet.net%2Ffor um%2F). Here's what I've got...

System Specs
RackShack.net (http://www.rackshack.net/) Dedicated Server
P4 2.0 Ghz
512 MB of RAM
80 GB IDE Non Raid hard drive
RedHat Linux 7.2/Ensim 3.1

PHP Version: 4.2.2

MySQL Version: 3.23.56 (I do not know how MySQL was compiled - it came on my server preinstalled.)


Top Stats
10:50pm up 5:31, 1 user, load average: 1.02, 0.86, 0.90
178 processes: 177 sleeping, 1 running, 0 zombie, 0 stopped
CPU states: 15.0% user, 7.0% system, 4.7% nice, 73.1% idle
Mem: 506024K av, 497664K used, 8360K free, 0K shrd, 2824K buff
Swap: 2064344K av, 27852K used, 2036492K free 336096K cached

PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND
1310 apache 15 0 12776 10M 8820 S 6.3 2.1 0:55 httpd
20291 mysql 26 10 27568 23M 2028 S N 3.4 4.8 0:00 mysqld
21162 apache 15 0 9932 7808 6320 S 2.9 1.5 0:01 httpd
22203 root 16 0 1136 1136 836 R 2.4 0.2 0:00 top
3774 apache 15 0 12272 9.9M 8644 S 2.2 1.9 0:36 httpd
20284 apache 16 0 11284 9180 7060 S 2.0 1.8 0:02 httpd
1657 mysql 25 10 27568 23M 2028 S N 1.1 4.8 0:41 mysqld
21857 mysql 25 10 27568 23M 2028 S N 0.9 4.8 0:00 mysqld
1113 apache 15 0 13500 11M 8944 S 0.6 2.2 0:41 httpd
3781 mysql 25 10 27568 23M 2028 S N 0.4 4.8 0:20 mysqld
21163 apache 15 0 9600 7476 6036 S 0.4 1.4 0:00 httpd
22158 apache 15 0 9324 7200 5724 S 0.4 1.4 0:00 httpd
3777 apache 15 0 12288 9.9M 8664 S 0.2 2.0 0:45 httpd
3969 apache 15 0 12216 9.8M 8628 S 0.2 1.9 0:39 httpd
20288 apache 15 0 10636 8532 7020 S 0.2 1.6 0:06 httpd
21168 apache 15 0 10376 8272 6904 S 0.2 1.6 0:03 httpd
22088 apache 15 0 9108 6984 5752 S 0.2 1.3 0:00 httpd
22089 apache 15 0 9372 7248 5940 S 0.2 1.4 0:00 httpd
22166 mysql 25 10 27568 23M 2028 S N 0.2 4.8 0:00 mysqld
1 root 15 0 500 456 432 S 0.0 0.0 0:05 init
2 root 15 0 0 0 0 SW 0.0 0.0 0:00 keventd
3 root 15 0 0 0 0 SW 0.0 0.0 0:00 kapmd
4 root 34 19 0 0 0 SWN 0.0 0.0 0:00 ksoftirqd_CPU0
5 root 15 0 0 0 0 SW 0.0 0.0 0:04 kswapd
6 root 25 0 0 0 0 SW 0.0 0.0 0:00 bdflush
7 root 15 0 0 0 0 SW 0.0 0.0 0:00 kupdated
8 root 25 0 0 0 0 SW 0.0 0.0 0:00 mdrecoveryd
12 root 15 0 0 0 0 SW 0.0 0.0 0:03 kjournald
89 root 15 0 0 0 0 SW 0.0 0.0 0:00 khubd
251 root 15 0 0 0 0 SW 0.0 0.0 0:00 kjournald
580 root 15 0 0 0 0 SW 0.0 0.0 0:00 eth0
787 root 15 0 584 532 488 S 0.0 0.1 0:00 syslogd
800 root 15 0 1116 500 500 S 0.0 0.0 0:00 klogd
862 named 15 0 1668 1284 1140 S 0.0 0.2 0:00 named
864 named 15 0 1668 1284 1140 S 0.0 0.2 0:00 named
866 named 15 0 1668 1284 1140 S 0.0 0.2 0:00 named
867 named 15 0 1668 1284 1140 S 0.0 0.2 0:00 named
868 named 15 0 1668 1284 1140 S 0.0 0.2 0:00 named
885 root 15 0 1308 1168 1144 S 0.0 0.2 0:00 sshd
905 root 18 0 1060 836 836 S 0.0 0.1 0:00 sshd
940 root 15 0 916 800 712 S 0.0 0.1 0:00 xinetd
960 root 18 0 1008 832 832 S 0.0 0.1 0:00 safe_mysqld
985 mysql 25 10 27568 23M 2028 S N 0.0 4.8 0:00 mysqld
987 mysql 25 10 27568 23M 2028 S N 0.0 4.8 0:01 mysqld
988 mysql 25 10 27568 23M 2028 S N 0.0 4.8 0:00 mysqld
989 mysql 28 10 27568 23M 2028 S N 0.0 4.8 0:00 mysqld
1025 root 15 0 2008 1520 1396 S 0.0 0.3 0:00 sendmail
1087 root 15 0 7096 4664 4604 S 0.0 0.9 0:08 httpd
1112 root 15 0 396 340 324 S 0.0 0.0 0:00 cronolog
1114 apache 15 0 13672 11M 8972 S 0.0 2.2 0:44 httpd
1115 apache 15 0 12540 10M 8648 S 0.0 2.0 0:49 httpd
1116 apache 15 0 12484 10M 8664 S 0.0 2.0 0:31 httpd
1117 apache 15 0 13192 10M 8680 S 0.0 2.1 0:51 httpd


MySQL Configuration Variables
mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock

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

[safe_mysqld]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid


MySQL Extended Status Script
http://www.gtplanet.net/misc/mysqlinfo.php (http://www.gtplanet.net/misc/mysqlinfo.php)


Scripts Installed on Server
vBulletin 2.3.0
Gallery (http://gallery.menalto.com/)


Concurrent Users
200-500


PHP Info
http://www.gtplanet.net/misc/phpinfo.php


Apache Configuration
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
MinSpareServers 5
MaxSpareServers 10
StartServers 5
MaxClients 150

Erwin
Wed 3rd Sep '03, 1:36am
You ned to optimize your my.cnf a bit more than that. :) George should be able to help you. Check out the other threads in this forum.

From a hardware point of view, go to at least 1 Gb if possible.

eva2000
Wed 3rd Sep '03, 12:18pm
wow 200-500 users.. what vB cookie time out is that on ?

as that's alot of users when approaching 500 on 15min cookie timeout for such server hardware

i can't seem to load your mysqlinfo or phpinfo files

so can't see how your server is doing but try this /etc/my.cnf and restart mysql


[mysqld]
set-variable = max_connections=600
set-variable = key_buffer=16M
set-variable = myisam_sort_buffer_size=64M
set-variable = join_buffer=1M
set-variable = record_buffer=2M
set-variable = sort_buffer=2M
set-variable = table_cache=1024
set-variable = thread_cache_size=64
set-variable = wait_timeout=1800
set-variable = connect_timeout=10
set-variable = max_allowed_packet=16M
set-variable = max_connect_errors=10

[safe_mysqld]
open_files_limit=8192

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

[myisamchk]
set-variable = key_buffer=64M
set-variable = sort_buffer=64M
set-variable = read_buffer=16M
set-variable = write_buffer=16M


and yeah your ram is a little on the lite side

LanciaStratos
Wed 3rd Sep '03, 8:25pm
From a hardware point of view, go to at least 1 Gb if possible. Yeah, I'm looking to upgrade soon. I can't wait!

wow 200-500 users.. what vB cookie time out is that on ?

as that's alot of users when approaching 500 on 15min cookie timeout for such server hardware The timeout is at 30 minutes. What hardware would you recommend to carry such a load?

i can't seem to load your mysqlinfo or phpinfo files I think my server was offline for some still undetermined reason earlier today - it appears to be working fine now. Try accessing the pages again.

so can't see how your server is doing but try this /etc/my.cnf and restart mysql
OK, thanks, I just made those changes. :)

cdembek
Sat 27th Jan '07, 11:39am
you know that I think this is a great post...but have a couple questions..

1. does the time out for the cookie add a load to the server?? I wouldn't think so b/c the cookie is stored locally??

2. The gzip compression appears to help but where will you see the hit/downside appear?

Steve Machol
Sat 27th Jan '07, 1:21pm
1. No.

2. Sorry I don't understand the question. Please expalin.

eva2000
Sat 27th Jan '07, 8:36pm
you know that I think this is a great post...but have a couple questions..

1. does the time out for the cookie add a load to the server?? I wouldn't think so b/c the cookie is stored locally??

2. The gzip compression appears to help but where will you see the hit/downside appear?
vB timeout just changes the accuracy of the reported users online compared with real number of users online. Lower timeout = more accurate disaply, higher timeout = more inflated values for users online.

gzip compression helps with compressing text components on a page = faster page loading times and less bandwidth used but it does consume cpu cycles to do so. Most server cpus of middle to high end nature wouldn't have any troubles with the added cpu cycles.

cdembek
Wed 31st Jan '07, 9:10pm
Well I know that you can view your server load number should be between 1 -3 but for my site it reads 5 - 7 and I notice (so do my members) that the site becomes extremely slow at times. I use godaddy for a host.. any suggestions for what to look at that may cause the pages to load slow?

What test can I do to figure out what is going on.. I can submit a ticket but I think this info would be helpful to others