[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Help



On Thu, Feb 07, 2002 at 03:58:41PM -0600, Elizabeth Barham wrote:
> 
> yufufi <yufufi@yahoo.com> writes:
> > Hi,

Hm. A very short question. And a very long answer...

> Hi Furkan,
> 
> You need to keep in mind that X uses a lot of memory. If you can hear
> your disk writing during these stalls, it may be that your system is
> using the swap partition as extra memory.
> 
> For example, say you're using mozilla for X but then switch to another
> application (that is already open). If you notice a stall, it most
> likely is that Linux is having to put core memory (the physical memory
> chips [RAM]) onto the swap partition, as well as moving memory on the
> swap partition into core.
> 
> A good way to diagnosis this in X is to pull up an xterm and run the
> program 'top'. Top displays the processes currently running on your
> system (atleast the ones that will fit upon the screen). More
> importantly, though, for your scenerio is that it mentions memory
> information at the top of the screen, such as:
> 
> Mem:  110304K av,  90716K used,  19588K free,      0K shrd,  15704K buff
> Swap: 124952K av,  13816K used, 111136K free                 44456K cached
> 
> The first part is the core (RAM) memory and the second is the extended
> memory using a swap partition. From this example, you can see that on
> this particular machine there is about 110M available of core memory
> and about 124M of swap space available, giving me rougly 234M of
> virtual memory.
> 
> What's important to understand is that the memory stored upon the swap
> partition is *much* slower than the core memory. In the above example,
> I've gone 13M into swap space; so, if this snapshot of memory is from
> typical usage of the machine, it lets me know that if I want to
> increase the system's overall speed, I should add about 13M of core
> memory (chips/RAM).

oops. Not necessarily true. Depending on your kernel version, the memory
manager may "prematurely" write pages to the swap area. Thus, if memory
is running tight later, there is memory available to be re-used.
Spreading the writes (in time), is good for performance.

So using swap space is not necessarily a problem. Perhaps a better
indicator is looking at how much is being swapped *in* (i.e. reads from
the swap area). vmstat (in the procps package) can be used for looking
at this. 

-- 
Karl E. Jørgensen
karl@jorgensen.com
www.karl.jorgensen.com
==== Today's fortune:
"355/113 -- Not the famous irrational number PI, but an incredible simulation!"

Attachment: pgpyIHAk4fuOI.pgp
Description: PGP signature


Reply to: