linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* Correctly determine free memory amount before swapping
@ 2004-12-08 14:17 Gregory Giguashvili
  2004-12-13  9:34 ` Robin Holt
  0 siblings, 1 reply; 3+ messages in thread
From: Gregory Giguashvili @ 2004-12-08 14:17 UTC (permalink / raw)
  To: linux-mm

I apologize if this question was already discussed here - Google search
revealed lots of similar topics, but none in this particular aspect.

I need to commit the largest chunk of memory in the quickest way. This
operation may be slowed down by swapping - that's why I don't want to
get there.

Assuming that I define "free memory" as maximum memory that can be
allocated without causing swapping, is there a way I can give a rough
"free memory" amount estimate? I've tried to play with /proc/meminfo
values with some progress, but I'd like to get a qualified answer from
people working with MM.

According to my humble experiments with 2.4 and 2.6 kernels, some cashed
memory reported in /proc/meminfo is reused and some is swapped. The real
problem here is that I not sure what the right way is to "predict" how
much cached memory will be discarded before starting to swap when system
is low on available RAM.

In 2.4 kernels, I was using the following formula (/proc/meminfo names):
free = MemFree + (Inact_dirty > Inact_target ? Inact_dirty -
Inact_target : 0)

In 2.6 kernels, I'm still working on it.

I understand that this is a complicated question, but I'm looking for a
rough simplification of this matter that would work in most of the cases
with little or no swapping.

Any suggestions are greatly appreciated. 

Thanks a lot
Giga
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>

^ permalink raw reply	[flat|nested] 3+ messages in thread
* RE: Correctly determine free memory amount before swapping
@ 2004-12-13  6:32 Gregory Giguashvili
  0 siblings, 0 replies; 3+ messages in thread
From: Gregory Giguashvili @ 2004-12-13  6:32 UTC (permalink / raw)
  To: linux-mm

> I need to commit the largest chunk of memory in the quickest way. This
operation may
> be slowed down by swapping - that's why I don't want to get there.
Could any of MM people throw a short comment on this? If a rough
estimation is impossible to give in Linux, it would be great to know
that.

Thanks in advance,
Giga
P.S. If I'm not asking this question in the right mailing list, please,
let me know.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-12-13  9:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-08 14:17 Correctly determine free memory amount before swapping Gregory Giguashvili
2004-12-13  9:34 ` Robin Holt
2004-12-13  6:32 Gregory Giguashvili

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox