[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 623
  • Last Modified:

ESX 5.1: Apache is slow after P2V

Hi All,

I virtualised one of our Windows 2003 server last week and the OS and applications are really sluggish. e.g the start button isnt instant, there a fraction of a second delay.

This would normally be ok, however it's running Apache Tomcat.  The first apache.exe respons really quickly, but the second is really slow (2 seconds) at least double if not tripple it was before the P2V

Any suggestions on what I can check?
0
detox1978
Asked:
detox1978
  • 8
  • 4
1 Solution
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
Have you completed ALL post P2V checks, e.g. remove physical server software, removed all device drivers and software which is hidden?

how many vCPUs are now assigned to this VM, 2 or 4?

What is the memory?

see my EE Article

HOW TO:  P2V, V2V for FREE - VMware vCenter Converter Standalone 5.5

Check Task Manager, is CPU at 100%, any rouge processes e.g. WMI?
0
 
detox1978Author Commented:
>> Have you completed ALL post P2V checks, e.g. remove physical server software, removed all device drivers and software which is hidden?

I think so, but will double check

>> how many vCPUs are now assigned to this VM, 2 or 4?
4

>>What is the memory?
4GB, with the PAE boot.ini switch
0
 
detox1978Author Commented:
I reduced the CPU count to 2, but that's not helped.

It looks like parent Apache.exe is running ok, but the sub apatch.exe is really slow (3 seconds), once it responds the page loads really fast.


Any ideas?
0
2017 Webroot Threat Report

MSPs: Get the facts you need to protect your clients.
The 2017 Webroot Threat Report provides a uniquely insightful global view into the analysis and discoveries made by the Webroot® Threat Intelligence Platform to provide insights on key trends and risks as seen by our users.

 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
what are the overall CPU resources running like?
0
 
detox1978Author Commented:
It was running at 33% with 4 CPU's so I reduced it to 2 CPU's
0
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
Any processes running high?
0
 
detox1978Author Commented:
CPU load hasnt been too bad

Last 24 Hours
Last 7 days
0
 
detox1978Author Commented:
I dont know too much about Apache.exe, but there's two of them.  It looks like the first redirects to the second.  Thge first loads instantly, however the second seem to hang for 3 seconds, then loads instantly.

The website that's running on Apache connects to MySQL (also on the same VM.


The VM is running on local disk and read/write speeds seem ok.
0
 
detox1978Author Commented:
I found this post on another forum

After much research, I may have found the solution. If I'm correct, it was an apache config problem. Specifically, the "ThreadsPerChild" directive. See... http://httpd.apache.org/docs/2.2/platform/windows.html

Because Apache for Windows is multithreaded, it does not use a separate process for each request, as Apache can on Unix. Instead there are usually only two Apache processes running: a parent process, and a child which handles the requests. Within the child process each request is handled by a separate thread.

ThreadsPerChild: This directive is new. It tells the server how many threads it should use. This is the maximum number of connections the server can handle at once, so be sure to set this number high enough for your site if you get a lot of hits. The recommended default is ThreadsPerChild 150, but this must be adjusted to reflect the greatest anticipated number of simultaneous connections to accept.

Turns out, this directive was not set at all in my config and thus defaulted to 64. I confirmed this by viewing the number of threads for the second httpd.exe process in task manager. When the server was hitting more than 64 connections, the excess requests were simply having to wait for a thread to open up. I added ThreadsPerChild 150 in my httpd.conf.

Additionally, I enabled the apache status module http://httpd.apache.org/docs/2.2/mod/mod_status.html

...which, among other things, allows one[b] to see the total number of active request[/b] on the server at any given moment. Right away, I could see spikes of up to 80 active request. Time will tell, but I'm confident that this will resolve my issue. So far, 30 hours without a hiccup.

Open in new window


The ThreadsPerChild was set to 250, so i've reduced it to 150.

I dont know how to  see the total number of active request.  I uncommented the status module and restarted the server.

Any ideas?
0
 
detox1978Author Commented:
I've managed to get the server status page working.

I might be reading this wrong, but the status page suggests the web server is responding in half a second.

Current Time: Thursday, 28-Nov-2013 03:18:13 GMT Standard Time
Restart Time: Thursday, 28-Nov-2013 03:15:36 GMT Standard Time
Parent Server Generation: 0
Server uptime: 2 minutes 37 seconds
Total accesses: 70 - Total Traffic: 76 kB
.446 requests/sec - 495 B/second - 1111 B/request
4 requests currently being processed, 146 idle workers

Open in new window


Have I read this correct?


If so, what could be causing the delay?
0
 
detox1978Author Commented:
Is there a list of all the post P2V tasks I need to complete?

This server is around 7 years old, so there's a good chance it's good chance it's full of legacy drivers etc...
0
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
if you follow my EE Article, and look at the Articles Linked...

but roughly this...

1. installing VMware Tools (reboot).
2. adding VMXNET3 interface
3. remove E1000 interface.
4. Adding IP Information, DNS, WINs, etc
5. Remove all Hidden Drivers and Devices - Device Management
6. Remove all physical related software if not already done
7. Reboot
8. Set Services to Automatic....final checks before go live...and reboot VM
9. Finally your Done.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 8
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now