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

Conversation

@chavafg
Copy link
Contributor

@chavafg chavafg commented Feb 20, 2018

install_ksm_throttler.sh installs the ksm throttler tool,
starts and enables the service on systems that are not
running the metrics CI and stops/disable the cc-proxy
service, in case it is still shipped in the system.

Fixes #913.

Signed-off-by: Salvador Fuentes salvador.fuentes@intel.com

install_ksm_throttler.sh installs the ksm throttler tool,
starts and enables the service on systems that are not
running the metrics CI and stops/disable the cc-proxy
service, in case it is still shipped in the system.

Fixes clearcontainers#913.

Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
@clearcontainersbot
Copy link

kubernetes qa-passed 👍

# ourselves
if [[ ! $METRICS_CI ]]; then
systemctl enable vc-throttler.service
systemctl start vc-throttler.service

Choose a reason for hiding this comment

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

I think we need the ksm-throttling service as well as vc-throttler right @erick0z / @sameo?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I made a local test and ksm-throttler service is started by the vc-throttler service, so I think we do not need to start via the script.

Here a proof:

cc-tester@singlevm:~$ sudo systemctl status vc-throttler.service 
● vc-throttler.service - Virtcontainers based KSM throttling
   Loaded: loaded (/lib/systemd/system/vc-throttler.service; disabled; vendor preset: enabled)
   Active: inactive (dead)
     Docs: https://github.com/kata-containers/ksm-throttler
cc-tester@singlevm:~$ sudo systemctl status ksm-throttler.service 
● ksm-throttler.service - KSM throttling daemon
   Loaded: loaded (/lib/systemd/system/ksm-throttler.service; disabled; vendor preset: enabled)
   Active: inactive (dead)
     Docs: https://github.com/kata-containers/ksm-throttler
cc-tester@singlevm:~$ sudo systemctl start vc-throttler.service 
cc-tester@singlevm:~$ sudo systemctl status vc-throttler.service 
● vc-throttler.service - Virtcontainers based KSM throttling
   Loaded: loaded (/lib/systemd/system/vc-throttler.service; disabled; vendor preset: enabled)
   Active: active (running) since Tue 2018-02-20 18:07:15 UTC; 3s ago
     Docs: https://github.com/kata-containers/ksm-throttler
 Main PID: 1866 (vc)
    Tasks: 4
   Memory: 7.6M
      CPU: 10ms
   CGroup: /system.slice/vc-throttler.service
           └─1866 /usr/libexec/ksm-throttler/trigger/virtcontainers/vc -log debug

Feb 20 18:07:15 singlevm systemd[1]: Started Virtcontainers based KSM throttling.
Feb 20 18:07:15 singlevm vc[1866]: time="2018-02-20T18:07:15Z" level=debug msg="Waiting for /var/run/virtcontainers"
cc-tester@singlevm:~$ sudo systemctl status ksm-throttler.service 
● ksm-throttler.service - KSM throttling daemon                                                                                                                                          "singlevm" 16:10 20-Feb-18
   Loaded: loaded (/lib/systemd/system/ksm-throttler.service; disabled; vendor preset: enabled)
   Active: active (running) since Tue 2018-02-20 18:07:15 UTC; 6s ago
     Docs: https://github.com/kata-containers/ksm-throttler
 Main PID: 1867 (ksm-throttler)
    Tasks: 6
   Memory: 6.6M
      CPU: 11ms
   CGroup: /system.slice/ksm-throttler.service
           └─1867 /usr/libexec/ksm-throttler/ksm-throttler -log debug

Feb 20 18:07:15 singlevm systemd[1]: Started KSM throttling daemon.
Feb 20 18:07:15 singlevm ksm-throttler[1867]: time="2018-02-20T18:07:15Z" level=info name=ksm-throttler pid=1867 source=throttler version=0.0.1-3647ce2aba865dc877a390bde78ce27fa60a6903
Feb 20 18:07:15 singlevm ksm-throttler[1867]: time="2018-02-20T18:07:15Z" level=debug msg="Starting KSM throttling service at /var/run/ksm-throttler/ksm.sock" name=ksm-throttler pid=1867 source=throttler

Choose a reason for hiding this comment

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

Hi @chavafg - I checked the systemd units themselves and you are correct - we only need vc.

@clearcontainersbot
Copy link

kubernetes qa-passed 👍

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.

from my metrics pov,
lgtm
I'll defer to others for the systemd specifics etc.

@grahamwhaley
Copy link
Contributor

and thanks for putting this together @chavafg :-)

@grahamwhaley
Copy link
Contributor

@chavafg @jodh-intel - I've stuck a DNM label on, as my ack made this mergeable, and we need feedback on @jodh-intel 's query first

@jodh-intel
Copy link

jodh-intel commented Feb 21, 2018

lgtm

Approved with PullApprove

@chavafg
Copy link
Contributor Author

chavafg commented Feb 21, 2018

Removing the DNM flag

@grahamwhaley
Copy link
Contributor

Hi @chavafg @jodh-intel
I know we've merged this, and maybe I'm missing something, but should this not also have added a call to this script in https://github.com/clearcontainers/tests/blob/master/.ci/setup.sh#L46 in order to invoke it during the CI setup phase?
Right now I think we have the script, but nobody is calling it. For the metrics CI I think that means I still have an errant cc-proxy sat at the system level that has not been 'stopped' etc. (and hence why I am still seeing KSM active all the time)

@chavafg
Copy link
Contributor Author

chavafg commented Feb 22, 2018

@grahamwhaley
That is completely true, I forgot to add this to the main setup script :( opening a PR to fix it

@grahamwhaley
Copy link
Contributor

@chavafg thanks!
And, sorry about this, but I happened to just be reading https://github.com/clearcontainers/runtime/blob/master/docs/developers-clear-containers-install.md
and now I wonder if we need to add the ksm-throttler to that install process as well?

mcastelino pushed a commit to mcastelino/tests that referenced this pull request Jan 23, 2019
…ntation

docs: Document how to run the tests
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.

4 participants