[CentOS] CentOS 3 vs. CentOS 4 Memory Utilization

Johnny Hughes mailing-lists at hughesjr.com
Fri Feb 9 12:28:20 UTC 2007


On Fri, 2007-02-09 at 06:51 -0500, chrism at imntv.com wrote:
> hkclark at gmail.com wrote:
> > On 2/8/07, Johnny Hughes <mailing-lists at hughesjr.com> wrote:
> >>
> >> It should not be a problem as lots of your memory used is buffers and
> >> cache.
> >>
> >> CentOS-3 is going to be supported for a while yet (EOL is scheduled for
> >> Oct 31, 2010), so if it is working perfectly and doing what they want,
> >> they may want to keep it though.
> >>
> >> If they upgrade or don't, the memory should be OK either way .
> >>
> >
> > Hi Johnny,
> >
> > Good info -- thanks.  They have a small app they want to add that
> > requires a newer version of Perl than 5.8.0 that comes with CentOS 3.
> > Rather than getting into a non-RPM version of Perl, we were thinking
> > going to CentOS 4 would be easier and cleaner.
> >
> > In your experience, would you say that my "quick & dirty" measurement
> > of CentOS 4 needing 10-25 MB more memory than CentOS 3 (again, for a
> > non-X box with a minimal install) is accurate (at least in approximate
> > terms)?  Or is there something I'm not taking into account -- e.g,
> > some of the libraries and/or other "basic server apps" such as apache
> > with PHP or MySQL will make that number much higher?  Although this
> > box is doing OK on memory now, I would hate to kill their possible
> > expansion plans just because we did an upgrade and it sucked up way
> > more memory than we though.
> >
> > Again, thanks for all the great things you and the CentOS team are doing!
> 
> Here is the output of "free" for 2 identical systems that happen to be 
> running CentOS3 and CentOS4.  The only difference is the CentOS4 system 
> has 2GB RAM vs 1GB in the CentOS3 system.
> 
> The CentOS3 system shows:
> 
>              total       used       free     shared    buffers     cached
> Mem:       1024292     660572     363720          0     102612     397072
> -/+ buffers/cache:     160888     863404
> Swap:      2104464          0    2104464
> 
> 
> CentOS4 shows:
> 
>              total       used       free     shared    buffers     cached
> Mem:       2074928    2030412      44516          0     276628    1365792
> -/+ buffers/cache:     387992    1686936
> Swap:      2104464        144    2104320
> 
> As others have noted, a lot of the free RAM is just gobbled up as 
> buffers and cache.  As needed, the system will reallocate that memory so 
> that your fancy perl application can get at it.  :)
> 
> Call me crazy, but I don't understand the agonizing fork in the decision 
> tree here.  RAM is ridiculously cheap.  Why not just upgrade to 1GB 
> while you're doing the 3-->4 upgrade?  I suspect it isn't really needed, 
> but it will add minimal cost to the operation (certainly much less than 
> the cost of your time to accomplish the software update and test the new 
> system).
> 

RAM is indeed very cheep ... and having 1gb should be easy, I agree with
chris.

I also agree that as long as you have 200 mb free (as in your initial
post) that you should not have any problem shifting to CentOS-4.

When you use free ... anything that is in buffers and cache should be
subtracted if you really want to know how much (REAL/HARD) memory is in
use.

This is because the linux kernel fills up to the max all it's memory by
design. If you are not using it, it will cache stuff there.  The theory
is that if you need that cached data again, it will be available in
memory and that you can switch out the buffers / cache cheaply when you
really need the memory.

So, in your initial post you had this:

             total       used       free     shared    buffers     cached
Mem:        511428     497956      13472          0      29868     178280

That means, I would call your hard memory used:

511428 - (29868+178280) = 303280

So ... moving from CentOS-3 to CentOS-4 should not be a major issue on
that machine.

(In your Centos-4 VM, subtract buffers/cache from used and see how that
looks)

Some of our CentOS machines have 512mb (they are donated machines and we
can't MAKE them have more memory).  They work OK and serve between 1600
GB and 3200 GB per month via rsync and httpd, so certainly a web server
(if java is not involved :P) CAN work OK with 512mb RAM.  1 GB would be
MUCH better though.

Thanks,
Johnny Hughes 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.centos.org/pipermail/centos/attachments/20070209/5a7899e3/attachment.sig>


More information about the CentOS mailing list