Solved

optimize apache

Posted on 2010-11-16
20
729 Views
Last Modified: 2012-05-10
I have a windows 2003 server with apache 2.2  and we have put our web application ( blog wordpress) ( php and mysql) in production. mysql and apache are in the same server . It is in a intranet.

We have notice that httpd.exe takes 70% of CPU.

Could you suggest me any way to optmize apache ? the website is ok it is not so slow. Some times is slow.
0
Comment
Question by:workflow80
  • 8
  • 6
  • 2
  • +2
20 Comments
 
LVL 5

Expert Comment

by:mooodiecr
ID: 34149485
I was having issues with an apache server server and this is the site that I followed.  After some revamping the site performance was increased, not a ton but I definitely noticed it was more responsive.  Hope this helps

http://articles.sitepoint.com/article/web-site-optimization-steps
0
 

Author Comment

by:workflow80
ID: 34175610
it is a good article, however the web application is wordpress, we didn't programe it. we've just installed it and we create postes. I think it is more apache web server or maybe logs ?
0
 
LVL 17

Expert Comment

by:John Gates
ID: 34209180
Well...  If you put Apache on a unix server and deploy your application it will run 1000% better.
0
 
LVL 17

Expert Comment

by:John Gates
ID: 34209183
I would recommend FreeBSD/NetBSD
0
 
LVL 15

Expert Comment

by:babuno5
ID: 34210683
check out this video from Rasmus

http://vimeo.com/13768954

It has optimizations related to wordpress which will reduce your CPU usage
0
 
LVL 61

Accepted Solution

by:
gheist earned 500 total points
ID: 34211233
70% of CPU is fine....
Look here http://codex.wordpress.org/WordPress_Optimization/Cheat_Sheet
If you have 2003 enterprise you can assign fair pieces of system resources to apache and sql and system services with WSRM.
can you record performance log on "sometimes slow" to find if disk is busy or one process takes too much CPU and makes others suffer or there is a paging activities?
0
 

Author Comment

by:workflow80
ID: 34217804
Hi
@gheist

How can I do :«...can you record performance log on "sometimes slow" to find if disk is busy or one process takes too much CPU and makes others suffer or there is a paging activities? ...»
0
 
LVL 61

Expert Comment

by:gheist
ID: 34217840
Start/Settings/Control Panel/Administrative Tools/Performance
0
 

Author Comment

by:workflow80
ID: 34248697
@gheist
I've been doing what you say, and in the performance monitor, the processor works  a lot.
Yesterday we have had 600 visitors in just 5 minutes and the server was slow! The cpu usage was at 100% .
When I log on today , i have this message( attach file) .


error-apache.jpg
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 61

Assisted Solution

by:gheist
gheist earned 500 total points
ID: 34249371
Apache crashes.
I have seen problems solved with:
1) http://httpd.apache.org/docs/2.0/mod/mpm_winnt.html - the only parameter mentioned can be changed for less performance and better stability
2) IP offload on netcard can be disabled
3) sendfile sometimes does not work with some AVs
Check windows update directly, might be a network driver update is required...
Can you attach debugger like ollydbg as system debugger to see call chain to ntdll.dll before the crash if it ever happens again?
apache includes nice stressing tool called ab.exe
0
 
LVL 61

Expert Comment

by:gheist
ID: 34249382
PS no such problems on Linux
0
 

Author Comment

by:workflow80
ID: 34261728
@gheist ...I'm not an admin and i'm newby in apache. Thanks for your help.

I've put this in my httpd.conf :

MaxRequestsPerChild 100
Win32DisableAcceptEx

Also I've executed ab.exe in command line :
d:\apache\bin>ab -n600 -c10 http://site.com

Here is the results in the image.  I don't understand these results. Thanks.

ab-apache.jpg
0
 
LVL 61

Expert Comment

by:gheist
ID: 34267858
You need to access 2nd page on a site where login is submitted to reach application
Why do you get non-200 responses?
0
 

Author Comment

by:workflow80
ID: 34268174
I've just done it again with a 2nd page.
ab-apache2.jpg
0
 
LVL 61

Expert Comment

by:gheist
ID: 34268231
Is database also slow at the time server is slow?
If yes: optimize database
If no: optimize database connection pool in PHP

Any crashes with debugger so far?
0
 

Author Comment

by:workflow80
ID: 34395107
I'm not allowed to installa a debugger in the server. How can I know if the database is slow ?
0
 
LVL 61

Expert Comment

by:gheist
ID: 34398905
10s response is way too huge
i am sorry, then remove illegal watson debuger included with windows, it is impossible to fix apache crash.

0
 
LVL 61

Expert Comment

by:gheist
ID: 34485377
best you can do is to repeat situation in controlled test system.
apache listener heavily depends on afd.sys tcpip.sys and netcard drivers
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Foreword In the years since this article was written, numerous hacking attacks have targeted password-protected web sites.  The storage of client passwords has become a subject of much discussion, some of it useful and some of it misguided.  Of cou…
Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
The purpose of this video is to demonstrate how to Test the speed of a WordPress Website. Site Speed is an important metric of a site’s health. Slow site speed can result in viewers leaving your site quickly and not seeing your content. This…
The purpose of this video is to demonstrate how to update a WordPress Site’s version. WordPress releases new versions of its software frequently and it is important to update frequently in order to keep your site secure, and to get new WordPress…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now