[LON-CAPA-admin] memory and httpd processes

Martin Siegert siegert at sfu.ca
Thu May 5 00:15:26 EDT 2005


On Wed, May 04, 2005 at 10:01:00PM -0600, Todd Ruskell wrote:
> Jim,
> 
> This doesn't surprise me too much.  One thing about top is that the reported 
> amount of memory used includes all kinds of cached data that isn't really 
> "used" in the sense that it contains crucial code for a currently running 
> process.  It is only "used" in the sense that it contains a bunch of data 
> that was accessed recently, and some process decided it might improve 
> response times if this data were kept in memory rather than always going out 
> to disk, for example.  I haven't checked my servers regularly, but on my 
> desktop machines, top nearly always reports I am at full memory use, even 
> though I know the currently loaded programs aren't that big.  My guess is 
> that when you stop httpd, it intelligently tells the kernel to *really* let 
> that memory go.

I must agree with your assessment: The Linux kernel regards "free" memory
as wasted memory, thus it uses memory for all kinds of purposes. In fact,
I would expect that top almost always shows almost all of the memory in use.
This does not mean much.
The one parameter that I found somewhat reliable in top's output is the
amount of swap space used. As long as that remains small everything is
fine. Since that number actually remained the same in the example I
would say that nothing much changed due to the restart.

> As to why this drastically improves performance, I will let those with much 
> more knowledge answer that question more intelligently than I can.

Does it really improve performance or is that more an illusion?

Cheers,
Martin

-- 
Martin Siegert
Head, HPC at SFU
WestGrid Site Manager
Academic Computing Services                        phone: (604) 291-4691
Simon Fraser University                            fax:   (604) 291-4242
Burnaby, British Columbia                          email: siegert at sfu.ca
Canada  V5A 1S6

> On Wednesday 04 May 2005 08:58 pm, Jim Maxka wrote:
> > Hi all -- I just want to run this by people to see how crazy I am.  I
> > have one access server and a library server, each with 2 GB of physical
> > memory.  During high usage times, top shows all of the memory used.  If
> > I run, /etc/init.d/httpd reload I can recover up to 500 MB, sometimes
> > more.  Performance for users seems to improve.  I tested it with users,
> > when they reported lag times when hitting submits and refresh of
> > variables passed to applications -- like the jme editor.
> >
> > Here is an example:
> > #####before reload
> > Mem:   2074928k total,  1990800k used,    84128k free,   351024k buffers
> > Swap:  2337416k total,      224k used,  2337192k free,   960936k cached
> > [root at loncapa jmol]# /etc/init.d/httpd reload
> > Reloading httpd:                                           [  OK  ]
> > ####after reload
> > Mem:   2074928k total,  1598448k used,   476480k free,   343740k buffers
> > Swap:  2337416k total,      224k used,  2337192k free,   797400k cached
> >
> > Right now I do this manually, but I was wondering if it would be worth
> > writing a cron job to do this more often.  Or am I completely making
> > something up here?  thanks -- jim
> > _______________________________________________
> > LON-CAPA-admin mailing list
> > LON-CAPA-admin at mail.lon-capa.org
> > http://mail.lon-capa.org/mailman/listinfo/lon-capa-admin
> _______________________________________________
> LON-CAPA-admin mailing list
> LON-CAPA-admin at mail.lon-capa.org
> http://mail.lon-capa.org/mailman/listinfo/lon-capa-admin



More information about the LON-CAPA-admin mailing list