Solved

optimize apache

Posted on 2010-11-16
20
754 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
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). #…
The purpose of this video is to demonstrate how to create a Printer Friendly PDF on a WordPress Page. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome Screenshot” Google Chrome Extension, and SmallPDF.com Log…
The purpose of this video is to demonstrate how to integrate Mailchimp with WordPress, by placing a Mailchimp signup form on a WordPress Page or Post. This will be demonstrated using a Windows 8 PC. Mailchimp will be used. Log into your Mailchi…

831 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