Solved

optimize apache

Posted on 2010-11-16
20
738 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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
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…
The purpose of this video is to demonstrate how to Import and export files in WordPress. 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 : Click on Too…

914 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

14 Experts available now in Live!

Get 1:1 Help Now