Solved

WAMP optimization

Posted on 2014-03-04
15
820 Views
Last Modified: 2014-03-04
My organization recently commissioned a web development firm to redo our website.  We already have a hosting provider in place, but they are adamant about using Windows.  Thus, we're now running a WAMP stack where we used to have IIS and a number of static pages.  I know nothing of Apache, MySQL, PHP, or Drupal but have 20 years experience with Windows servers and desktops.  The new site, currently at dev.stcharleslibrary.org, is hit or miss in terms of responsiveness.  Some pages load quickly for some users in some browsers, but not for others.  There does not seem to be a pattern.

As a Windows admin, here are the things that stand out to me:

httpd service spikes a single core/CPU whenever there's a page request to 100%.  Multiple requests burden the CPU equally.  This is a Nehalem based machine - not brand new, but I suspect easily capable of serving these pages.

System cache is not being used effectively.  Windows always has 1.3GB of free memory - but I can see cached content going up and down as page requests come in.  As if cache is purposely being aged out to make room for new page requests.  As there's about 50 pages on the new site, that basically means nothing stays cached and has to go to disk (if my hypothesis is accurate).

Can you recommend some settings or logs to check?  The dev company is trying to wash their hands of this because they have no experience with Windows, so it's on to me to either shore it up or come out of pocket for a hosted environment.

Thanks!
0
Comment
Question by:sbumpas
  • 7
  • 7
15 Comments
 
LVL 58

Expert Comment

by:Gary
ID: 39904251
Who's adamant on using Windows?
If you are only running php pages it doesn't make sense to use Windows.
WAMP is in no way setup to be run for a public facing server, so I hope you have secured it.

What are you using for caching?
Check your httpd.conf and my.ini files to see where your log files are stored and check them out - may give an indication.
0
 

Author Comment

by:sbumpas
ID: 39904393
Can you recommend some literature on securing WAMP?  the hosting provider we currently use will not allow a linux install.  It's looking more and more like we'd be wise to move to a managed solution.

I have no idea what we're using for caching - how could I check?  I did find the apache log files and there's some pretty interesting stuff in there; this is my favorite:

[Fri Feb 28 22:05:10 2014] [client 124.202.143.250] (20024)The given path is misformatted or contained invalid characters: Cannot map GET /w00tw00t.at.blackhats.romanian.anti-sec:)

Looks like an unsuccessful attack, but i'm not qualified to say for sure.
0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 39904558
If your Windows server is being used for anything else but web site and database, then that is likely to be your problem.  Here's the server recommendations page for Drupal: https://drupal.org/requirements/webserver
0
 

Author Comment

by:sbumpas
ID: 39904562
It is dedicated solely to this WAMP install, no other apps except AV running.
0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 39904583
AV is going to scan every file request and slow things down.  And I don't believe it will protect you from the normal web site break-in attempts like SQL injection.
0
 

Author Comment

by:sbumpas
ID: 39904588
As a test, I did disable it but the site still performed rather poorly.
0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 39904700
When I run a traceroute to stcharleslibrary.org, it shows 17 hops before there is no response.  In contrast, my own site is 9 hops total.  It look like you are at the far end of a long path which doesn't help.

In Firebug, the 'Net' panel shows dev.stcharleslibrary.org loading in 5 to 6 seconds.  The 'Hours' page takes 15 seconds.
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 

Author Comment

by:sbumpas
ID: 39904706
if you run firebug again, do those numbers change?  That's the problem I keep seeing - Hours probably loads fast now, but 'Net' does not.
0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 39904752
The numbers always change some, +/- 20% is not unusual.  Network traffic can cause that.  The 'Hours' page starts slow and then loads a map from Google which contributes to the slowness.
0
 

Author Comment

by:sbumpas
ID: 39904757
Thanks - given that this server is being hammered from the outside (brute force attack on a regular basis plus strange log entries as listed above), do you have any specific recommendations for my situation based on the information I've given?
0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 39904761
On the other hand... if it is a first request for a page, nothing will be in cache and it will take longer.  http://dev.stcharleslibrary.org/articles-databases loads 101 items which is a lot to me.
0
 

Author Comment

by:sbumpas
ID: 39904770
That's my thinking, is that the delay is uncached items.  However, the cache seems to be very small as nothing stays in there for long.  Is there a way to adjust that?
0
 
LVL 82

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 39904781
Virtually all web hosts are being 'attacked' these days.  That's one of the main reasons for using a hosting company, so you have someone to take care of those things.  The other is for high speed and high capacity connections.  Both of my Godaddy sites are 17 hops and almost instantaneous response.

If you had asked me before you started, I would have said to use Linux hosting and Not to use Drupal.  But then, I don't like any of the CMS products that I have seen.  Moving a Drupal site would be a real pain because of it's use of the database.  And you have a pretty large site there.
0
 

Author Comment

by:sbumpas
ID: 39904788
Thanks - this site is not in production yet, so moving it isn't a big deal.  I think we'll go with a managed solution as this site is mission critical and I obviously don't have the necessary skill set to deal with it.
0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 39904873
That's probably a good decision.  Thanks for the points.
0

Featured Post

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

Join & Write a Comment

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
This article discusses how to create an extensible mechanism for linked drop downs.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to count occurrences of each item in an array.

708 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

17 Experts available now in Live!

Get 1:1 Help Now