Memory clean up

Memory clean up

Post by Mark Guzz » Sun, 31 Dec 1899 09:00:00



Question,

When I run Netscape and StarOffice 5.2 (just using them as an example) I
end up using all of my RAM(128M) and about 64M Swap  out of 256M.
After I close Netscape and StarOffice and even run gtop to make sure all
sure process for the two are closed, the memory is still all used up. Is
there any app that will release the memory like there is for Window$?

Mark Guzzo

 
 
 

Memory clean up

Post by Andreas K?h? » Sun, 31 Dec 1899 09:00:00



>Question,

>When I run Netscape and StarOffice 5.2 (just using them as an example) I
>end up using all of my RAM(128M) and about 64M Swap  out of 256M.

Ok, those applications are notorious memory hogs.

Quote:>After I close Netscape and StarOffice and even run gtop to make sure all
>sure process for the two are closed, the memory is still all used up. Is
>there any app that will release the memory like there is for Window$?

You're not confusing "buffered" and "cached" memory with "used"
memory, are you?  Also, swapped out programs and data won't be
"swapped in" again until they're needed.  That might be why the swap
is still used.

What does the 'free' command say

1. Before staring those applications.
2. Before quitting the applications (using the quit/exit commands in
   their menus, not by killing their windows).
3. After quitting the applications.

It *is* possible there's a memory leak in either SO or NS.

/A

--
Andreas K?h?ri,
Uppsala University, Sweden.
----------------------------------------------------------------
Debian GNU/Linux, the choice of a GNU generation.

 
 
 

Memory clean up

Post by Stuart D. Gathma » Sun, 31 Dec 1899 09:00:00



> Question,

> When I run Netscape and StarOffice 5.2 (just using them as an example) I
> end up using all of my RAM(128M) and about 64M Swap  out of 256M.
> After I close Netscape and StarOffice and even run gtop to make sure all
> sure process for the two are closed, the memory is still all used up. Is
> there any app that will release the memory like there is for Window$?

> Mark Guzzo

The "Free" memory in gtop means "idle" memory.  Linux tries to never
have much idle memory - making the kernel much more efficient than
Windoze.  (The GUI is another story.)  Once you've loaded a few
programs, your idle ("Free") memory should never go above a meg or so.

"Cache" is memory that can be instantly reused when something needs
memory, but why throw away what it currently holds when you might need
it again?  It typically holds recently accessed pages of files and
things.

"Shared" is pages of read-only shared libraries (like DLLs) and
programs.  These can be instantly reused when out of Free and Cache, but
will likely need to be paged in again since they are shared by multiple
processes (which is why Cache memory is reused first).

"User" is pages of read-write memory private to a process.  These are
used as a last resort, because they must be paged out first, and will
likely need to be paged in again.

"Buffer" will have to be explained by someone else.

--

Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 591-6154
"Microsoft is the QWERTY of Operating Systems" - SDG
"Confutatis maledictis, flamis acribus *is" - Mozart background
song
for a Microsoft sponsored "Where do you want to go from here?"
commercial.

 
 
 

Memory clean up

Post by Jean-David Beye » Sun, 31 Dec 1899 09:00:00




> >Question,

> >When I run Netscape and StarOffice 5.2 (just using them as an example) I
> >end up using all of my RAM(128M) and about 64M Swap  out of 256M.

> Ok, those applications are notorious memory hogs.

> >After I close Netscape and StarOffice and even run gtop to make sure all
> >sure process for the two are closed, the memory is still all used up. Is
> >there any app that will release the memory like there is for Window$?

That is normal. Linux uses all the memory available to it. If memory is
needed and some idle process is not using it, the idle process is swapped
out. When memory is freed, the idle processes are not automatically brought
back in (unless they become active again). Linux tends to use all available
memory for IO buffers and cache (which may be IO buffers for executable
program text, or something; I have never gotten a definitive answer to the
question of what it was.).

Quote:> You're not confusing "buffered" and "cached" memory with "used"
> memory, are you?  Also, swapped out programs and data won't be
> "swapped in" again until they're needed.  That might be why the swap
> is still used.

> What does the 'free' command say

> 1. Before staring those applications.
> 2. Before quitting the applications (using the quit/exit commands in
>    their menus, not by killing their windows).
> 3. After quitting the applications.

> It *is* possible there's a memory leak in either SO or NS.

Memory leaks in Unix (unless in the kernel, and I do not notice any of
those) are far less pernicious than in the most popular operating system. In
Unix (and Linux), once the offending process exits, it frees all the leaked
memory, so the system gets it back. I could imagine one exception to this,
and I very much doubt that Netscape has it (and I do not suppose StarOffice
has it, but I do not know about that), and that would be if it ran a bunch
of cooperating sequential processes communicating with shared memory. If
those processes all allocated shared memory, and failed to free it, that
could be considered a leak. But the ipcrm command can be used to free it and
ipcs can be used to detect it. Netscape does not seem to use any shared
memory

--
 .~.   Jean-David Beyer           Registered Linux User 85642.
 /V\                              Registered Machine    73926.
/( )\  Shrewsbury, New Jersey
^^-^^  12:55pm up 13 days, 18:32, 3 users, load average: 2.07, 2.09, 2.08

 
 
 

Memory clean up

Post by Christopher Brow » Wed, 25 Oct 2000 13:24:02


In our last episode (23 Oct 2000 17:38:58 +0100),
the artist formerly known as Andreas K?h?ri said:


>>Question,

>>When I run Netscape and StarOffice 5.2 (just using them as an
>>example) I end up using all of my RAM(128M) and about 64M Swap  out
>>of 256M.

>Ok, those applications are notorious memory hogs.

Indeed.

Quote:>>After I close Netscape and StarOffice and even run gtop to make sure all
>>sure process for the two are closed, the memory is still all used up. Is
>>there any app that will release the memory like there is for Window$?

>You're not confusing "buffered" and "cached" memory with "used"
>memory, are you?  Also, swapped out programs and data won't be
>"swapped in" again until they're needed.  That might be why the swap
>is still used.

>What does the 'free' command say

>1. Before staring those applications.
>2. Before quitting the applications (using the quit/exit commands in
>   their menus, not by killing their windows).
>3. After quitting the applications.

>It *is* possible there's a memory leak in either SO or NS.

... But keep in mind that when SO and/or NS are terminated, the memory
that they used to occupy should be returned to the system.  

If they're dead, and the memory is still in use, then that would
indicate a memory leak in the Linux kernel, which would be a quite
distressing result.

As you observe, memory may indeed get used for other things that a
newcomer might not expect, notably for cacheing of files.

The other thing I'd check for is to see if NS/SO are _really and truly
gone_.  If all the gentle user did was to minimize a window or two, so
some vestiges of NS/SO still remain, then it is quite possible that
they are still sitting there gobbling up memory.  

Closing them cleanly using "quit/exit" menu options _should_ do the
trick; if the gentle user runs "top" and finds that there are still
processes there, that would indicate that there's some anonymous
window or bit of background process kicking around.  At which point
"kill -9" becomes your friend...
--

<http://www.ntlug.org/~cbbrowne/>
"I have seen the future, and it does not work."