Tagged articles
31 articles
Page 1 of 1
Code Wrench
Code Wrench
Feb 19, 2026 · Backend Development

5 Go Techniques to Write Production‑Ready, Elegant Code

This article presents five practical Go techniques—using context for graceful cancellation, enriching errors with fmt.Errorf, leveraging sync.Pool to reduce GC pressure, employing pprof for performance profiling, and designing testable code with dependency injection—each illustrated with real‑world code examples and common pitfalls.

Gobest practicescontext
0 likes · 7 min read
5 Go Techniques to Write Production‑Ready, Elegant Code
Code Wrench
Code Wrench
Feb 1, 2026 · Operations

Detect and Fix Goroutine Leaks in Go with Context & pprof

This guide explains how Goroutine leaks cause hidden memory and CPU issues in long‑running Go health‑check tools, demonstrates how to reproduce the problem, and shows step‑by‑step detection using pprof and context, plus a production‑ready zero‑leak probe template with best‑practice code.

Opsmemory leakpprof
0 likes · 12 min read
Detect and Fix Goroutine Leaks in Go with Context & pprof
DeWu Technology
DeWu Technology
Aug 11, 2025 · Backend Development

How We Uncovered Hidden Bottlenecks in Rust Services with Profiling

After migrating thousands of Java cores to Rust, the team used jemalloc and pprof profiling to pinpoint why a few services only improved 10%, refactored the OSS client for reuse, and achieved up to 20% CPU reduction and significant memory savings, demonstrating the power of deep performance analysis in production Rust services.

AsyncMicroservicesProfiling
0 likes · 14 min read
How We Uncovered Hidden Bottlenecks in Rust Services with Profiling
Tencent Cloud Developer
Tencent Cloud Developer
Nov 5, 2024 · Backend Development

Understanding and Optimizing Go Performance with pprof and trace Tools

The article teaches Go developers how to generate and analyze CPU, heap, allocation, and goroutine profiles with pprof and full‑runtime traces, interpret SVG flame‑graphs, top lists, and source views, and apply concrete optimizations—such as buffering channels and using sync.Pool—to dramatically speed up a Mandelbrot generator.

GoGoroutineHeap Analysis
0 likes · 58 min read
Understanding and Optimizing Go Performance with pprof and trace Tools
DeWu Technology
DeWu Technology
Sep 30, 2024 · Backend Development

Automated Performance Profiling for Go Services with Conan

Conan is an automated profiling solution for Go microservices that embeds an SDK to continuously or adaptively sample CPU, memory and goroutine metrics, detects anomalies via user‑defined rules, uploads data to a Pyroscope server, and reports results through Feishu or Pyroscope, delivering sub‑5 % overhead and faster root‑cause analysis.

AutomationGoPyroscope
0 likes · 16 min read
Automated Performance Profiling for Go Services with Conan
Tencent Cloud Developer
Tencent Cloud Developer
May 22, 2024 · Backend Development

Comprehensive Guide to Go pprof and trace Tools for Performance Analysis

This comprehensive guide teaches Go developers how to generate CPU, memory, and goroutine profiles with pprof, interpret SVG, top, source, and peek visualizations, understand the runtime’s sampling and allocation internals, use the trace tool to analyze events, and apply these techniques to real‑world optimizations such as speeding up a Mandelbrot image generator.

Goperformance profilingpprof
0 likes · 57 min read
Comprehensive Guide to Go pprof and trace Tools for Performance Analysis
Tencent Cloud Developer
Tencent Cloud Developer
Nov 9, 2023 · Backend Development

Troubleshooting Golang GC Performance Issues Causing Request Timeout Spikes

The article details how a Go service’s default GOGC setting caused overly frequent garbage‑collection pauses that spiked request timeouts, and how adjusting GOGC dynamically with debug.SetGCPercent and setting memory limits reduced GC CPU usage, extended pause intervals, and eliminated timeout spikes.

Backend DevelopmentGC optimizationGOGC
0 likes · 20 min read
Troubleshooting Golang GC Performance Issues Causing Request Timeout Spikes
37 Interactive Technology Team
37 Interactive Technology Team
Jul 26, 2023 · Backend Development

Investigation and Resolution of CPU Spike in a Kafka-Go Consumer Using pprof

Using Go’s pprof, the team traced a gradual CPU spike in a high‑throughput kafka‑go consumer to a saturated commit queue and repeatedly nested context values, which forced costly lookups; eliminating the unnecessary trace‑id context injection (or recreating a fresh context each loop) resolved the issue and reduced CPU usage to under 2 %.

CPU profilingConsumerGo
0 likes · 10 min read
Investigation and Resolution of CPU Spike in a Kafka-Go Consumer Using pprof
DeWu Technology
DeWu Technology
Jan 4, 2023 · Backend Development

Diagnosing and Resolving Go Memory Leak with pprof and Prometheus

The article explains how a sudden Go service memory‑usage alert was traced with go tool pprof to a massive allocation in the quantile.newStream function, uncovered a Prometheus metric‑label explosion caused by the START_POINT label, and resolved the leak by disabling that label, while also reviewing typical Go memory‑leak patterns.

BackendGoPrometheus
0 likes · 15 min read
Diagnosing and Resolving Go Memory Leak with pprof and Prometheus
Xiao Lou's Tech Notes
Xiao Lou's Tech Notes
Jul 6, 2022 · Backend Development

How to Let Go Programs Profile Themselves Automatically

This article explains why traditional pprof sampling often fails in production, introduces Go's built‑in profiling tools and runtime.pprof, defines practical rules for triggering automatic sampling based on resource spikes, and demonstrates using the open‑source Holmes library and Docker demo to collect self‑diagnostic profiles.

GoPerformance MonitoringProfiling
0 likes · 12 min read
How to Let Go Programs Profile Themselves Automatically
ITPUB
ITPUB
Jun 30, 2022 · Backend Development

Master Go Performance: Layered Optimization Strategies for Faster Code

This article presents a layered approach to Go performance optimization, covering reasonable code practices, deliberate algorithmic and structural improvements, risky low‑level tweaks, and practical profiling techniques such as pprof, flame graphs, and trace, while providing concrete examples and actionable guidance.

GoPerformance OptimizationProfiling
0 likes · 17 min read
Master Go Performance: Layered Optimization Strategies for Faster Code
Sohu Tech Products
Sohu Tech Products
Apr 13, 2022 · Backend Development

Understanding Go Memory Leaks and Using pprof for Profiling

This article explains why Go programs can still exhibit memory growth despite automatic garbage collection, describes how to identify and diagnose such issues with the built‑in pprof tool, and details the underlying sampling mechanism, memory fragmentation, and cgo‑related allocations.

GoProfilingRuntime
0 likes · 9 min read
Understanding Go Memory Leaks and Using pprof for Profiling
Tencent Qidian Tech Team
Tencent Qidian Tech Team
Jan 18, 2022 · Operations

Unlock Go Performance: Master pprof, trace, GODEBUG, and Escape Analysis

This comprehensive guide explores Go performance optimization techniques, covering pprof profiling, trace analysis, GODEBUG diagnostics, and escape analysis, while providing practical code examples and real‑world case studies to help developers identify and resolve CPU, memory, and goroutine bottlenecks in production services.

Escape AnalysisGODEBUGGo
0 likes · 40 min read
Unlock Go Performance: Master pprof, trace, GODEBUG, and Escape Analysis
DeWu Technology
DeWu Technology
Dec 14, 2021 · Operations

Online Service Alarm Handling and Performance Profiling in Go

The article outlines a systematic SOP‑driven approach for diagnosing online service alarms and performance issues in Go, detailing a toolbox that includes pprof, trace, goroutine visualizers, perf and eBPF, and recommends application‑level optimizations, system tuning, and continuous profiling to accelerate root‑cause identification and reduce incident frequency.

GoOnline ServiceSOP
0 likes · 11 min read
Online Service Alarm Handling and Performance Profiling in Go
Tencent Cloud Developer
Tencent Cloud Developer
Aug 30, 2021 · Backend Development

Troubleshooting Golang Memory Leaks: A Production Case Study

The case study walks through debugging a Go production service that regularly spiked to over 6 GB of resident memory, revealing that unbuffered channel leaks, mis‑configured HTTP client timeouts, and ultimately a cgo‑based image‑processing library spawning unmanaged threads caused the leaks, and outlines a systematic troubleshooting workflow.

DebuggingGolangGoroutine
0 likes · 12 min read
Troubleshooting Golang Memory Leaks: A Production Case Study
Aikesheng Open Source Community
Aikesheng Open Source Community
Aug 27, 2021 · Databases

Analyzing MySQL Memory Usage with tcmalloc and pprof

This article demonstrates how to use Google’s tcmalloc library and the pprof tool to capture and analyze MySQL heap dumps, revealing memory allocations that performance_schema cannot track, and explains the experimental setup, data collection, and interpretation of the resulting memory allocation graphs.

Performance SchemaTCMallocmysql
0 likes · 4 min read
Analyzing MySQL Memory Usage with tcmalloc and pprof
Tencent Music Tech Team
Tencent Music Tech Team
May 13, 2021 · Backend Development

Performance Optimization and Profiling of Go Services Using pprof and trace

The article outlines why high‑load Go services need performance tuning and presents a systematic workflow—preparation, analysis with Linux tools and Go’s pprof/trace, targeted optimizations such as goroutine pooling, Redis MSET, efficient JSON handling and slice resizing—demonstrating how these changes boost throughput, lower latency, and stabilize memory usage while offering broader Go‑specific best‑practice recommendations.

GoLinuxPerformance Optimization
0 likes · 25 min read
Performance Optimization and Profiling of Go Services Using pprof and trace
Ops Development Stories
Ops Development Stories
Apr 19, 2021 · Cloud Native

Mastering Kubernetes Component Troubleshooting with pprof and Log Analysis

Learn a systematic approach to diagnosing Kubernetes core component issues by identifying faulty nodes, analyzing logs via systemd or static pods, and leveraging Go's pprof tool for performance profiling, including step‑by‑step commands and UI visualizations for components like kube‑apiserver, scheduler, controller‑manager, and kubelet.

Cloud NativeKuberneteslogs
0 likes · 9 min read
Mastering Kubernetes Component Troubleshooting with pprof and Log Analysis
360 Zhihui Cloud Developer
360 Zhihui Cloud Developer
Nov 26, 2019 · Backend Development

Cutting Go Memory Allocations by 100×: Profiling, Tracing, and Fixing Middleware

This article walks through generating load with Vegeta, using pprof and Go trace to pinpoint massive heap allocations caused by the chi compression middleware, and shows how upgrading the library and disabling the middleware reduced allocations by nearly a hundred‑fold while improving GC performance.

Compression MiddlewarePerformance OptimizationVegeta
0 likes · 8 min read
Cutting Go Memory Allocations by 100×: Profiling, Tracing, and Fixing Middleware
Didi Tech
Didi Tech
Aug 2, 2019 · Backend Development

Using Go pprof for Online Performance Profiling: Case Studies and Lessons

The article demonstrates how Go’s built‑in pprof tools can be used for live performance profiling, walking through two real‑world cases—one where a malformed JSON request caused massive object allocation and CPU spikes, and another where per‑call self‑referencing structs leaked memory—while offering practical tips on input validation, allocation reduction, and GC monitoring.

Backend DevelopmentCPU optimizationGo
0 likes · 16 min read
Using Go pprof for Online Performance Profiling: Case Studies and Lessons
Alibaba Cloud Native
Alibaba Cloud Native
May 17, 2018 · Backend Development

Detecting and Preventing Goroutine Leaks in PouchContainer

This article explains what goroutine leaks are, demonstrates how they occur in Alibaba's PouchContainer runtime, and provides practical detection methods and code‑level fixes using net/http/pprof, runtime.NumGoroutine, and CloseNotifier to keep Go services healthy.

Goroutinecontainer-runtimeleak detection
0 likes · 14 min read
Detecting and Preventing Goroutine Leaks in PouchContainer