[Tmem-devel] tmem how to get current usage in megabytes?
Dan Magenheimer
dan.magenheimer at oracle.com
Thu Aug 19 07:56:37 PDT 2010
> > Can't look until tomorrow, but I suggest you force
> > a compile error in your patch inside of code that
> > does CONFIG_XEN_SELFBALLOONING, then see if it breaks
> > your build... if the code in CONFIG_XEN_SELFBALLOONING
> > is being compiled, those sys files should be in the
> > same location as target_kb.
>
> Ok. On vanilla 2.6.34 tmem works fine. Can You tell me - how can i
> aggresive balloon up and down the memory?
> What parameters and in which units control speed of memory adding, and
> what parameters contains how much memory (may be in proportional of
> demanded memory) balloon up?
The selfballooning policy tries to size the balloon so
that the memory is sized at "Committed_AS" (see the
output of /proc/meminfo and see also the description at
http://www.redhat.com/advice/tipes/meminfo.html). Three
parameters can also be set to determine how quickly
(and asymptotically) the memory size changes. These
are selfballoon_interval, selfballoon_downhysteresis and
selfballoon_uphysteresis. And as you saw, min_target_kb
can also be set to ensure ballooning doesn't go below
a target minimum.
Note that this is all fairly new. I have not experimented
much with changing these parameters from the default values.
Look at the code (selfballoon_process() function) to see
exactly how it works and if you have better ideas, let
me know.
Also note that if you balloon memory to a very low value
and then launch an application that tries to suddenly use
a lot of memory (for example, mallocs 50GB and then tries
to write to all 50GB), you MUST have a large swap disk or
frontswap cannot handle the sudden load and you will see
the application fail.
More information about the Tmem-devel
mailing list