Skip to content
This repository has been archived by the owner on May 6, 2020. It is now read-only.

Configuration: Add support for fine grained control of memory management and debug #590

Merged
merged 4 commits into from Sep 20, 2017

Conversation

sameo
Copy link

@sameo sameo commented Sep 20, 2017

Add support for fine grained control of memory management.

```enable_prealloc=true```  Will result in the upfront allocation  and locking down of all VM memory, resulting in lower VM density.

```enable_swap=true```   Will enable swap of VM memory, resulting in higher VM density with potentially higher latency

Enabling the two together results in undefined behavior.

```enable_debug=true```   Will enable hypervisor and container kernel logs

Fixes #568

Optionally enable support for pre-allocation of all of the
memory corresponding to the Clear Containers VM. This is useful
in latency sensitive use cases.

This results in hard allocation of all the RAM requested for
the container/pod.

Fixes #568

Signed-off-by: Manohar Castelino <manohar.r.castelino@intel.com>
Add support for fine grained control of memory management.

enable_prealloc=true will result in the upfront allocation
and locking down of all VM memory, resulting in lower VM density.

enable_swap=true will enable swap of VM memory, resulting
in higher VM density with potentially higher latency

Fixes #568

Signed-off-by: Manohar Castelino <manohar.r.castelino@intel.com>
Enable hypervisor and container kernel logs. Once debug is
enabled these logs can be obtained in the cc-proxy logs or
by stopping the cc-proxy service and running the cc-proxy
explicitly.

/usr/libexec/clear-containers/cc-proxy -log debug

This option is useful to trouble shoot errors in the kernel
or when the agent in the container fails to launch.

Fixes #568
Fixes #568

Signed-off-by: Manohar Castelino <manohar.r.castelino@intel.com>
Fix unit test case failures introduced due to new memory
management options.

Signed-off-by: Manohar Castelino <manohar.r.castelino@intel.com>
@coveralls
Copy link

coveralls commented Sep 20, 2017

Coverage Status

Coverage increased (+0.009%) to 97.208% when pulling 2de68f7 on sameo/topic/mcastelino into 32d2a37 on master.

Copy link
Contributor

@grahamwhaley grahamwhaley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nits.
as per #584 ...
lgtm

#
# Enable swap of vm memory. Default false.
# The behaviour is undefined if mem_prealloc is also set to true
#enable_swap = true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still would have been nice to have a description of what this gains or looses if you enable etc.

@@ -112,6 +112,7 @@ DEFMEMSZ := 2048
DEFDISABLEBLOCK := false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: there is a double 'fixes' in the commit message?

@jodh-intel
Copy link
Contributor

jodh-intel commented Sep 20, 2017

lgtm

Approved with PullApprove Approved with PullApprove

@@ -281,6 +290,9 @@ $(CONFIG): $(CONFIG_IN) $(GENERATED_FILES)
-e "s|@DEFVCPUS@|$(DEFVCPUS)|g" \
-e "s|@DEFMEMSZ@|$(DEFMEMSZ)|g" \
-e "s|@DEFDISABLEBLOCK@|$(DEFDISABLEBLOCK)|g" \
-e "s|@DEFENABLEMEMPREALLOC@|$(DEFENABLEMEMPREALLOC)|g" \
-e "s|@DEFENABLEMSWAP@|$(DEFENABLESWAP)|g" \
-e "s|@DEFENABLEMSWAP@|$(DEFENABLEDEBUG)|g" \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @mcastelino - In passing, I've just spotted the above, which won't work as expected I think.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jodh-intel thanks for catching this. This is a bug. I will send a PR to address this.

mcastelino pushed a commit to mcastelino/runtime that referenced this pull request Dec 6, 2018
…rtVSocks

cli: kata-env: show if vsocks are supported
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants