Post Reply  Post Thread 
Heavy Traffic, Server optimization help request
c0j0e
Junior Member
**

Posts: 1
Group: Registered
Joined: Oct 2006
Status: Offline
Reputation: 0
Post: #1
Heavy Traffic, Server optimization help request

Hello my name is Joe,

I run a website that over the course of the last couple months has exploded in traffic. To keep up with everything I have upgraded my server several times, but now I am focusing on fully optimizing the servers here are the stats.

Server #1 (mysql server)
Intel dual core 5150woodcrest processors
with 4 x 143 GB 15k SCSI HDs in RAID 10, and 8 GB of DDR2-667 memory

Server #2 (everything else)
Dual Xeon 3.0 GHZ - Dual Cores
2 GB of Memory
2 x 250 GB SATA HDs

For the most part the mysql server runs without a sweat so I am going to include statistics from server #2.


free -m
total used free shared buffers cached
Mem: 3943 3926 17 0 58 906
-/+ buffers/cache: 2960 982
Swap: 2000 700 1299



top - 14:59:40 up 29 days, 1:14, 1 user, load average: 17.38, 9.74, 7.41
Tasks: 390 total, 4 running, 385 sleeping, 1 stopped, 0 zombie
Cpu(s): 2.0% us, 0.7% sy, 1.1% ni, 90.7% id, 5.3% wa, 0.0% hi, 0.1% si
Mem: 4037744k total, 3935072k used, 102672k free, 44656k buffers
Swap: 2048276k total, 717516k used, 1330760k free, 866884k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
18272 nobody 15 0 63672 13m 7012 R 3.8 0.3 0:04.05 httpd
25609 nobody 15 0 62436 12m 6740 S 3.8 0.3 0:00.86 httpd
26188 nobody 15 0 62464 12m 6840 S 3.8 0.3 0:00.14 httpd
26426 root 16 0 6408 1152 680 R 3.8 0.0 0:00.03 top
26427 mailnull 18 0 30384 4400 2824 D 3.8 0.1 0:00.02 exim
17635 nobody 15 0 63048 12m 7052 S 1.9 0.3 0:04.62 httpd
18692 nobody 16 0 63056 12m 6936 S 1.9 0.3 0:04.02 httpd
19038 nobody 15 0 63400 12m 6976 R 1.9 0.3 0:03.66 httpd
19902 nobody 15 0 62352 12m 6908 S 1.9 0.3 0:03.23 httpd
20381 nobody 15 0 64120 13m 6928 S 1.9 0.3 0:03.18 httpd
20913 nobody 15 0 62732 12m 6920 S 1.9 0.3 0:02.75 httpd
23403 nobody 15 0 63464 12m 6988 S 1.9 0.3 0:01.54 httpd
24845 nobody 15 0 62416 12m 6896 S 1.9 0.3 0:00.76 httpd
25109 nobody 15 0 62260 11m 6820 S 1.9 0.3 0:00.64 httpd
26174 nobody 15 0 62316 11m 6732 D 1.9 0.3 0:00.11 httpd
1 root 16 0 4752 108 76 S 0.0 0.0 6:54.41 init
2 root RT 0 0 0 0 S 0.0 0.0 0:03.85 migration/0
3 root 34 19 0 0 0 S 0.0 0.0 1:42.49 ksoftirqd/0
4 root RT 0 0 0 0 S 0.0 0.0 0:02.16 migration/1
5 root 34 19 0 0 0 S 0.0 0.0 0:00.12 ksoftirqd/1
6 root RT 0 0 0 0 S 0.0 0.0 0:00.88 migration/2
7 root 34 19 0 0 0 S 0.0 0.0 0:00.11 ksoftirqd/2
8 root RT 0 0 0 0 S 0.0 0.0 0:00.43 migration/3
9 root 34 19 0 0 0 S 0.0 0.0 0:00.12 ksoftirqd/3
10 root RT 0 0 0 0 S 0.0 0.0 0:00.99 migration/4
11 root 34 19 0 0 0 S 0.0 0.0 0:00.19 ksoftirqd/4
12 root RT 0 0 0 0 S 0.0 0.0 0:00.49 migration/5
13 root 34 19 0 0 0 S 0.0 0.0 0:00.21 ksoftirqd/5
14 root RT 0 0 0 0 S 0.0 0.0 0:00.61 migration/6
15 root 34 19 0 0 0 S 0.0 0.0 0:00.25 ksoftirqd/6
16 root RT 0 0 0 0 S 0.0 0.0 0:00.42 migration/7
17 root 34 19 0 0 0 S 0.0 0.0 0:00.20 ksoftirqd/7
18 root 5 -10 0 0 0 S 0.0 0.0 0:14.06 events/0
19 root 5 -10 0 0 0 S 0.0 0.0 0:00.77 events/1
20 root 5 -10 0 0 0 S 0.0 0.0 0:07.02 events/2
21 root 5 -10 0 0 0 S 0.0 0.0 0:10.98 events/3
22 root 5 -10 0 0 0 S 0.0 0.0 0:06.18 events/4
23 root 5 -10 0 0 0 S 0.0 0.0 0:00.15 events/5
24 root 5 -10 0 0 0 S 0.0 0.0 0:11.53 events/6
25 root 5 -10 0 0 0 S 0.0 0.0 0:00.21 events/7
26 root 5 -10 0 0 0 S 0.0 0.0 0:00.00 khelper
27 root 15 -10 0 0 0 S 0.0 0.0 0:00.00 kacpid



Although the site relys heavy on mysql, the mysql server runs fine with only 1%cpu usage. I will post statistics if you need them aswell. I beleieve the bottleneck may have something to do the I/O. My site hosts hundreds of thousands of dynamic PHP gd library images, that are served on external pages. I have been tweaking stats for awhile but yet to find a conclusion any help would be greatly appreciated.

Thanks! Joe

10-13-2006 10:30 PM
Find all posts by this user Quote this message in a reply
Pacifier
Administrator
*******

Posts: 214
Group: Administrators
Joined: May 2006
Status: Offline
Reputation: 0
Post: #2
RE: Heavy Traffic, Server optimization help request

Have you thought about optimizing your scripts? Well, Try to post your httpd version, key variables such as TimeOut, KeepAlive, StartServers, MaxRequestPerChild etc.

You said your site hosts thousands of dynamically created and server images, but can I know why do you need to do that? (I know it might be a dynamic signature or something but curious, just in case..)

Your I/O usage looks OK from that, but just post the output of uname -a anyways. (censor your domain/hostname)

Post the output of following commands from a peak time: (combined they should be helpful somewhat)

top
free -m
ps wauxf
ps aux | grep -c httpd

10-13-2006 11:33 PM
Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: