Skip to content

Instantly share code, notes, and snippets.

// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
#include <elfio/elfio.hpp>
int main(int argc, char **argv)
{
ELFIO::elfio elf;
if (!elf.load("/usr/bin/ls")) {
std::cerr << "Error loading binary" << std::endl;
exit(1);
}
#!/bin/bash
declare -a pids
NUM_LOGGERS=$1
cleanup() {
echo "Caught SIGINT/HUP/TERM - Cleaning up PIDs.."
for p in ${pids[@]}
do
echo "Cleaning up PID ${p}"
$ mesos --help
Mesos CLI
Usage:
mesos (-h | --help)
mesos --version
mesos <command> [<args>...]
Options:
-h --help Show this screen.
import itertools
import prettytable
from prettytable import PrettyTable
affinities = [
(0,1),
(1,0),
(1,1),
]
#!/usr/bin/env bash
# Declare some helper functions
function get_kubernetes_hostname() {
local json="$(kubectl get nodes -o json)"
echo ${json} | python -c "$(cat << EOF
import sys
import json
nodes = json.load(sys.stdin)
--- blog-orig.md 2020-03-31 13:06:09.899071690 +0200
+++ blog.md 2020-03-31 13:04:49.594078489 +0200
@@ -7,46 +7,52 @@
**Authors:** Kevin Klues (NVIDIA), Victor Pickard (RedHat), Conor Nolan (Intel)
-This blog post describes the **<code>TopologyManager</code>**, a beta feature of Kubernetes in release 1.18. The <strong><code>TopologyManager</code></strong> feature enables NUMA alignment of CPUs and peripheral devices (such as SR-IOV VFs and GPUs), allowing your workload to run in an environment optimized for low-latency.
+This blog post describes the **<code>TopologyManager</code>**, a beta feature of Kubernetes in release 1.18. The **<code>TopologyManager</code>** feature enables NUMA alignment of CPUs and peripheral devices (such as SR-IOV VFs and GPUs), allowing your workload to run in an environment optimized for low-latency.
-Prior to the introduction of the **<code>TopologyManager</code>**, the CPU and Device Manager would make resource allocation decisions independent of each other. This could resu
layout title date slug
blog
Kubernetes Topology Manager Moves to Beta - Align Up!
2020-03-30
kubernetes-1-18-feature-topoloy-manager-beta

Authors: Kevin Klues (NVIDIA), Victor Pickard (RedHat), Conor Nolan (Intel)

This blog post describes the TopologyManager, a beta feature of Kubernetes in release 1.18. The TopologyManager feature enables NUMA alignment of CPUs and peripheral devices (such as SR-IOV VFs and GPUs), allowing your workload to run in an environment optimized for low-latency.

# Run the export command of nvidia-mig-parted
nvidia-mig-parted export
# Show nvidia-smi on the host with 8 full GPUs
nvidia-smi -L
# List out the NVIDIA container toolkit packages installed
dpkg -l | grep nvidia-container; dpkg -l | grep nvidia-docker
# Show that docker is configured to run with the nvidia container toolkit
diff --git a/pkg/kubelet/cm/devicemanager/plugin/v1beta1/handler.go b/pkg/kubelet/cm/devicemanager/plugin/v1beta1/handler.go
index cea6317257e..bdec8984139 100644
--- a/pkg/kubelet/cm/devicemanager/plugin/v1beta1/handler.go
+++ b/pkg/kubelet/cm/devicemanager/plugin/v1beta1/handler.go
@@ -44,10 +44,9 @@ func (s *server) RegisterPlugin(pluginName string, endpoint string, versions []s
func (s *server) DeRegisterPlugin(pluginName string) {
klog.V(2).InfoS("Deregistering plugin", "plugin", pluginName)
- s.mutex.Lock()
- defer s.mutex.Unlock()