# cgroups

cgroups are a Linux kernel feature for organizing processes into hierarchical groups and limiting or monitoring their resource usage.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## 重新思考 Go：了解程序在线上是如何运行的

DevFeed: [重新思考 Go：了解程序在线上是如何运行的](<https://devfeed.tech/articles/go-40988.md>)

Original publisher: [Read original article](<https://blog.joway.io/posts/golang-rethink-program-in-realworld/>)

Author: Joway

Published: 2024-12-10T00:00:00Z

Content type: article

Language: zh

Sources: [Random Thoughts](<https://devfeed.tech/sources/random-thoughts.md>)

Topics: [Go Language](<https://devfeed.tech/topics/go-language.md>), [Kubernetes](<https://devfeed.tech/topics/kubernetes.md>), [cpu](<https://devfeed.tech/topics/cpu.md>), [cgroups](<https://devfeed.tech/topics/cgroups.md>), [Linux](<https://devfeed.tech/topics/linux.md>)

Tags: [cgroups](<https://devfeed.tech/tags/cgroups.md>), [cpu](<https://devfeed.tech/tags/cpu.md>), [go](<https://devfeed.tech/tags/go.md>), [golang](<https://devfeed.tech/tags/golang.md>), [k8s](<https://devfeed.tech/tags/k8s.md>), [linux](<https://devfeed.tech/tags/linux.md>), [mechanical-sympathy](<https://devfeed.tech/tags/mechanical-sympathy.md>), [quota](<https://devfeed.tech/tags/quota.md>), [runtime](<https://devfeed.tech/tags/runtime.md>), [tech](<https://devfeed.tech/tags/tech.md>), [waiting](<https://devfeed.tech/tags/waiting.md>)

### AI overview

This article examines how Go programs run in production environments, focusing on the relationship between Kubernetes CPU quotas, physical CPU availability, cgroups, and Go's GOMAXPROCS setting. It explains that CPU quota limits aggregate execution time, while available parallelism can depend on the host's physical cores and the program's design. It also introduces scheduling latency and the factors that affect the computing resources a Go service actually receives.

### Source excerpt

重新思考 Go 系列：这个系列希望结合工作中在 Go 编程与性能优化中遇到过的问题，探讨 Go 在语言哲学、底层实现和现实需求三者之间关系与矛盾。 前言 过去一段时间，在大量的线上服务 case study 过程中，逐步深入了解了如今的业务 Go 进程是如何在一系列繁杂的基础设施之上运行的。有些表现在意料之中，也有一些出乎意料的发现。