Solved

optimize apache

Posted on 2010-11-16
20
762 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Get Database Help Now w/ Support & Database Audit

Keeping your database environment tuned, optimized and high-performance is key to achieving business goals. If your database goes down, so does your business. Percona experts have a long history of helping enterprises ensure their databases are running smoothly.

 
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 62

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 62

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
 
LVL 62

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 62

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 62

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 62

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 62

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 62

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

Get Database Help Now w/ Support & Database Audit

Keeping your database environment tuned, optimized and high-performance is key to achieving business goals. If your database goes down, so does your business. Percona experts have a long history of helping enterprises ensure their databases are running smoothly.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
The purpose of this video is to demonstrate how to set up the permalinks on a WordPress Website. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Go t…
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

738 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