From: "Gregory Giguashvili" <Gregoryg@ParadigmGeo.com>
To: linux-mm@kvack.org
Subject: Correctly determine free memory amount before swapping
Date: Wed, 8 Dec 2004 16:17:09 +0200 [thread overview]
Message-ID: <06EF4EE36118C94BB3331391E2CDAAD9D49E06@exil1.paradigmgeo.net> (raw)
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>
next reply other threads:[~2004-12-08 14:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-08 14:17 Gregory Giguashvili [this message]
2004-12-13 9:34 ` Robin Holt
2004-12-13 6:32 Gregory Giguashvili
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=06EF4EE36118C94BB3331391E2CDAAD9D49E06@exil1.paradigmgeo.net \
--to=gregoryg@paradigmgeo.com \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox