Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static numa nodeallocator to test KMEM #4

Open
wants to merge 6 commits into
base: creatone/k8s-scheduler-extender
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion examples/kubernetes/monitoring/wca/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ spec:
# command:
# - /usr/bin/wca.pex
args:
- "--config=/etc/wca/wca-config.yaml"
- "--config=/etc/wca/wca-config-static-allocator.yaml"
# - "--config=/etc/wca/wca-config.yaml"
- "--root"
resources:
requests:
Expand Down
1 change: 1 addition & 0 deletions examples/kubernetes/monitoring/wca/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ configMapGenerator:
- name: wca-config
files:
- wca-config.yaml
- wca-config-static-allocator.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# Full example for Kubernetes running as daemonset (in-cluster k8s config)
# Requires environment variables:
# - KUBERNETES_SERVICE_HOST - provided by default by Kuberenetes
# - KUBERNETES_SERVICE_PORT - provided by default by Kubernetes
# - HOST_IP - need to explicitly enabled in Pod spec using downward-api
# - HOSTNAME - default provided by OS
loggers:
wca.containers: TRACE
wca.cgroups_allocations: TRACE
wca.platforms: TRACE
wca.extra: TRACE

runner: !AllocationRunner


allocations_storage: !LogStorage
overwrite: True
output_filename: /var/lib/wca/allocations.prom

anomalies_storage: !LogStorage
output_filename: /dev/null

allocator: !StaticAllocator

# cAdvisor/kubectl limitation in Topology/Discovery
# After new numanodes are provisioed and kubectl restarted:
#sudo sh -c 'echo 0-3 >/sys/fs/cgroup/cpuset/kubepods/cpuset.mems'
#sudo sh -c 'echo 0-3 >/sys/fs/cgroup/cpuset/kubepods/burstable/cpuset.mems'
#sudo sh -c 'echo 0-3 >/sys/fs/cgroup/cpuset/kubepods/besteffort/cpuset.mems'
#cat /sys/fs/cgroup/cpuset/kubepods/{,burstable/,besteffort/}cpuset.mems
#(migrate_pages both binary and syscall requires that /proc/self/status allows to be run on given numanode)

rules:
- name: Bind to numa node0
labels:
numanode: node0
allocations:
cpuset_mems: '0'
migrate_pages: 0

- name: Bind to numa node1
labels:
numanode: node1
allocations:
cpuset_mems: '1'
migrate_pages: 1

- name: Bind to numa node2
labels:
numanode: node2
allocations:
cpuset_mems: '2'
migrate_pages: 2

- name: Bind to numa node3
labels:
numanode: node3
allocations:
cpuset_mems: '3'
migrate_pages: 3

measurement_runner: !MeasurementRunner
interval: 5.0
node: !KubernetesNode
cgroup_driver: cgroupfs
monitored_namespaces: ["default"]
kubeapi_host: !Env KUBERNETES_SERVICE_HOST
kubeapi_port: !Env KUBERNETES_SERVICE_PORT
node_ip: !Env HOST_IP


metrics_storage: !LogStorage
overwrite: True
output_filename: /var/lib/wca/metrics.prom

extra_labels:
node: !Env HOSTNAME
event_names:
- task_cycles # do not remove: USED BY E2E tests
- task_instructions
- task_offcore_requests_demand_data_rd # required fro R/W characterization
- task_offcore_requests_demand_rfo
enable_derived_metrics: True
uncore_event_names:
- platform_cas_count_reads
- platform_cas_count_writes
- platform_pmm_bandwidth_reads
- platform_pmm_bandwidth_writes

wss_reset_interval: 1
gather_hw_mm_topology: True