Solved

ESX 5.1:  Apache is slow after P2V

Posted on 2013-11-08
12
582 Views
Last Modified: 2013-12-30
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
Comment
Question by:detox1978
  • 8
  • 4
12 Comments
 
LVL 118
ID: 39634514
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
 
LVL 2

Author Comment

by:detox1978
ID: 39634523
>> 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
 
LVL 2

Author Comment

by:detox1978
ID: 39681783
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
 
LVL 118
ID: 39681888
what are the overall CPU resources running like?
0
 
LVL 2

Author Comment

by:detox1978
ID: 39682112
It was running at 33% with 4 CPU's so I reduced it to 2 CPU's
0
 
LVL 118
ID: 39682252
Any processes running high?
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 2

Author Comment

by:detox1978
ID: 39682333
CPU load hasnt been too bad

Last 24 Hours
Last 7 days
0
 
LVL 2

Author Comment

by:detox1978
ID: 39682345
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
 
LVL 2

Author Comment

by:detox1978
ID: 39682432
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
 
LVL 2

Author Comment

by:detox1978
ID: 39682650
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
 
LVL 2

Author Comment

by:detox1978
ID: 39682653
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
 
LVL 118

Accepted Solution

by:
Andrew Hancock (VMware vExpert / EE MVE) earned 500 total points
ID: 39682948
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

In this article, I show you step by step with screenshots to assist you - HOW TO: Deploy and Install the VMware vCenter Server Appliance 6.5 (VCSA 6.5), with some helpful tips along the way.
In this article, I will show you HOW TO: Perform a Physical to Virtual (P2V) Conversion the easy way from a computer backup (image).
Teach the user how to use configure the vCenter Server storage filters Open vSphere Web Client:  Navigate to vCenter Server Advanced Settings: Add the four vCenter Server storage filters: Review the advanced settings: Modify the values of the four v…
This Micro Tutorial walks you through using a remote console to access a server and install ESXi 5.1. This example is showing remote access and installation using a Dell server. The hypervisor is the very first component of your virtual infrastructu…

760 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