Memory

Yoram Halberstam yoram.halberstam at gmail.com
Tue Jun 9 21:03:29 UTC 2009


Thanks for that. So:

[yoram at desktop ~]$ free -m
             total       used       free     shared    buffers     cached
Mem:          4050       2271       1778          0        135       1677
-/+ buffers/cache:        458       3591
Swap:         5498          0       5498

This means that I really used 458 MB?

2009/6/9 Phil Meyer <pmeyer at themeyerfarm.com>

> Yoram Halberstam wrote:
>
>> All,
>>
>> I'm new to linux and I've got a FC10 with no server database or other
>> servers (that I can think of) up yet - SAMBA maybe.
>>
>> Anyway, my memory last night was up to 2GB - I expected a basic system to
>> be 500m or less...?!
>>
>> How can I find out the culprit processes and make my system leaner? Any
>> website to tell me what each processes in memory does to check if I need it?
>>
>> Thanks
>>
>> --
>> Yoram Halberstam
>>
>>
> Sometimes, the simple answer is best, but just in case you want more ...
>
> Linux treats all memory as 'virtual'.  Swap space is appended to physical
> RAM to form a virtual memory stack.
>
> It helps me to think of virtual memory as a horizontal bar, with kernel and
> reserved memory to the left, and swap space to the right.
>
> Kernel and reserved memory, once loaded, become fixed in place and will not
> move.  However, the kernel takes care not to load itself in the same order
> each time.  From there, an application space is created, and to the right of
> that are buffers and cache.
>
> As memory is consumed by applications, it pushes the buffers and cache to
> the right, towards the swap area.  However, cache and most buffers will not
> move onto physical swap, they are simply deleted before that.  If
> applications push too far to the right, they can push into physical swap.
>
> If the application space pushes into the physical swap area performance is
> degraded, but the system can survive, and will recover if those applications
> begin to use less memory.  But the consequences can be severe depending upon
> the work load.  It should occur to you that cache space is exhausted if apps
> are in physical swap.
>
> If a system with little to no disk cache space is doing many read writes ,
> the system will grind to a stand still, waiting on i/o from the drives.
>  Disk drives are very slow in comparison to other types of operations.
>
> I have over simplified a bit here to try and illustrate how memory is
> treated.  The bottom line is that since all memory is 'virtual', no swap
> space is needed, but if it is needed and not there, the system may not
> recover.
>
> For instance:  A desktop with 512MB RAM will need swap space.  A desktop
> with 8GB RAM can safely run with no swap.  (for now -- programmers like to
> write to the space available).
>
> Linux, and all modern UNIX systems, will attempt to use all available
> memory to improve performance.  It is expected that even a simple desktop
> will, over time, use all available RAM mostly as cache, just in case the
> apps may need it again sometime.
>
> There is a program, or rather a set of tools, called munin in the Fedora
> repositories.  The memory charts reported by that tool graphically show this
> 'bar', although vertically, over time.  It can be illuminating.
>
> I have a short term sample of a desktop running here:
>
> http://themeyerfarm.com/munin/localhost/localhost-memory.html
>
> Good Luck!
>
>
> --
> fedora-list mailing list
> fedora-list at redhat.com
> To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
> Guidelines:
> http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
>



-- 
Yoram Halberstam
Computer Services Provider
MSN: netfever at hotmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20090609/873dbb8f/attachment-0001.htm>


More information about the fedora-list mailing list