Tagged articles
TCMalloc
12 articles · Page 1 of 1
Modern C++ applications face severe performance bottlenecks due to traditional memory management techniques like new/delete and malloc/free, which cause fragmentation and high overhead; TCMalloc, a thread‑caching allocator from Google, dramatically reduces latency, improves memory utilization, and scales efficiently across multithreaded workloads.
C++MultithreadingTCMalloc
0 likes · 29 min read

This article provides a comprehensive overview of Google’s TCMalloc memory allocator, detailing its three‑level cache architecture, allocation and reclamation strategies, installation methods, configuration options, and performance advantages over other allocators in C++ backend, game, and database applications.
C performanceMemory AllocatorMultithreading
0 likes · 27 min read

This article analyzes a MySQL 5.7 OOM incident triggered by a heavy full‑text query, examines memory usage patterns with Tcmalloc, demonstrates how switching to Jemalloc releases memory, and provides step‑by‑step commands and observations to prevent similar outages.
Full-Text IndexMySQLOOM
0 likes · 11 min read

This article examines Linux memory management fundamentals, explains the brk/sbrk and mmap system calls, details the internal architectures, allocation and reclamation processes of ptmalloc and tcmalloc, analyzes key configuration parameters, and presents benchmark and production‑level results that demonstrate their impact on performance and memory usage.
LinuxTCMallocbenchmark
0 likes · 32 min read

Based on Google’s TCMalloc, Go’s automatic memory system organizes memory into pages and spans, uses per‑processor mcache and shared mcentral for size‑class allocation, and employs a concurrent tri‑color mark‑sweep garbage collector triggered by heap usage or large allocations, illustrating the full allocation‑to‑reclamation pipeline.
GoTCMallocgarbage collection
0 likes · 21 min read

The article investigates a MySQL 5.6 instance that consumed nearly all memory on a 32 GB test server, identifies misconfigurations, excessive MyISAM file handles, and severe memory fragmentation, and demonstrates how switching to tcmalloc reduced memory usage to a stable 5 GB.
InnoDBMySQLPerformance Tuning
0 likes · 12 min read

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.
MySQLTCMallocperformance_schema
0 likes · 4 min read

The article compares Java’s mature, generational garbage collector—using mark‑copy for young objects, mark‑sweep/compact for old, with sophisticated write barriers and fragmentation handling—to Go’s non‑generational, concurrent tri‑color mark‑sweep collector that relies on a span‑based memory pool, TCMalloc optimizations, and simpler root selection.
Generational CollectionGo GCJVM
0 likes · 14 min read

The article analyzes a MySQL 5.6 high‑CPU issue triggered by a frequently executed query with many UID values, identifies mutex contention and excessive memory allocation in InnoDB as root causes, and presents a solution of switching the memory allocator to tcmalloc with configuration changes.
CPUInnoDBMutex
0 likes · 4 min read

This article examines typical C/C++ memory problems, classifying them into memory leaks and performance issues caused by fragmentation, explains root causes such as lost pointers, improper releases, unbounded allocations, and provides diagnostic examples and mitigation strategies using memory pools like tcmalloc.
C++TCMallocdebugging
0 likes · 13 min read

This guide explains what TCMalloc is, lists required packages, and provides step‑by‑step commands to install libunwind and gperftools, compile Nginx with the Google perftools module, configure profiling directories, modify the Nginx config, and verify that TCMalloc is correctly loaded to improve server performance.
LinuxTCMallocgperftools
0 likes · 4 min read

This tutorial explains how to install TCMalloc and integrate it with Nginx on a Linux server, covering required dependencies, recompiling Nginx with the perftools module, configuring profiling directories, handling library errors, and extending the optimization to MySQL.
LinuxTCMalloc
0 likes · 6 min read
