Tagged articles
lock contention
18 articles · Page 1 of 1
This comprehensive guide walks through a systematic troubleshooting process for 502 Bad Gateway errors, detailing how to investigate Nginx upstream failures, application thread pool exhaustion, database connection pool saturation, slow queries, lock contention, and system resource bottlenecks with concrete commands and configuration examples.
502 troubleshootingMySQLOperations
0 likes · 47 min read

This article explains thread starvation in Java concurrency, demonstrates it with a code example showing unfair lock acquisition and cumulative wait times, and provides two solutions: moving slow operations outside synchronized blocks and using ReentrantLock tryLock with timeout to bound waiting.
Java ConcurrencyReentrantLockSynchronized
0 likes · 10 min read

This article presents a practical guide for performance stress testing in domestic microservice containerization, addressing three core challenges—lack of unified computing power conversion, non-linear multi-core scalability, and frequent base software iterations—through standardized baselines, quantitative modeling, multi-core optimization, and continuous governance frameworks.
ARM ArchitectureContainerizationNUMA
0 likes · 17 min read


liandkSep 14, 2026 · Backend Development
This guide covers real-world diagnosis and resolution of Java thread deadlocks and thread pool exhaustion — the two most common causes of service hangs with zero errors — using jstack, Arthas, and thread-state analysis to pinpoint root causes and apply permanent fixes.
ArthasJavajstack
0 likes · 13 min read

In high‑concurrency systems, tail latency is driven primarily by waiting on locks, resources, and scheduling rather than raw computation, with phenomena like head‑of‑line blocking, context‑switch overhead, and cache‑coherency costs amplifying unpredictable delays.
Tail Latencybackend systemscontext switch
0 likes · 13 min read

Netflix discovered that scaling hundreds of containers on modern CPUs hit severe lock‑contention due to mount‑related kernel locks, with performance varying across AWS instance types, NUMA designs, and hyper‑threading, leading them to redesign containerd mounting and choose hardware‑aware scheduling to restore efficient scaling.
AWSCPU architectureContainerd
0 likes · 16 min read

The article explains how the traditional mmap_lock read lock creates severe contention and priority inversion for frequent madvise MADV_DONTNEED/FREE calls, and how a per‑VMA locking redesign eliminates this bottleneck, improves performance, and is slated for the next Linux kernel release.
Linuxkernel memory managementlock contention
0 likes · 5 min read

The article explains how replacing the global mmap_lock read lock with per‑VMA locks for madvise MADV_DONTNEED/FREE removes severe lock contention and priority inversion in Linux memory management, and it details the patches, reasoning, and performance evidence supporting the change.
Linux kernellock contentionmadvise
0 likes · 6 min read


JD TechJul 2, 2025 · Backend Development
This article examines the severe row‑lock competition in MySQL during hot‑SKU inventory positioning, analyzes its causes and risks, and presents a comprehensive set of mitigation strategies—including DB account isolation, flow‑control, request merging, and message‑queue optimizations—validated by extensive performance testing and successful rollout across multiple clusters.
Message Queuebackend optimizationdatabase
0 likes · 14 min read


JavaEdgeOct 19, 2024 · Backend Development
This article investigates a production issue on Java 21 where virtual threads cause Tomcat to stop processing requests, closeWait sockets to accumulate, and locks to deadlock, detailing the diagnostics, thread‑dump analysis, lock inspection, and the eventual conclusions about virtual‑thread behavior.
JavaTomcatlock contention
0 likes · 19 min read

An in‑depth postmortem of a costly MySQL data‑migration failure caused by using INSERT INTO SELECT without proper indexing, detailing the OOM issue, full‑table scans, lock contention, and best practices to safely employ the statement.
Database MigrationINSERT INTO SELECTMySQL
0 likes · 7 min read

The article explains that while MySQL foreign keys ensure data consistency and integrity, they introduce performance overhead, lock contention, and scalability issues—especially in high‑concurrency and sharded environments—leading many large internet firms to forego them in favor of application‑level solutions.
Database PerformanceForeign KeyMySQL
0 likes · 5 min read


ITPUBNov 23, 2020 · Databases
The article examines the hidden lock‑contention issue in InnoDB’s Adaptive Hash Index (AHI) observed during high‑concurrency sysbench runs, explains why multiple threads block on the AHI hash table’s exclusive lock, and presents a lightweight fallback optimization that checks the lock before building AHI, reducing lock wait time and stabilizing QPS performance.
Adaptive Hash IndexDatabase InternalsInnoDB
0 likes · 9 min read

The article details how Didi’s large‑scale Ceph deployment suffered from high tail latency due to long‑held and coarse‑grained locks, and describes a series of fixes—including asynchronous read threads, fine‑grained object caches, per‑thread lock‑free logging, and lock‑free filestore apply—that cut latency by up to 90 % and more than doubled read throughput.
Asynchronous ProcessingBlueStoreCeph
0 likes · 12 min read

This article outlines a systematic approach to diagnosing and resolving DDL execution hangs in Dble, covering log inspection, context analysis, identifying problematic data nodes and MySQL connections, and confirming lock contention as the root cause.
DDLDatabase Middlewarelock contention
0 likes · 4 min read

The article investigates intermittent slow update performance in a Tencent Cloud internal system caused by massive lock_wait_thread contention, analyzes the underlying InnoDB lock mechanisms and thread behavior, implements a fix by disabling lock_wait_suspend_thread triggers, and demonstrates substantial latency reduction through benchmark results.
InnoDBMySQLdatabase
0 likes · 8 min read

An in‑depth investigation reveals that when MySQL semi‑sync replication is configured with rpl_semi_sync_master_wait_for_slave_count=1, starting a second slave can cause the master’s dump thread to fail, leading to slave_io_thread stalls; the analysis includes reproduction steps, status checks, thread stack traces, and a patch using sched_yield to resolve the lock contention.
Dump threadMySQLSemi-sync Replication
0 likes · 8 min read

This article shares years of server‑development experience, explaining how data copies, context switches, memory allocation, and lock contention act as the four main performance killers and offering practical strategies to mitigate each for faster, more scalable services.
context switchesdata copieslock contention
0 likes · 21 min read
