---
title: "How We Found 7 TiB of Memory Just Sitting Around"
description: "Render's Kubernetes clusters have an unusually large number of namespaces, and daemonsets that listwatch them, such as Vector's kubernetes_logs source, used gigabytes of memory per node and put load on the apiserver during rollouts."
url: "https://swe.quest/articles/how-we-found-7-tib-of-memory-just-sitting-around-a00b8a17b734c234"
canonical: "https://render.com/blog/how-we-found-7-tib-of-memory-just-sitting-around"
source: "Render"
published: "2025-10-30"
difficulty: "medium"
kind: "Case study"
reading_minutes: 7
tags: ["kubernetes","observability","performance","cost-optimization","open-source"]
---

# How We Found 7 TiB of Memory Just Sitting Around

A post on [Render](https://swe.quest/sources/render.md), published 2025-10-30, 7 min read, Case study. Original: [https://render.com/blog/how-we-found-7-tib-of-memory-just-sitting-around](https://render.com/blog/how-we-found-7-tib-of-memory-just-sitting-around)

## Summary

Render's Kubernetes clusters have an unusually large number of namespaces, and daemonsets that listwatch them, such as Vector's kubernetes\_logs source, used gigabytes of memory per node and put load on the apiserver during rollouts. Render added an opt-in config option to Vector (insert\_namespace\_fields) that disables namespace watching, since its config only used namespace labels to identify user pods. A missed second kubernetes\_logs source initially hid part of the savings. Per-pod memory fell from nearly 4 GiB to tens of MiB, which freed about 1 TiB on the largest cluster and just over 7 TiB across the fleet.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Kubernetes](https://swe.quest/tags/kubernetes.md) (Infrastructure)
- [Observability](https://swe.quest/tags/observability.md) (Reliability & operations)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)
- [Cost optimization](https://swe.quest/tags/cost-optimization.md) (Reliability & operations)
- [Open source](https://swe.quest/tags/open-source.md) (Engineering practices)

## Prerequisites

- Kubernetes daemonsets ([easy posts on Kubernetes](https://swe.quest/tags/kubernetes.md?difficulty=easy))
- Kubernetes list/watch API ([easy posts on Kubernetes](https://swe.quest/tags/kubernetes.md?difficulty=easy))
- Kubernetes namespaces ([easy posts on Kubernetes](https://swe.quest/tags/kubernetes.md?difficulty=easy))

## Keywords

Vector, Calico, Kubernetes, kubernetes\_logs, Render

## Related posts

- [Node.js and the tale of worker threads](https://swe.quest/articles/node-js-and-the-tale-of-worker-threads-2f7f52d719f58af7.md): Zalando Engineering · 2024-07-24 · Medium · 10 min read · JavaScript, Kubernetes, Incidents & postmortems, Debugging, Observability
  A Node.js service using cluster mode called os.cpus().length inside a Kubernetes container, which returns the host's core count, not the pod's CPU allocation.
- [Debugging Systems in the Cloud: MySQL, Kubernetes, and Cgroups](https://swe.quest/articles/debugging-systems-in-the-cloud-mysql-kubernetes-and-cgroups-a5ded3f862ca5b21.md): Shopify Engineering · 2021-10-21 · Hard · 8 min read · Debugging, Linux, MySQL, Kubernetes, Performance engineering
  Slow MySQL Pod startup and degraded query performance on long-running GKE nodes in Shopify's KateSQL platform traced back to a Linux kernel memory cgroup leak: roughly 50K zombie memory cgroups made mem\_cgroup\_commit\_charge slow, so each 128MB mmap during InnoDB buffer pool initialization took about 100 ms. The investigation used strace, perf flamegraphs, slabtop and /proc/cgroups, and Google kernel engineers confirmed it as a side effect of slab reparenting on cgroup removal.
- [Kubernetes v1.37: etcd RangeStream Cuts Memory Use on Large List Reads](https://swe.quest/articles/kubernetes-v1-37-etcd-rangestream-cuts-memory-use-on-large-list-reads-7b71582ef59abcc3.md): Kubernetes Blog · 2026-09-01 · Medium · 3 min read · Kubernetes, Memory management, Performance engineering
  Kubernetes v1.37 promotes etcd RangeStream to beta and enables it by default via the EtcdRangeStream feature gate.
- [How We Rebuilt Our Log Storage and Search Infrastructure for Scale](https://swe.quest/articles/how-we-rebuilt-our-log-storage-and-search-infrastructure-for-scale-ff36f77144f2ff50.md): Railway · 2022-01-20 · Medium · 3 min read · Observability, System design, Scaling, RPC & gRPC, GraphQL
  Railway replaced per-request Docker log polling (every 2 seconds, straining the Docker daemon across 500,000+ deployments) with a centralized log pipeline.
- [May 30 incident update](https://swe.quest/articles/may-30-incident-update-3783b8eb72e49183.md): Deno · 2022-06-02 · Easy · 2 min read · Incidents & postmortems, Consensus, Capacity planning, Linux
  A 70-minute Deno Deploy outage on May 30, 2022 was caused by the etcd service discovery cluster running out of memory after a network-wide load test: scale-up and scale-down generated a burst of updates, etcd daemons exceeded VM RAM, the Linux OOM killer terminated several at once, and quorum was lost.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
