This is a discussion on Why OS takes so much memory? within the Linux Operating System forums, part of the Unix Operating Systems category; --> I got a newly built RedHat Linux server box (Enterprise ES release 2.1) with 4G RAM. Checking memory with ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| I got a newly built RedHat Linux server box (Enterprise ES release 2.1) with 4G RAM. Checking memory with free command shows about 2.7G is being used (see the output below): total used free shared buffers cached Mem: 3863200 2757620 1105580 0 532672 2079748 -/+ buffers/cache: 145200 3718000 Swap: 2048276 4888 2043388 I don't understand why that large amount of RAM is consumed without an application running yet. Is it a configuration issue, or OS just needs that much memory? Maybe I misunderstand something, but your clarification is appreicated. Thanks -- Posted via Mailgate.ORG Server - http://www.Mailgate.ORG |
| |||
| On 2004-08-26, John <jchen@gov.mb.ca> wrote: > I don't understand why that large amount of RAM is consumed without an This ain't Windows. memory unused=memory wasted. The system use always all the available memory for caching and buffering, when an application require it, the Os will release the memory and allocate it to the program and get it back when the application is terminated. Davide -- If anything can go wrong, it will. |
| |||
| John wrote: > I got a newly built RedHat Linux server box (Enterprise ES release 2.1) > with 4G RAM. Checking memory with free command shows about 2.7G is being > used (see the output below): > > total used free shared buffers cached > Mem: 3863200 2757620 1105580 0 532672 2079748 > -/+ buffers/cache: 145200 3718000 > Swap: 2048276 4888 2043388 > > I don't understand why that large amount of RAM is consumed without an > application running yet. 1. What services do you have configured? Do you have sendmail, httpd, etc.? These require a lot of memory just in order to idle. 2. The actual, available memory may not be reflected in the output listed. Some memory is available but not reclaimed until it is needed. -- Paul Lutus http://www.arachnoid.com |
| |||
| -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 NotDashEscaped: You need GnuPG to verify this message In comp.os.linux.setup John <jchen@gov.mb.ca> suggested: > I got a newly built RedHat Linux server box (Enterprise ES release 2.1) > with 4G RAM. Checking memory with free command shows about 2.7G is being > used (see the output below): > total used free shared buffers cached > Mem: 3863200 2757620 1105580 0 532672 2079748 > -/+ buffers/cache: 145200 3718000 ^^^^^^^^^^^^^^^^^ > Swap: 2048276 4888 2043388 No it isn't used, only 145 MB are really used, the rest is used as (disk) cache/buffers and will be used for other things as soon as it is needed. [..] -- Michael Heiming (GPG-Key ID: 0xEDD27B94) mail: echo zvpunry@urvzvat.qr | perl -pe 'y/a-z/n-za-m/' -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFBLjjJAkPEju3Se5QRAnCHAJ9Txq1CHvt8OIdaszTOfX OMvj24rQCeLt/b MFMYs4Z3nyPJbtg5n+/k06c= =ja3m -----END PGP SIGNATURE----- |
| |||
| On Thu, 26 Aug 2004 19:23:54 -0000, Michael Heiming wrote: [..] >> total used free shared buffers cached >> Mem: 3863200 2757620 1105580 0 532672 2079748 >> -/+ buffers/cache: 145200 3718000 > ^^^^^^^^^^^^^^^^^ >> Swap: 2048276 4888 2043388 > > No it isn't used, only 145 MB are really used, the rest is used > as (disk) cache/buffers and will be used for other things as soon > as it is needed. Curious. Why would something be swapping? Rinaldi -- Some people in this department wouldn't recognize subtlety if it hit them on the head. |
| |||
| -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 NotDashEscaped: You need GnuPG to verify this message In comp.os.linux.setup Rinaldi J. Montessi <rinaldi@senior.envision> suggested: > On Thu, 26 Aug 2004 19:23:54 -0000, Michael Heiming wrote: > [..] >>> total used free shared buffers cached >>> Mem: 3863200 2757620 1105580 0 532672 2079748 >>> -/+ buffers/cache: 145200 3718000 >> ^^^^^^^^^^^^^^^^^ >>> Swap: 2048276 4888 2043388 >> >> No it isn't used, only 145 MB are really used, the rest is used >> as (disk) cache/buffers and will be used for other things as soon >> as it is needed. > Curious. Why would something be swapping? Something like running updatedb might be the reason or VM just likes to take a small taste of swap for measuring performance or whatever reason, you'll probably find the answer right in the kernel sources. -- Michael Heiming (GPG-Key ID: 0xEDD27B94) mail: echo zvpunry@urvzvat.qr | perl -pe 'y/a-z/n-za-m/' -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFBLkY8AkPEju3Se5QRAjKrAJ4vJ9v+hwC9cXu2vEkpNY yYS4zFwACfXCAo YMAoFT1t+R8a06aCKkzBxlw= =KHcm -----END PGP SIGNATURE----- |
| |||
| Thanks to all for quick response, and particularly to Michael. Your explanation does shed some light on my mind. Do you also know the meaning of used mem, and how it is counted? I really want to find out the relationships among those reported items. I checked man page and other info available to me, but it's still a puzzle to me. Maybe I am a bit greedy. "John" <jchen@gov.mb.ca> wrote in message news:7392ddaead9e8f467a66184e89763358.31434@mygate .mailgate.org > I got a newly built RedHat Linux server box (Enterprise ES release 2.1) > with 4G RAM. Checking memory with free command shows about 2.7G is being > used (see the output below): > > total used free shared buffers cached > Mem: 3863200 2757620 1105580 0 532672 2079748 > -/+ buffers/cache: 145200 3718000 > Swap: 2048276 4888 2043388 > > I don't understand why that large amount of RAM is consumed without an > application running yet. Is it a configuration issue, or OS just needs > that much memory? Maybe I misunderstand something, but your > clarification is appreicated. > > Thanks -- Posted via Mailgate.ORG Server - http://www.Mailgate.ORG |
| |||
| -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 NotDashEscaped: You need GnuPG to verify this message In comp.os.linux.setup John <jchen@gov.mb.ca> suggested: [..] > Do you also know the meaning of used mem, and how it is counted? Used mem is simply including shared, buffers and cached memory. 'free' simply looks in /proc/meminfo, try 'cat /proc/meminfo'. > I really want to find out the relationships among those reported items. > I checked man page and other info available to me, but it's still a > puzzle to me. Maybe I am a bit greedy. There are a bunch of tools available most come with the procps package, 'top' might be interesting and 'man proc' in addition. Good luck -- Michael Heiming (GPG-Key ID: 0xEDD27B94) mail: echo zvpunry@urvzvat.qr | perl -pe 'y/a-z/n-za-m/' -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFBLla0AkPEju3Se5QRAhceAKC/78uG4yRo7aCYHflCNZuNsyTZiwCffPAn 9N5fTSN9i0Ri9iXKWw4d328= =NQy9 -----END PGP SIGNATURE----- |
| |||
| Rinaldi J. Montessi wrote: > On Thu, 26 Aug 2004 19:23:54 -0000, Michael Heiming wrote: > [..] > >>> total used free shared buffers cached >>>Mem: 3863200 2757620 1105580 0 532672 2079748 >>>-/+ buffers/cache: 145200 3718000 >> >> ^^^^^^^^^^^^^^^^^ >> >>>Swap: 2048276 4888 2043388 >> >>No it isn't used, only 145 MB are really used, the rest is used >>as (disk) cache/buffers and will be used for other things as soon >>as it is needed. > > > Curious. Why would something be swapping? > > Rinaldi ¿Why it should be in memory when you don't need it? Linux surely thinks it's better to use the real memory for caching the disk. In the Linux manuals says Linux works better if you have swap memory, even if you have plenty of memory. -- Jose Maria Lopez Hernandez Director Tecnico de bgSEC jkerouac@bgsec.com bgSEC Seguridad y Consultoria de Sistemas Informaticos http://www.bgsec.com ESPAÑA The only people for me are the mad ones -- the ones who are mad to live, mad to talk, mad to be saved, desirous of everything at the same time, the ones who never yawn or say a commonplace thing, but burn, burn, burn like fabulous yellow Roman candles. -- Jack Kerouac, "On the Road" |
| ||||
| "Jose Maria Lopez Hernandez" <jkerouac@bgsec.com> wrote in message news:SktXc.110485$r4.2814278@news-reader.eresmas.com... > Rinaldi J. Montessi wrote: > > On Thu, 26 Aug 2004 19:23:54 -0000, Michael Heiming wrote: > > [..] > > > >>> total used free shared buffers cached > >>>Mem: 3863200 2757620 1105580 0 532672 2079748 > >>>-/+ buffers/cache: 145200 3718000 > >> > >> ^^^^^^^^^^^^^^^^^ > >> > >>>Swap: 2048276 4888 2043388 > >> > >>No it isn't used, only 145 MB are really used, the rest is used > >>as (disk) cache/buffers and will be used for other things as soon > >>as it is needed. > > > > > > Curious. Why would something be swapping? > > > > Rinaldi > > ¿Why it should be in memory when you don't need it? Linux surely > thinks it's better to use the real memory for caching the disk. > In the Linux manuals says Linux works better if you have swap > memory, even if you have plenty of memory. Disk caching. Why not leave the last N megabytes of disk accessed in the cache if you're not otherwise using it, to reduce the latency of disk requests? |