Post Reply  Post Thread 
I need Optimize server High CPU Load
bigboy
Junior Member
**

Posts: 5
Group: Registered
Joined: May 2006
Status: Offline
Reputation: 0
Post: #1
I need Optimize server High CPU Load

Hello

I need Optimize server High CPU Load

Server Optimization Request for share hosting 500 Client

but have a web high request traffic

I have a server

Intel Xeon 2.8GHz HTT
1024MBx2
160x2SATA 1, web 2,backup
FreeBSD 5.4

Apache1.3.36
php4.4.2
mysql4.1.19
APC Cache
DA1.2.7

need httpd.conf,my.cnf



Attached File(s) Thumbnail(s)
   
05-28-2006 01:03 AM
Find all posts by this user Quote this message in a reply
Pacifier
Administrator
*******

Posts: 221
Group: Administrators
Joined: May 2006
Status: Offline
Reputation: 0
Post: #2
RE: I need Optimize server High CPU Load

Hello bigboy,

First of all, Welcome to Spicefuse!

Second, to help us optimize your server better, please post your "top" statistics along with output of the following command:

# iostat 1

Currently from the stats, it looks like you're using all of your CPU, but it can only be judged after checking the output of those two commands. Additionally, also try posting "free -m", "vmstat 1", and "ps aux" ..

Additionally, can you tell us what type of content is mostly served from your server? (PHP Forums, Perl scripts etc..)

Please provide with the data and I'll help you with furthur optimization.

05-28-2006 08:01 AM
Find all posts by this user Quote this message in a reply
bigboy
Junior Member
**

Posts: 5
Group: Registered
Joined: May 2006
Status: Offline
Reputation: 0
Post: #3
RE: I need Optimize server High CPU Load

last pid: 50245; load averages: 4.26, 5.50, 4.62 up 0+06:52:11 15:17:26
550 processes: 1 running, 344 sleeping
CPU states: 3.7% user, 0.0% nice, 4.9% system, 1.4% interrupt, 90.1% idle
Mem: 1558M Active, 124M Inact, 224M Wired, 92M Cache, 112M Buf, 4432K Free
Swap: 4096M Total, 1784K Used, 4094M Free

PID USERNAME PRI NICE SIZE RES STATE C TIME WCPU CPU COMMAND
841 mysql 20 0 102M 46600K kserel 1 27:25 2.78% 2.78% mysqld
43596 apache 4 0 82980K 15560K sbwait 0 0:08 0.15% 0.15% httpd
50147 apache 96 0 75820K 12960K select 0 0:00 0.15% 0.15% httpd
47890 apache 4 0 83800K 16220K kqread 1 0:03 0.05% 0.05% httpd
919 root 96 0 75668K 1044K select 0 0:28 0.00% 0.00% httpd
3292 apache 4 0 82860K 47332K connec 1 0:27 0.00% 0.00% httpd
3293 apache 4 0 83224K 47672K connec 1 0:26 0.00% 0.00% httpd
3198 apache 4 0 84176K 46572K sbwait 0 0:25 0.00% 0.00% httpd
4076 apache 4 0 84152K 43172K sbwait 0 0:24 0.00% 0.00% httpd
3244 apache 96 0 83864K 42016K select 1 0:22 0.00% 0.00% httpd
3191 apache 96 0 84512K 38964K select 0 0:22 0.00% 0.00% httpd
3291 apache 4 0 83380K 42648K sbwait 0 0:21 0.00% 0.00% httpd
23472 apache 96 0 84972K 37664K select 0 0:18 0.00% 0.00% httpd
4779 apache 4 0 87436K 51976K connec 1 0:18 0.00% 0.00% httpd
6064 apache 4 0 84456K 36152K sbwait 0 0:16 0.00% 0.00% httpd
40013 apache 20 0 83660K 16232K lockf 1 0:16 0.00% 0.00% httpd
40061 apache 96 0 83028K 15848K select 0 0:15 0.00% 0.00% httpd
40236 apache 4 0 83796K 16404K sbwait 0 0:15 0.00% 0.00% httpd
40085 apache 4 0 83220K 15752K kqread 0 0:15 0.00% 0.00% httpd
39847 apache 4 0 87652K 26068K sbwait 0 0:14 0.00% 0.00% httpd
40022 apache 4 0 84124K 16508K connec 1 0:14 0.00% 0.00% httpd
40076 apache 4 0 83444K 16060K sbwait 1 0:14 0.00% 0.00% httpd
40409 apache 96 0 84056K 16584K select 1 0:14 0.00% 0.00% httpd
40252 apache 96 0 85268K 17988K select 0 0:14 0.00% 0.00% httpd

05-28-2006 08:26 AM
Find all posts by this user Quote this message in a reply
bigboy
Junior Member
**

Posts: 5
Group: Registered
Joined: May 2006
Status: Offline
Reputation: 0
Post: #4
RE: I need Optimize server High CPU Load

mars# iostat 1
tty ad4 ad6 cpu
tin tout KB/t tps MB/s KB/t tps MB/s us ni sy in id
1 348 43.92 16 0.67 0.52 0 0.00 7 0 5 2 86
0 179 16.50 2 0.03 0.00 0 0.00 3 0 3 2 92
0 59 3.15 10 0.03 0.00 0 0.00 5 0 6 3 86
0 59 16.76 34 0.55 0.00 0 0.00 2 0 4 2 92
0 59 28.37 45 1.23 0.00 0 0.00 3 0 3 2 91
0 59 112.00 8 0.87 0.00 0 0.00 3 0 4 3 90
0 60 115.46 25 2.79 0.00 0 0.00 7 0 6 2 86
0 60 4.88 8 0.04 0.00 0 0.00 3 0 1 1 95
0 59 8.75 2 0.02 0.00 0 0.00 16 0 3 1 79
0 59 100.57 29 2.82 0.00 0 0.00 9 0 6 2 83
0 60 6.62 4 0.03 0.00 0 0.00 2 0 2 3 93
0 59 14.29 7 0.10 0.00 0 0.00 2 0 4 1 92
0 59 18.13 50 0.88 0.00 0 0.00 3 0 3 1 93
0 59 73.12 17 1.20 0.00 0 0.00 5 0 4 3 88
0 59 15.84 91 1.41 0.00 0 0.00 1 0 2 1 95
0 59 19.00 5 0.09 0.00 0 0.00 3 0 5 1 91
0 59 101.09 29 2.83 0.00 0 0.00 10 0 8 2 81
0 60 15.06 8 0.12 0.00 0 0.00 5 0 2 3 90
0 59 4.40 5 0.02 0.00 0 0.00 2 0 2 3 93
0 59 10.40 5 0.05 0.00 0 0.00 2 0 3 2 93

05-28-2006 08:28 AM
Find all posts by this user Quote this message in a reply
Pacifier
Administrator
*******

Posts: 221
Group: Administrators
Joined: May 2006
Status: Offline
Reputation: 0
Post: #5
RE: I need Optimize server High CPU Load

bigboy, the problem seems to be with the disk. You'll have to disable logs for few huge sites or upgrade your disks to SCSI. If you cannot upgrade, move MySQL on a second disk. I can guide you on how to move your MySQL on a second drive once you tell me your drive structure. Try "df -h" command to see your drives and mount points.

1. Move MySQL to a second drive. (I can guide you on this)
2. If the above doesn't helps much, you are out of luck and you'll have to disable logs for few most visited domains/sites (this will break webalizer stats, although you can choose to keep bandwidth logging. Tell the site owners to use a service like google analytics or a similar service since they're causing much load on the server.)

05-28-2006 02:45 PM
Find all posts by this user Quote this message in a reply
bigboy
Junior Member
**

Posts: 5
Group: Registered
Joined: May 2006
Status: Offline
Reputation: 0
Post: #6
RE: I need Optimize server High CPU Load

i need how to reverse proxy config for frssBSD 5.4 and IPFW config for reverse proxy

05-30-2006 06:23 AM
Find all posts by this user Quote this message in a reply
Pacifier
Administrator
*******

Posts: 221
Group: Administrators
Joined: May 2006
Status: Offline
Reputation: 0
Post: #7
RE: I need Optimize server High CPU Load

Sorry about that, I can't help you since I am not sure what you're asking about and also because I am more in linux than FreeBSD.

05-31-2006 12:58 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: