You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Leslie <le...@cdcfc.com> on 2003/07/11 05:49:38 UTC
[users@httpd] Hi I meet a Apache performance problem
This is my top show :
last pid: 4078; load averages: 3.89, 1.90, 1.09 21:01:02
82 processes: 79 sleeping, 2 running, 1 on cpu
CPU states: 0.0% idle, 53.4% user, 40.6% kernel, 6.0% iowait, 0.0% swap
Memory: 512M real, 7384K free, 856M swap in use, 549M swap free
PID USERNAME THR PRI NICE SIZE RES STATE TIME CPU COMMAND
10863 mysql 29 35 0 28M 17M run 28:51 64.69% mysqld
2886 nobody 3 58 0 33M 30M sleep 0:03 3.33% httpd
3852 nobody 3 58 0 38M 34M sleep 0:03 3.17% httpd
3853 nobody 3 58 0 32M 29M sleep 0:03 3.14% httpd
2887 nobody 3 48 0 123M 85M sleep 0:11 3.08% httpd
3031 nobody 3 48 0 39M 36M run 0:04 2.66% httpd
2884 nobody 3 58 0 56M 52M sleep 0:05 2.16% httpd
3051 nobody 3 60 0 151M 33M sleep 0:14 1.27% httpd
2883 nobody 3 58 0 151M 25M sleep 0:14 0.63% httpd
3963 nobody 4 54 0 8024K 6128K sleep 0:00 0.44% httpd
3762 nobody 3 38 0 8336K 6296K sleep 0:00 0.42% httpd
3956 nobody 3 58 0 7632K 5752K sleep 0:00 0.23% httpd
4030 root 1 58 0 2584K 1680K cpu 0:00 0.19% top
3968 nobody 3 58 0 8280K 6376K sleep 0:00 0.11% httpd
2882 root 3 59 0 5496K 2992K sleep 0:00 0.08% httpd
I stop one Virtual host in that server ,all the thing is OK ,this Virtual Host contain a VBB forum ,only I am accessing it .and the Mysql database of this site is about 100M.
My envirmente:
Sun U60 512M Memory 450MHz Sun CPU
Sun Solaris 8
apache 1.3.27
mysql 3.2.56(Maybe)
php 4.3.2
Thank you ALl.......
Re: [users@httpd] Hi I meet a Apache performance problem
Posted by Robert Andersson <ro...@profundis.nu>.
Leslie wrote:
> I doubt the problem not because MaxRequstsPerChild
No, the problem is not because of MaxRequestsPerChild. As I said in my
original message, tweaking MaxRequestsPerChild could be a temporary
workaround, which also would hint if the problem was due to a memory _leak_
or just huge memory usage.
> any more thinking??
No, sorry. Try to communicate with other users of that forum software and
google around, or wait around and see if someone here have had similar
issues.
Regards,
Robert Andersson
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Hi I meet a Apache performance problem
Posted by Leslie <le...@cdcfc.com>.
I doubt the problem not because MaxRequstsPerChild
any more thinking??
----- Original Message -----
From: "Robert Andersson" <ro...@profundis.nu>
To: <us...@httpd.apache.org>
Sent: Friday, July 11, 2003 1:30 PM
Subject: Re: [users@httpd] Hi I meet a Apache performance problem
> Leslie wrote:
> > I have tried 1,300,500,1000
>
> Assuming you tried them one at a time, and did a stop/start properly, this
> implies that a single request request is causing the child to grow that
> much. Can you verify that this is really the case? Have you tried setting
> MaxRequestsPerChild 1, stop & start the server, then doing a single request
> to the VBB host, then doing a top. Do you see a huge child there?
>
> > this becomes after I estabilish the vbb forum ,and never happend before..
>
> Which implies that it is some problem with that forum software (is it
> vBulletin?), or that it is triggering a bug somewhere else. Try their
> support forum, and see if someone else has experienced similar issues on
> your platform.
>
> Regards,
> Robert Andersson
>
>
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
Re: [users@httpd] Hi I meet a Apache performance problem
Posted by Robert Andersson <ro...@profundis.nu>.
Leslie wrote:
> I have tried 1,300,500,1000
Assuming you tried them one at a time, and did a stop/start properly, this
implies that a single request request is causing the child to grow that
much. Can you verify that this is really the case? Have you tried setting
MaxRequestsPerChild 1, stop & start the server, then doing a single request
to the VBB host, then doing a top. Do you see a huge child there?
> this becomes after I estabilish the vbb forum ,and never happend before..
Which implies that it is some problem with that forum software (is it
vBulletin?), or that it is triggering a bug somewhere else. Try their
support forum, and see if someone else has experienced similar issues on
your platform.
Regards,
Robert Andersson
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Hi I meet a Apache performance problem
Posted by Leslie <le...@cdcfc.com>.
I have tried 1,300,500,1000
this becomes after I estabilish the vbb forum ,and never happend before..
----- Original Message -----
From: "Robert Andersson" <ro...@profundis.nu>
To: <us...@httpd.apache.org>
Sent: Friday, July 11, 2003 1:16 PM
Subject: Re: [users@httpd] Hi I meet a Apache performance problem
> Leslie wrote:
> > I don't know how to set the MaxRequestPerChild value ,what's the gist???
>
> Umm, didn't you say in your last e-mail that you tried it, but it didn't
> help?
>
> However, as stated by the docs I pointed to, this directive dictates how
> many request a child process will handle before it dies, thus freeing up any
> memory it has consumed. If you set MaxRequestsPerChild to 0, or don't define
> it, the children will never die, and any leak will increase for every
> request. Setting it to 5, will cause the child to be killed and another take
> its place after five requests. The syntax is very simple, just:
>
> MaxRequestsPerChild 5
>
> If your processes grows to 150 MB in 1-5 requests, there's something
> seriously wrong. How long does it usually take before the server starts
> slowing down (ie. swapping) since last restart?
>
> Regards,
> Robert Andersson
>
>
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
Re: [users@httpd] Hi I meet a Apache performance problem
Posted by Robert Andersson <ro...@profundis.nu>.
Leslie wrote:
> I don't know how to set the MaxRequestPerChild value ,what's the gist???
Umm, didn't you say in your last e-mail that you tried it, but it didn't
help?
However, as stated by the docs I pointed to, this directive dictates how
many request a child process will handle before it dies, thus freeing up any
memory it has consumed. If you set MaxRequestsPerChild to 0, or don't define
it, the children will never die, and any leak will increase for every
request. Setting it to 5, will cause the child to be killed and another take
its place after five requests. The syntax is very simple, just:
MaxRequestsPerChild 5
If your processes grows to 150 MB in 1-5 requests, there's something
seriously wrong. How long does it usually take before the server starts
slowing down (ie. swapping) since last restart?
Regards,
Robert Andersson
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Hi I meet a Apache performance problem
Posted by Leslie <le...@cdcfc.com>.
Yes , I have Read the doc about MaxRequstsPerChild value, and I don't think that has solved my problem ,..
55555
----- Original Message -----
From: "Robert Andersson" <ro...@profundis.nu>
To: <us...@httpd.apache.org>
Sent: Friday, July 11, 2003 1:21 PM
Subject: Re: [users@httpd] Hi I meet a Apache performance problem
> Leslie wrote:
> > I don't know how to set the MaxRequestPerChild value ,what's the gist???
>
> Just another note, I originally misspelled the directive; it's
> MaxRequestsPerChild. If this was your problem, take a lesson to always go by
> the docs, not what poor coffee-deprived mailing list users type ;)
>
> Regards,
> Robert Andersson
>
>
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
Re: [users@httpd] Hi I meet a Apache performance problem
Posted by Robert Andersson <ro...@profundis.nu>.
Leslie wrote:
> I don't know how to set the MaxRequestPerChild value ,what's the gist???
Just another note, I originally misspelled the directive; it's
MaxRequestsPerChild. If this was your problem, take a lesson to always go by
the docs, not what poor coffee-deprived mailing list users type ;)
Regards,
Robert Andersson
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Hi I meet a Apache performance problem
Posted by Leslie <le...@cdcfc.com>.
I don't know how to set the MaxRequestPerChild value ,what's the gist???
----- Original Message -----
From: "Robert Andersson" <ro...@profundis.nu>
To: <us...@httpd.apache.org>
Sent: Friday, July 11, 2003 12:42 PM
Subject: Re: [users@httpd] Hi I meet a Apache performance problem
> Aaron Morris wrote:
> > Sounds like you need to do some tuning on your database or there could
> > be some misbehaving database code.
>
> I doubt that mysqld is the problem. I'd worry more about those 100+ MB
> httpd processes.
>
> To the OP:
>
> Your performance problems are clearly because the server starts swapping.
> It's fairly clear that there is a memory leak somewhere; I don't see any
> other reason why a sleeping process would sit on 151 MB. You should try to
> find what is causing this leak. I'd suspect that it may involve PHP, or
> poorly written code.
>
> A temporary work around, would be to set MaxRequestPerChild to a lower
> value, so the memory is recycled. See:
> http://httpd.apache.org/docs/mod/core.html#maxrequestsperchild
>
> Your other processes are quite large as well, and you may consider trying to
> make them a bit smaller by eliminating unnecessary modules etc. There may be
> other ways to reduce memory usage, but I'm not confident enough to give
> advice, so I'll just point you here:
> http://httpd.apache.org/docs/misc/perf-tuning.html
>
>
> Regards,
> Robert Andersson
>
>
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
Re: [users@httpd] Hi I meet a Apache performance problem
Posted by Leslie <le...@cdcfc.com>.
I have tested the MaxRequestPerChild to 1,300,500,1000 .. But did't solve my problem either...
I don't think that's because the poor php code, Because the VBB forum is famous forum code , many sites use it ..
I also think that's because the apache configiure problem...
----- Original Message -----
From: "Robert Andersson" <ro...@profundis.nu>
To: <us...@httpd.apache.org>
Sent: Friday, July 11, 2003 12:42 PM
Subject: Re: [users@httpd] Hi I meet a Apache performance problem
> Aaron Morris wrote:
> > Sounds like you need to do some tuning on your database or there could
> > be some misbehaving database code.
>
> I doubt that mysqld is the problem. I'd worry more about those 100+ MB
> httpd processes.
>
> To the OP:
>
> Your performance problems are clearly because the server starts swapping.
> It's fairly clear that there is a memory leak somewhere; I don't see any
> other reason why a sleeping process would sit on 151 MB. You should try to
> find what is causing this leak. I'd suspect that it may involve PHP, or
> poorly written code.
>
> A temporary work around, would be to set MaxRequestPerChild to a lower
> value, so the memory is recycled. See:
> http://httpd.apache.org/docs/mod/core.html#maxrequestsperchild
>
> Your other processes are quite large as well, and you may consider trying to
> make them a bit smaller by eliminating unnecessary modules etc. There may be
> other ways to reduce memory usage, but I'm not confident enough to give
> advice, so I'll just point you here:
> http://httpd.apache.org/docs/misc/perf-tuning.html
>
>
> Regards,
> Robert Andersson
>
>
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
Re: [users@httpd] Hi I meet a Apache performance problem
Posted by Robert Andersson <ro...@profundis.nu>.
Aaron Morris wrote:
> Sounds like you need to do some tuning on your database or there could
> be some misbehaving database code.
I doubt that mysqld is the problem. I'd worry more about those 100+ MB
httpd processes.
To the OP:
Your performance problems are clearly because the server starts swapping.
It's fairly clear that there is a memory leak somewhere; I don't see any
other reason why a sleeping process would sit on 151 MB. You should try to
find what is causing this leak. I'd suspect that it may involve PHP, or
poorly written code.
A temporary work around, would be to set MaxRequestPerChild to a lower
value, so the memory is recycled. See:
http://httpd.apache.org/docs/mod/core.html#maxrequestsperchild
Your other processes are quite large as well, and you may consider trying to
make them a bit smaller by eliminating unnecessary modules etc. There may be
other ways to reduce memory usage, but I'm not confident enough to give
advice, so I'll just point you here:
http://httpd.apache.org/docs/misc/perf-tuning.html
Regards,
Robert Andersson
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Hi I meet a Apache performance problem
Posted by Aaron Morris <aa...@mindspring.com>.
Sounds like you need to do some tuning on your database or there could
be some misbehaving database code. You should probably also look at
separating your web server and database into 2 different machines or at
least getting some more RAM, but all of this is a little out of scope
for this list.
Leslie wrote:
> This is my top show :
>
> last pid: 4078; load averages: 3.89, 1.90, 1.09 21:01:02
> 82 processes: 79 sleeping, 2 running, 1 on cpu
> CPU states: 0.0% idle, 53.4% user, 40.6% kernel, 6.0% iowait, 0.0% swap
> Memory: 512M real, 7384K free, 856M swap in use, 549M swap free
>
> PID USERNAME THR PRI NICE SIZE RES STATE TIME CPU COMMAND
> 10863 mysql 29 35 0 28M 17M run 28:51 64.69% mysqld
> 2886 nobody 3 58 0 33M 30M sleep 0:03 3.33% httpd
> 3852 nobody 3 58 0 38M 34M sleep 0:03 3.17% httpd
> 3853 nobody 3 58 0 32M 29M sleep 0:03 3.14% httpd
> 2887 nobody 3 48 0 123M 85M sleep 0:11 3.08% httpd
> 3031 nobody 3 48 0 39M 36M run 0:04 2.66% httpd
> 2884 nobody 3 58 0 56M 52M sleep 0:05 2.16% httpd
> 3051 nobody 3 60 0 151M 33M sleep 0:14 1.27% httpd
> 2883 nobody 3 58 0 151M 25M sleep 0:14 0.63% httpd
> 3963 nobody 4 54 0 8024K 6128K sleep 0:00 0.44% httpd
> 3762 nobody 3 38 0 8336K 6296K sleep 0:00 0.42% httpd
> 3956 nobody 3 58 0 7632K 5752K sleep 0:00 0.23% httpd
> 4030 root 1 58 0 2584K 1680K cpu 0:00 0.19% top
> 3968 nobody 3 58 0 8280K 6376K sleep 0:00 0.11% httpd
> 2882 root 3 59 0 5496K 2992K sleep 0:00 0.08% httpd
>
> I stop one Virtual host in that server ,all the thing is OK ,this
> Virtual Host contain a VBB forum ,only I am accessing it .and the Mysql
> database of this site is about 100M.
> My envirmente:
> Sun U60 512M Memory 450MHz Sun CPU
> Sun Solaris 8
> apache 1.3.27
> mysql 3.2.56(Maybe)
> php 4.3.2
>
>
> Thank you ALl.......
--
Aaron W Morris <aa...@mindspring.com> (decep)
PGP Key ID: 259978D1
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Hi I meet a Apache performance problem
Posted by Leslie <le...@cdcfc.com>.
And the memory of Apache use is continuance Increase ,that's terrible
----- Original Message -----
From: Leslie
To: users@httpd.apache.org
Sent: Friday, July 11, 2003 11:49 AM
Subject: [users@httpd] Hi I meet a Apache performance problem
This is my top show :
last pid: 4078; load averages: 3.89, 1.90, 1.09 21:01:02
82 processes: 79 sleeping, 2 running, 1 on cpu
CPU states: 0.0% idle, 53.4% user, 40.6% kernel, 6.0% iowait, 0.0% swap
Memory: 512M real, 7384K free, 856M swap in use, 549M swap free
PID USERNAME THR PRI NICE SIZE RES STATE TIME CPU COMMAND
10863 mysql 29 35 0 28M 17M run 28:51 64.69% mysqld
2886 nobody 3 58 0 33M 30M sleep 0:03 3.33% httpd
3852 nobody 3 58 0 38M 34M sleep 0:03 3.17% httpd
3853 nobody 3 58 0 32M 29M sleep 0:03 3.14% httpd
2887 nobody 3 48 0 123M 85M sleep 0:11 3.08% httpd
3031 nobody 3 48 0 39M 36M run 0:04 2.66% httpd
2884 nobody 3 58 0 56M 52M sleep 0:05 2.16% httpd
3051 nobody 3 60 0 151M 33M sleep 0:14 1.27% httpd
2883 nobody 3 58 0 151M 25M sleep 0:14 0.63% httpd
3963 nobody 4 54 0 8024K 6128K sleep 0:00 0.44% httpd
3762 nobody 3 38 0 8336K 6296K sleep 0:00 0.42% httpd
3956 nobody 3 58 0 7632K 5752K sleep 0:00 0.23% httpd
4030 root 1 58 0 2584K 1680K cpu 0:00 0.19% top
3968 nobody 3 58 0 8280K 6376K sleep 0:00 0.11% httpd
2882 root 3 59 0 5496K 2992K sleep 0:00 0.08% httpd
I stop one Virtual host in that server ,all the thing is OK ,this Virtual Host contain a VBB forum ,only I am accessing it .and the Mysql database of this site is about 100M.
My envirmente:
Sun U60 512M Memory 450MHz Sun CPU
Sun Solaris 8
apache 1.3.27
mysql 3.2.56(Maybe)
php 4.3.2
Thank you ALl.......