Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

optimize apache

Posted on 2010-11-16
20
Medium Priority
?
773 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 18

Expert Comment

by:John Gates, CISSP
ID: 34209180
Well...  If you put Apache on a unix server and deploy your application it will run 1000% better.
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
LVL 18

Expert Comment

by:John Gates, CISSP
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 2000 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 2000 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 your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

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

In order to have all security and back ups taken care of, WordPress users can sign up for services with WP Engine.
This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
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…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses
Course of the Month12 days, 14 hours left to enroll

972 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