Hello, I have i386/PAE system (php, apache22, mysql) running on 7-STABLE and I can see strange behavior after upgrade from 7.0: Apache does not free memory, for example: CPU: 31.2% user, 0.0% nice, 12.8% system, 0.7% interrupt, 55.3% idle Mem: 3520M Active, 3705M Inact, 465M Wired, 314M Cache, 112M Buf, 12M Free Swap: 4096M Total, 105M Used, 3991M Free, 2% Inuse then apachectl graceful CPU: 28.3% user, 0.0% nice, 8.6% system, 0.0% interrupt, 63.1% idle Mem: 631M Active, 3126M Inact, 353M Wired, 213M Cache, 112M Buf, 3693M Free Swap: 4096M Total, 1844K Used, 4094M Free Some graph: http://max.af.czu.cz/memoryload.png I know before upgrade was memory using about 2,5GB, now much more, apache sometimes crash. Thanks for some help Tomas Randa
On Wed, 2009-02-04 at 17:08 +0100, Tomas Randa wrote:> Hello, > > I have i386/PAE system (php, apache22, mysql) running on 7-STABLE and I > can see strange behavior after upgrade from 7.0: Apache does not free > memory, for example: > > CPU: 31.2% user, 0.0% nice, 12.8% system, 0.7% interrupt, 55.3% idle > Mem: 3520M Active, 3705M Inact, 465M Wired, 314M Cache, 112M Buf, 12M Free > Swap: 4096M Total, 105M Used, 3991M Free, 2% Inuse > > then apachectl graceful > > CPU: 28.3% user, 0.0% nice, 8.6% system, 0.0% interrupt, 63.1% idle > Mem: 631M Active, 3126M Inact, 353M Wired, 213M Cache, 112M Buf, 3693M Free > Swap: 4096M Total, 1844K Used, 4094M Free > > Some graph: http://max.af.czu.cz/memoryload.png > > I know before upgrade was memory using about 2,5GB, now much more, > apache sometimes crash. > > Thanks for some help > > Tomas RandaWhat is apache doing to use so much memory? This looks more like a memory leak in PHP, which is reclaimed after apache restarts its children. When you upgraded the OS, did you also upgrade ports? Could a new version of PHP be at fault here? Cheers Tom
Yes, I do portupgrade -Rrfia after upgrade of course. I don`t think it is some "new" PHP bug, because my friend have same problem with memory and he do not upgraded ports. But his box do not free memory after apache reload, my yes Any other suggestions ? Thanks TR Tom Evans napsal(a):> On Wed, 2009-02-04 at 17:08 +0100, Tomas Randa wrote: > >> Hello, >> >> I have i386/PAE system (php, apache22, mysql) running on 7-STABLE and I >> can see strange behavior after upgrade from 7.0: Apache does not free >> memory, for example: >> >> CPU: 31.2% user, 0.0% nice, 12.8% system, 0.7% interrupt, 55.3% idle >> Mem: 3520M Active, 3705M Inact, 465M Wired, 314M Cache, 112M Buf, 12M Free >> Swap: 4096M Total, 105M Used, 3991M Free, 2% Inuse >> >> then apachectl graceful >> >> CPU: 28.3% user, 0.0% nice, 8.6% system, 0.0% interrupt, 63.1% idle >> Mem: 631M Active, 3126M Inact, 353M Wired, 213M Cache, 112M Buf, 3693M Free >> Swap: 4096M Total, 1844K Used, 4094M Free >> >> Some graph: http://max.af.czu.cz/memoryload.png >> >> I know before upgrade was memory using about 2,5GB, now much more, >> apache sometimes crash. >> >> Thanks for some help >> >> Tomas Randa >> > > What is apache doing to use so much memory? This looks more like a > memory leak in PHP, which is reclaimed after apache restarts its > children. > > When you upgraded the OS, did you also upgrade ports? Could a new > version of PHP be at fault here? > > Cheers > > Tom > > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" > > >
Tomas Randa wrote:> Hello, > > I have i386/PAE system (php, apache22, mysql) running on 7-STABLE and I > can see strange behavior after upgrade from 7.0: Apache does not free > memory, for example: > > CPU: 31.2% user, 0.0% nice, 12.8% system, 0.7% interrupt, 55.3% idle > Mem: 3520M Active, 3705M Inact, 465M Wired, 314M Cache, 112M Buf, 12M Free > Swap: 4096M Total, 105M Used, 3991M Free, 2% Inuse > > then apachectl graceful > > CPU: 28.3% user, 0.0% nice, 8.6% system, 0.0% interrupt, 63.1% idle > Mem: 631M Active, 3126M Inact, 353M Wired, 213M Cache, 112M Buf, 3693M Free > Swap: 4096M Total, 1844K Used, 4094M Free > > Some graph: http://max.af.czu.cz/memoryload.pngPlease interpret this graph. When did you upgrade FreeBSD? On the 27th? What are the dips on the 30th and 2nd? Apache restarts?> I know before upgrade was memory using about 2,5GB, now much more, > apache sometimes crash.Please post several lines from "top" describing the processes you think are using up memory. For what it's worth, I have a similar situation: i386/PAE, upgraded from 7.0 to 7.1 on a machine with 4 GB RAM (3 GB accessible without PAE). I see no anomalies, *but* I'm using FastCGI with PHP and apache22-worker. I think this is the major change in malloc between 7.0 and 7.1: http://svn.freebsd.org/viewvc/base?view=revision&revision=184602 You can test if it's the cause of your problem by toggling between 'D' and 'M' options to malloc.conf (see malloc(3), don't forget to restart apache). -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 258 bytes Desc: OpenPGP digital signature Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20090204/418cb200/signature.pgp
On Wed, 2009-02-04 at 18:42 +0100, Tomas Randa wrote:> Yes, I do portupgrade -Rrfia after upgrade of course. > I don`t think it is some "new" PHP bug, because my friend have same > problem with memory and he do not upgraded ports. But his box do not > free memory after apache reload, my yes > > Any other suggestions ? > > Thanks TR > > > > Tom Evans napsal(a): > > On Wed, 2009-02-04 at 17:08 +0100, Tomas Randa wrote: > > > >> Hello, > >> > >> I have i386/PAE system (php, apache22, mysql) running on 7-STABLE and I > >> can see strange behavior after upgrade from 7.0: Apache does not free > >> memory, for example: > >> > >> CPU: 31.2% user, 0.0% nice, 12.8% system, 0.7% interrupt, 55.3% idle > >> Mem: 3520M Active, 3705M Inact, 465M Wired, 314M Cache, 112M Buf, 12M Free > >> Swap: 4096M Total, 105M Used, 3991M Free, 2% Inuse > >> > >> then apachectl graceful > >> > >> CPU: 28.3% user, 0.0% nice, 8.6% system, 0.0% interrupt, 63.1% idle > >> Mem: 631M Active, 3126M Inact, 353M Wired, 213M Cache, 112M Buf, 3693M Free > >> Swap: 4096M Total, 1844K Used, 4094M Free > >> > >> Some graph: http://max.af.czu.cz/memoryload.png > >> > >> I know before upgrade was memory using about 2,5GB, now much more, > >> apache sometimes crash. > >> > >> Thanks for some help > >> > >> Tomas Randa > >> > > > > What is apache doing to use so much memory? This looks more like a > > memory leak in PHP, which is reclaimed after apache restarts its > > children. > > > > When you upgraded the OS, did you also upgrade ports? Could a new > > version of PHP be at fault here? > > > > Cheers > > > > Tom > >Well, apache + its regular modules dont tend to leak memory, which is what is happening. Can you run tests, eg by running your application on apache with valgrind, to determine exactly where the leak occurs. Tom