LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 06-16-2011, 12:18 AM   #1
JATA01
Member
 
Registered: Nov 2007
Posts: 207

Rep: Reputation: 15
Exclamation Apache server is very slow..


Hi,

I have a development server on rhel5.5 and running apache and database server is mysql(LAMP)with same configuration. When opening the page it's becomes very slow. I found that memory uses was high by httpd with lots of process. I have restarted the httpd and its working. Again after sometime situation becomes same. Also on database side there was no any lock process.
Its a ESX VM, previous memeory was 1024, increased it to 2048, but no luck.

What may be cause for this slowness??

Thanks-
shankar
 
Old 06-16-2011, 02:28 AM   #2
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Q: "Memory use was high". But were you actually paging, or did everything fit in available RAM (either 1024 or 2048)?

Q: Remember, in a VM, there is no such thing as "physical RAM". Furthermore, ESX server has something called "balloon memory". Perhaps ESX itself might be overloaded?

Coming back to your original question -

SUGGESTIONS:
1. Compare retrieval times for a blank page vs. the HTML that's taking a long time.
If the blank HTML is fast, see what's going on with your actual page.
Look at stuff like a) database queries, b) large images and c) large Javascript overhead

2. Look at performance tools like "top", "uptime", "iostat", etc etc to evaluate performance at the system level (independent of Apache) and see what you come up with.

'Hope that helps .. PSM
 
Old 06-16-2011, 02:32 AM   #3
shivendra nath
LQ Newbie
 
Registered: May 2010
Posts: 5

Rep: Reputation: 0
kill the httpd and restart it
 
0 members found this post helpful.
Old 06-17-2011, 12:13 AM   #4
JATA01
Member
 
Registered: Nov 2007
Posts: 207

Original Poster
Rep: Reputation: 15
Yes, using "top" and "ps -ef | grep httpd", we can find that 10-25 httpd process running and each process taking 3 to 4 mb memory. After restarting httpd its running fine for few times. But after sometimes same problem arise.

Thanks-
Shankar
 
Old 06-17-2011, 02:11 AM   #5
JATA01
Member
 
Registered: Nov 2007
Posts: 207

Original Poster
Rep: Reputation: 15
Exclamation

Please find the attached command output and suggest.

Thanks-
Shankar
Attached Thumbnails
Click image for larger version

Name:	top.jpg
Views:	102
Size:	60.9 KB
ID:	7330   Click image for larger version

Name:	ps and vmstat.jpg
Views:	70
Size:	56.0 KB
ID:	7331   Click image for larger version

Name:	sar and iostat.jpg
Views:	41
Size:	51.5 KB
ID:	7332  
 
Old 06-17-2011, 09:02 AM   #6
sang_froid
Member
 
Registered: Oct 2006
Posts: 179

Rep: Reputation: 15
What are the values of following variables in httpd.conf ?

MaxClients
MinSpareThreads
MaxSpareThreads
ThreadsPerChild


Also, did you check your apache error log and try too see if it pops up any warning during restarting apache ?
 
Old 06-20-2011, 01:17 AM   #7
JATA01
Member
 
Registered: Nov 2007
Posts: 207

Original Poster
Rep: Reputation: 15
Hi,

Plz find the below values for httpd.conf

StartServers 2
MaxClients 150
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0

Thanks-
Shankar
 
Old 06-20-2011, 09:01 PM   #8
ComputerErik
Member
 
Registered: Apr 2005
Location: NYC
Distribution: Debian, RHEL
Posts: 269

Rep: Reputation: 54
You also don't mention what the disk structure of the underlying ESX server is. I have found that the most common reason for poor performance on a VM is when the host has a single (or small number drives in RAID) installed locally. Generally speaking with modern hardware it is very easy to over allocate the resources. This is especially true if you are running a number of different isolated database instances across the VMs.
 
Old 06-20-2011, 11:35 PM   #9
JATA01
Member
 
Registered: Nov 2007
Posts: 207

Original Poster
Rep: Reputation: 15
Hi,
In our environment, disk is comming from storage(EMC) and no any raid configuration is there.
We have 4 ESX hosts. I have also moved from one host to another to check the performance but no luck.
Mysql database having only one instance. We have also increase the RAM to 2048 but swap is same(1024) as there is no space available.

Thanks-
Shankar
 
Old 06-26-2011, 01:26 AM   #10
mago
Member
 
Registered: Apr 2004
Location: Costa Rica
Distribution: slack current with 2.6.16.18 (still off the hook)
Posts: 284

Rep: Reputation: 33
Can you post the memory parameters of your PHP.ini?
 
Old 09-06-2011, 04:39 AM   #11
JATA01
Member
 
Registered: Nov 2007
Posts: 207

Original Poster
Rep: Reputation: 15
Hi,

memory_limit = 32M

Rgds,
Shankar
 
Old 09-06-2011, 04:49 AM   #12
JATA01
Member
 
Registered: Nov 2007
Posts: 207

Original Poster
Rep: Reputation: 15
It's drupal5.7
 
Old 09-15-2011, 06:27 AM   #13
JATA01
Member
 
Registered: Nov 2007
Posts: 207

Original Poster
Rep: Reputation: 15
Allowed memory size of 33554432 bytes exhausted (tried to allocate 129 bytes) and is changing (tried to allocate 44 bytes) also.

This is the apache error logs.
 
  


Reply



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
Server Slow : Apache Mysql fine tuning zahirw Linux - Server 2 04-22-2011 01:26 PM
Apache server extreme slow, while samba server is extreme fast! Geert86 Linux - Server 5 01-17-2010 11:07 PM
X server slow response when connected to slow Wifi bluesmanu Linux - Software 0 04-09-2008 06:56 AM
apache server slow with images issue? mutsu Linux - Software 3 08-15-2006 04:36 PM
apache slow, only fast when i check "Use a proxy server.... sabre81 Linux - Networking 1 08-05-2005 07:41 AM

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

All times are GMT -5. The time now is 06:11 PM.

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