LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-20-2012, 12:08 PM   #1
drigby
LQ Newbie
 
Registered: Apr 2012
Location: Colorado
Distribution: CentOS
Posts: 11

Rep: Reputation: Disabled
Diagnose a slow Cent0S test server.


I'm running a CentOS 5.8 webserver in VirtualBox on my laptop.

It seems like it's getting slower as time goes on. loading a webpage takes 10-20 seconds.

My first thought was that my dual core laptop is to slow to run the webserver, the client browser, and all my other apps (typically: Windows Live Mail, Aptana, firefox, Virtualbox, Notepad++, Excel) at the same time. However, the apps on the host OS "usually" run fine. It's just the browser response that is slow (and just to the test server, other sites work fine).

I know that there are a lot of variables to juggle here, so I was wondering if someone could give me some advice as to how to diagnose my test server.

Thanks in advance!

P.S. The production server runs fine. I have tried closing everything on the host OS besides firefox and VirtualBox. No speed gained.
 
Old 04-21-2012, 05:20 AM   #2
joker20
Member
 
Registered: Sep 2004
Location: 127.0.0.1
Distribution: Slackware/Ubuntu/CentOS
Posts: 286

Rep: Reputation: 31
DNS issues maybe? do a 'dig' on a host and see what the response time is...
 
Old 04-21-2012, 11:43 AM   #3
drigby
LQ Newbie
 
Registered: Apr 2012
Location: Colorado
Distribution: CentOS
Posts: 11

Original Poster
Rep: Reputation: Disabled
I the test servers ip address in my hosts file. So there shouldn't be DNS requests.
 
Old 04-21-2012, 11:55 AM   #4
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
First steps: check "top" and "free" on the VM to see if something is eating the CPU and memory. You might also try running vmstat and iostat to check if you're swapping or disk thrashing within the VM. If you are, the next step is to track down what's causing it.

Are the pages being loaded simple static HTML?
 
Old 04-23-2012, 08:57 AM   #5
drigby
LQ Newbie
 
Registered: Apr 2012
Location: Colorado
Distribution: CentOS
Posts: 11

Original Poster
Rep: Reputation: Disabled
Quote:
Are the pages being loaded simple static HTML?
No the sites are all on the Drupal CMS.
 
Old 04-23-2012, 09:28 AM   #6
drigby
LQ Newbie
 
Registered: Apr 2012
Location: Colorado
Distribution: CentOS
Posts: 11

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by btmiller View Post
First steps: check "top" and "free" on the VM to see if something is eating the CPU and memory. You might also try running vmstat and iostat to check if you're swapping or disk thrashing within the VM. If you are, the next step is to track down what's causing it.
When I ran top the only things really using memory were the httpd processes. They were usually between 8% and 12% cpu and under 8% memory. but the cpu usage could briefly jump up as hi as 40% for one process. At one point while loading a page, and some ajax at the same time I had two processes running at almost 30% at the same time.

here is the output for "free", while loading a httpd request:
Code:
             total       used       free     shared    buffers     cached
Mem:        514884     508904       5980          0       1936      30656
-/+ buffers/cache:     476312      38572
Swap:      1048568     699928     348640
"vmstat" while serving httpd request:
Code:
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 0  3 720364   5428   1864  27636  509  362   570   381 1037  121  3  7 63 27  0
Does this look like perhaps not enough memory being allocated to the virtual machine?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Converting Windows node cluster to Linux Cent0S 5.5 cluster do I kickstart or image ? cdrolet Linux - Newbie 1 11-18-2011 10:44 AM
Installing continuum over tomcat. How to diagnose Internal server error. emperor_black Linux - Server 1 04-29-2008 02:00 AM
web server hangs - help needed to diagnose BCarey Slackware 3 04-07-2007 10:29 AM
LXer: 9 Tips to diagnose remote GNU/Linux server network connectivity issues LXer Syndicated Linux News 0 02-21-2007 05:46 PM
Using Knoppix to Test, Diagnose & Benchmark kwixson Linux - Newbie 2 01-04-2005 08:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration