Skip to content

Instantly share code, notes, and snippets.

View mauriciopoppe's full-sized avatar
🇧🇴

Mauricio Poppe mauriciopoppe

🇧🇴
View GitHub Profile
@mauriciopoppe
mauriciopoppe / README.md
Last active October 30, 2026 18:34
In-Process kube-apiserver Request Cost & Memory Optimization Study (BenchmarkRequestCost)

In-Process kube-apiserver Request Cost & Memory Optimization Study (BenchmarkRequestCost)

Purpose and Motivation

Profiling kube-apiserver memory consumption and per-request allocation churn in isolation is critical: isolated microbenchmarks exercise individual helper functions without realistic control plane wiring, while full end-to-end cluster tests introduce external network latency, node-agent background jitter, and non-deterministic garbage collection timing.

BenchmarkRequestCost (cost_test.go) provides a deterministic in-process kube-apiserver and embedded etcd3 integration harness designed to evaluate both per-request allocation churn (allocated bytes and object allocations per operation across JSON, CBOR, Protobuf, and Table formats) and server lifecycle heap metrics (server setup allocated bytes, retained heap in-use, retained runtime in-use, heap released, and heap span fragmentat

@mauriciopoppe
mauriciopoppe / README.md
Last active October 30, 2026 18:34
Integration Memory Benchmark of kube-apiserver

In-Process kube-apiserver Memory Integration Benchmark (TestAPIServerMemoryIntegration)

Purpose and Motivation

Profiling kube-apiserver memory consumption and allocation churn in isolation is challenging: microbenchmarks only exercise a single function at a time, while full cluster e2e tests introduce external network jitter, node-agent background noise, and non-deterministic garbage collection timing.

TestAPIServerMemoryIntegration (cmd/kube-apiserver/app/testing/apiserver_mem_bench_test.go) is a self-contained, deterministic in-process kube-apiserver + embedded etcd3 integration benchmark designed to measure both steady-state retained heap memory (pprof inuse_space, HeapInuse, HeapObjects, process RSS) and cumulative request allocation churn (pprof alloc_space, TotalAlloc, Mallocs, NumGC) with zero external dependencies.

![In-Process Benchmark Architecture and Request Flow](https://gist.githubusercontent.com/mauriciopoppe/508635e973bb8795cab2241c9a520edc/raw/kcp_

@mauriciopoppe
mauriciopoppe / _README.md
Last active April 19, 2024 03:40
Create backing tracks for your open mic or karaoke night
@mauriciopoppe
mauriciopoppe / esnextbin.md
Created June 16, 2017 23:43
esnextbin sketch
@mauriciopoppe
mauriciopoppe / IJT0-1.clj
Created May 21, 2017 06:50
null created by mauriciopoppe - https://repl.it/IJT0/1
; addition
(+ 6 8)
; 0
(+)
@mauriciopoppe
mauriciopoppe / esnextbin.md
Last active May 24, 2016 18:35
esnextbin sketch
@mauriciopoppe
mauriciopoppe / index.js
Created May 24, 2016 17:38
requirebin sketch
var adapter = require('floating-adapter');
var Decimal = require('pow-arbitrary-precision')(require('linear-arbitrary-precision')(adapter));
console.log(new Decimal('-8').pow(new Decimal('1/3')).valueOf())
@mauriciopoppe
mauriciopoppe / esnextbin.md
Created May 7, 2016 07:04
esnextbin sketch
@mauriciopoppe
mauriciopoppe / esnextbin.md
Created May 4, 2016 20:08
esnextbin sketch
@mauriciopoppe
mauriciopoppe / esnextbin.md
Created May 3, 2016 23:56
esnextbin sketch