Re: Q: Interesting memory usage stat's

2000-05-29 Thread Ilya Konstantinov

On Sun, May 28, 2000 at 01:06:10PM +0300, Ira Abramov wrote:
 and I have a slightly related Q... lately I needed to hand in a few Java
 Applets as excercises for school, I sadly turned on Java support in
 Netscape, knowing it will get it stuck (and it does get stuck a lot,
 eating 99% of the CPU, leaking memory and eating the entire swap
 partition, dies only with SIG 9)
 
 the problem is that many times the netscape process leaks over 200Meg of
 swap, but it remains "used" once I kill the process. the RAM is freed,
 but the machine is heavy as hell because it won't free up the swap and
 swap back in all the other apps.

I think it's the kernel's speed consideration to not move stuff around
from disk without need. When those other app's procs wanna run again,
the hardware will need them back in RAM so they'll all slowly return
while the buffer space is given up. No use to force it, if it's done
on demand. Well, atleast in theory :)

Now, how my Linux manages to go into 2MB swap, with 160MB physical RAM,
70MB of them in buffers is still a mystery to me ... yet another
optimization consideration? :)

-- 
Best regards,
Ilya Konstantinov a.k.a Toastie

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]




RE: Q: Interesting memory usage stat's

2000-05-29 Thread Chen Shapira

 Now, how my Linux manages to go into 2MB swap, with 160MB 
 physical RAM,
 70MB of them in buffers is still a mystery to me ... yet another
 optimization consideration? :)

But ofcourse.

Suppose you open an app that is very heavy on memory usage.
Sure enough - almost everything is thrown into the swap - to make space for
Mozilla/JBuilder
Then you close it.
Memory is free again - but the kernel only reads from swap to memory on
need.
So not many pages from swap are called, and the kernel is using the free
space for cache/buffers.


=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]




Re: Q: Interesting memory usage stat's

2000-05-29 Thread Stanislav Malyshev a.k.a Frodo

IK Now, how my Linux manages to go into 2MB swap, with 160MB physical RAM,
IK 70MB of them in buffers is still a mystery to me ... yet another
IK optimization consideration? :)

Very simple. Unused processes are better in swap. Look how many mgetty's
you have? How ofter you use them? What about some gdm leftover from login,
just waiting for your logout next month? And here is lpd for me printing
once a week... All those are perfect candidates for swap hybernation.

-- 
[EMAIL PROTECTED]  \/  There shall be counsels taken
Stanislav Malyshev  /\  Stronger than Morgul-spells
phone +972-3-9316425/\  JRRT LotR.
http://sharat.co.il/frodo/  whois:!SM8333




=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]




Re: Q: Interesting memory usage stat's

2000-05-28 Thread Ira Abramov

On Sun, 28 May 2000, Nathan Fain wrote:

 Just recently I started generating graph's of system resource usage on some
 of my linux machines.On a certain group of machines I noticed a steady
 level of between 90% and 100% memory usage (while at the same time, swap

and I have a slightly related Q... lately I needed to hand in a few Java
Applets as excercises for school, I sadly turned on Java support in
Netscape, knowing it will get it stuck (and it does get stuck a lot,
eating 99% of the CPU, leaking memory and eating the entire swap
partition, dies only with SIG 9)

the problem is that many times the netscape process leaks over 200Meg of
swap, but it remains "used" once I kill the process. the RAM is freed,
but the machine is heavy as hell because it won't free up the swap and
swap back in all the other apps.

any idea how I force the machine to reclaim swap memory from dead
processes?


=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]




Re: Q: Interesting memory usage stat's

2000-05-28 Thread Stanislav Malyshev a.k.a Frodo

NF 1) Why is memory usage so high when it shouldn't be?
NF Note: looking at the process that are running (most httpd), they don't
NF amount to much more that 30mb.

Actually, in ideal case memory usage should be 100%. Why you need memory
that isn't used? If it isn't used by the processes, OS could use it as
cache memory. However, I think it's very tough to make system that will
get close to 100% memory usage, especially in general case. However, if
the process configuration is static (i.e., same long-lived processes run
again and again doing the same stuff), memory usage could be close to it -
that means Linux is doing great job utilizing your memory. You should
start worrying about memory only if swap usage grows and running processes
start getting swapped - it easily leads to catastrophics thrashing and
loads about 20+, basically meaning the system is dead.

NF 2) How can I determine TRUE memory usage?

Well, take "used" number, take out "cached" and "buffers". That should be
close to it.

-- 
[EMAIL PROTECTED]  \/  There shall be counsels taken
Stanislav Malyshev  /\  Stronger than Morgul-spells
phone +972-3-9316425/\  JRRT LotR.
http://sharat.co.il/frodo/  whois:!SM8333







=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]




Re: Q: Interesting memory usage stat's

2000-05-28 Thread Stanislav Malyshev a.k.a Frodo

IA the problem is that many times the netscape process leaks over 200Meg of
IA swap, but it remains "used" once I kill the process. the RAM is freed,
IA but the machine is heavy as hell because it won't free up the swap and
IA swap back in all the other apps.
IA any idea how I force the machine to reclaim swap memory from dead
IA processes?

Are you sure it's indeed what happens? Is that netscape lying in swap, not
other apps? Usually actively running app (99% CPU) is forcing other,
sleeping processes out to swap and takes their memory for it. If they
continue to sleep, they remain in swap - system won't resurrect them back
to real memory unless they'll run. 

-- 
[EMAIL PROTECTED]  \/  There shall be counsels taken
Stanislav Malyshev  /\  Stronger than Morgul-spells
phone +972-3-9316425/\  JRRT LotR.
http://sharat.co.il/frodo/  whois:!SM8333




=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]




Re: Q: Interesting memory usage stat's

2000-05-28 Thread Omer Efraim

Ira Abramov wrote:
 
 the problem is that many times the netscape process leaks over 200Meg of
 swap, but it remains "used" once I kill the process. the RAM is freed,
 but the machine is heavy as hell because it won't free up the swap and
 swap back in all the other apps.
 
 any idea how I force the machine to reclaim swap memory from dead
 processes?

That seems unlikely. Swapped applications cannot run, they have
to be swapped back in for them to run (the appropriate pages
that pagefault, anyhow).

There is no need to _force_ the kernel to reclaim swap space,
as that's kind of meaningless (dead processes, even zombies
already give up their memory, and that obviously includes
swap). There is no actual reason to free up the swap space,
as it's not really getting used right now.

However, it does seem to me that this might go deeper.
Is it just slow, or does it give out any error messages?
Try recompiling the kernel, or anything large enough with
multiple compiler processes (with make -j) and watch the
memory usage and error messages.

The 2.2.x tree (and those before) have a serious memory
handling problem, they don't defragment the memory (or rather,
allocate it in a dumb way - 1 page at a time). Maybe
it's just running out of blocks?

-- 
 /-- Omer Efraim ---\
/--- [EMAIL PROTECTED] (remove spam_me) \
| I can picture in my mind a world without war, a world  |
| without hate. And I can picture us attacking that world,   |
| because they'd never expect it.|
\--  Jack Handey, Deep Thoughts  /

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]