Configuration: Add support for fine grained control of memory management and debug #590
Conversation
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>
There was a problem hiding this 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
config/configuration.toml.in
Outdated
# | ||
# Enable swap of vm memory. Default false. | ||
# The behaviour is undefined if mem_prealloc is also set to true | ||
#enable_swap = true |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
@@ -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" \ |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
…rtVSocks cli: kata-env: show if vsocks are supported
Add support for fine grained control of memory management.
Enabling the two together results in undefined behavior.
Fixes #568