Skip to content

Instantly share code, notes, and snippets.

View phosae's full-sized avatar
:octocat:
coffee ☕ , beer 🍺 and imagination 🧿

zengxu phosae

:octocat:
coffee ☕ , beer 🍺 and imagination 🧿
View GitHub Profile
@phosae
phosae / kcgroups.md
Created April 12, 2024 08:58 — forked from mcastelino/kcgroups.md
Kubernetes and cgroups Resource Management/Static cpuManagerPolicy/Memory and Resource Isolation & Scheduling

Overview

The goal of this document to cover all aspects of Kubernetes management, including how resources are expressed, constrained and accounted for. This started a way to ensure that alternate container runtime implementation like Kata containers will behave from a resource accounting and consumption point of view in the same manner as runc.

Location of the latest version of this document: https://gist.github.com/mcastelino/b8ce9a70b00ee56036dadd70ded53e9f

If you do not understand cgroups please refer to a quick primer at the bottom of this document. This will help you understand how the resource enforcement actually works.

Kubernetes Resource Management

@phosae
phosae / fork_and_daemon.go
Created March 22, 2023 08:08 — forked from wrfly/fork_and_daemon.go
golang fork and exec and handle signals
package main
import (
"flag"
"fmt"
"log"
"os"
"os/signal"
"syscall"
)