# threadpools

A thread pool is a collection of worker threads that efficiently executes asynchronous callbacks and manages application work.

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

## SEER: A Scalable Event-Driven Runtime for Parallel Execution of Multi-Agent Reinforcement Learning Environments

DevFeed: [SEER: A Scalable Event-Driven Runtime for Parallel Execution of Multi-Agent Reinforcement Learning Environments](<https://devfeed.tech/articles/seer-a-scalable-event-driven-runtime-for-parallel-execution-of-multi-agent-reinforcement-learning-environments-121272.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2611.07996>)

Author: Jiming Su, Feng Zhu, Yuhao Xiao, Miao Zhang

Published: 2026-11-06T05:00:00Z

Content type: article

Language: en

Sources: [arXiv: Distributed Computing](<https://devfeed.tech/sources/arxiv-distributed-computing.md>)

Topics: [Reinforcement learning](<https://devfeed.tech/topics/reinforcement-learning.md>), [High-Performance Computing](<https://devfeed.tech/topics/high-performance-computing.md>), [threadpools](<https://devfeed.tech/topics/threadpools.md>), [event driven](<https://devfeed.tech/topics/event-driven.md>)

Tags: [cs-dc](<https://devfeed.tech/tags/cs-dc.md>), [cs-ma](<https://devfeed.tech/tags/cs-ma.md>), [environments](<https://devfeed.tech/tags/environments.md>), [event](<https://devfeed.tech/tags/event.md>), [event-driven](<https://devfeed.tech/tags/event-driven.md>), [latency](<https://devfeed.tech/tags/latency.md>), [multi-agent](<https://devfeed.tech/tags/multi-agent.md>), [parallel](<https://devfeed.tech/tags/parallel.md>), [queue](<https://devfeed.tech/tags/queue.md>), [reinforcement-learning](<https://devfeed.tech/tags/reinforcement-learning.md>), [runtime](<https://devfeed.tech/tags/runtime.md>)

### AI overview

SEER is a runtime for parallel execution of multi-agent reinforcement learning environments, aiming to reduce CPU-side work within each bounded environment step while preserving serial-equivalent boundary outputs. Its event-locality contract requires direct state updates to remain entity-local and cross-entity effects to be represented as ordered future events. A CAS-based dual-layer queue preserves per-entity causal order while exposing ready events to global worker threads; STPA selects a thread pool using short runtime traces and static workload and hardware features. In tests on parameterized UAV swarm control (Aircraft) and wireless management (PCS), SEER reduced Aircraft inference latency by 16.2% versus the baseline. On PCS, it reduced environment-execution latency by 46.9%, 19.5%, and 64.9% versus ROSS-T, NBSE, and ROOT-Sim, respectively. The excerpt reports these workload-specific results.

### Source excerpt

arXiv:2611.07996v1 Announce Type: new Abstract: Multi-agent reinforcement learning (MARL) is increasingly used in systems where many entities interact in a shared environment. In these workloads, policy inference can be batched on GPUs, but the CPU-side environment path still updates entity states, resolves local interactions, and builds observations inside each $\mathrm{env.step}$. This path can dominate latency in interaction-intensive workloads after policy batching. Existing vectorized environment interfaces and general event-driven runtimes do not directly address the fine-grained cross-entity work inside one bounded MARL step while preserving the step-level semantics expected by learning systems. We present SEER (Scalable Event-Driven Environment Runtime), a runtime for MARL environment execution under an explicit event-locality contract. SEER models each environment step as a bounded stream of timestamped events. If direct state updates are entity-local and cross-entity effects are represented as ordered future events, SEER can run independent events in parallel while preserving serial-equivalent boundary outputs. To make this contract practical, SEER uses a CAS-based dual-layer event queue: local event queues preserve per-entity causal order, while a parallel executive list exposes ready work to global worker threads. SEER further uses STPA, a preflight-guided thread-pool selection mechanism that combines short runtime traces with static workload and hardware features. We evaluate SEER on two parameterized MARL workloads: compute-intensive UAV swarm control (Aircraft) and communication-intensive wireless management (PCS). On Aircraft, SEER reduces inference latency by 16.2\% over the baseline. On PCS, SEER reduces environment-execution latency by 46.9\%, 19.5\%, and 64.9\% over ROSS-T, NBSE, and ROOT-Sim, respectively.

## Your trace has a gap exactly where the bug is

DevFeed: [Your trace has a gap exactly where the bug is](<https://devfeed.tech/articles/your-trace-has-a-gap-exactly-where-the-bug-is-100770.md>)

Original publisher: [Read original article](<https://ankit-rana.com/logs/69-trace-gap-where-the-bug-is/>)

Author: hello@ankit-rana.com

Published: 2026-10-26T00:00:00Z

Content type: article

Language: en

Sources: [Ankit Rana | Mechanical Sympathy](<https://devfeed.tech/sources/ankit-rana-mechanical-sympathy.md>)

Topics: [tracing](<https://devfeed.tech/topics/tracing.md>), [threadpools](<https://devfeed.tech/topics/threadpools.md>), [Publish-subscribe pattern](<https://devfeed.tech/topics/pubsub.md>), [out-of-process](<https://devfeed.tech/topics/out-of-process.md>)

Tags: [asynchronous](<https://devfeed.tech/tags/asynchronous.md>), [bug](<https://devfeed.tech/tags/bug.md>), [callback](<https://devfeed.tech/tags/callback.md>), [client](<https://devfeed.tech/tags/client.md>), [context](<https://devfeed.tech/tags/context.md>), [context-propagation](<https://devfeed.tech/tags/context-propagation.md>), [debug](<https://devfeed.tech/tags/debug.md>), [debugging](<https://devfeed.tech/tags/debugging.md>), [distributed-systems](<https://devfeed.tech/tags/distributed-systems.md>), [distributed-tracing](<https://devfeed.tech/tags/distributed-tracing.md>), [error](<https://devfeed.tech/tags/error.md>), [executor](<https://devfeed.tech/tags/executor.md>), [gap](<https://devfeed.tech/tags/gap.md>), [garbage-collection](<https://devfeed.tech/tags/garbage-collection.md>), [latency](<https://devfeed.tech/tags/latency.md>), [message-queues](<https://devfeed.tech/tags/message-queues.md>), [observability](<https://devfeed.tech/tags/observability.md>), [opentelemetry](<https://devfeed.tech/tags/opentelemetry.md>), [queues](<https://devfeed.tech/tags/queues.md>), [retries](<https://devfeed.tech/tags/retries.md>), [thread](<https://devfeed.tech/tags/thread.md>), [thread-pool](<https://devfeed.tech/tags/thread-pool.md>), [trace](<https://devfeed.tech/tags/trace.md>), [tracing](<https://devfeed.tech/tags/tracing.md>)

### AI overview

A long parent span with much shorter child spans can mean work lost its trace context at an execution boundary, leaving missing work invisible rather than producing an error. The excerpt explains that thread-local context does not cross executor threads unless captured and restored (for example, by wrapping the executor); queue context must be injected into and extracted from message headers, with links recommended for asynchronous causality; and callbacks or reactive schedulers need context bridging. Library retries can hide multiple attempts inside one span, so instrumenting attempts separately can reveal failures and retry counts. Similar gaps can come from stop-the-world GC pauses or connection-pool waits, which can be distinguished by correlating pauses or instrumenting acquisition. To investigate, compare child durations with the parent and inspect what ran during the unaccounted interval. Head sampling decides at trace start and can miss incidents; tail sampling can retain slow or failed traces but requires buffering and routing all trace spans to one collector.

### Source excerpt

Distributed tracing works by passing a context object along the call path, and any boundary that does not carry it forward silently ends the trace. Thread pool handoffs, message queues, callbacks and library-managed retries are the usual places, which is unfortunate because those are also where the latency and the bugs live. A gap does not appear as an error, it appears as a span that seems to take four seconds while its children are simply absent.

## Virtual threads changed the calculus for blocking I/O and not for CPU work

DevFeed: [Virtual threads changed the calculus for blocking I/O and not for CPU work](<https://devfeed.tech/articles/virtual-threads-changed-the-calculus-for-blocking-i-o-and-not-for-cpu-work-87574.md>)

Original publisher: [Read original article](<https://ankit-rana.com/logs/66-virtual-threads-blocking-io-not-cpu/>)

Author: hello@ankit-rana.com

Published: 2026-10-15T00:00:00Z

Content type: article

Language: en

Sources: [Ankit Rana | Mechanical Sympathy](<https://devfeed.tech/sources/ankit-rana-mechanical-sympathy.md>)

Topics: [Distributed Systems & Parallel Computing](<https://devfeed.tech/topics/distributed-systems-parallel-computing.md>), [threadpools](<https://devfeed.tech/topics/threadpools.md>), [Deadlock](<https://devfeed.tech/topics/deadlock.md>), [performance-optimization](<https://devfeed.tech/topics/performance-optimization.md>)

Tags: [backpressure](<https://devfeed.tech/tags/backpressure.md>), [concurrency](<https://devfeed.tech/tags/concurrency.md>), [database](<https://devfeed.tech/tags/database.md>), [deadlock](<https://devfeed.tech/tags/deadlock.md>), [java](<https://devfeed.tech/tags/java.md>), [jvm](<https://devfeed.tech/tags/jvm.md>), [loom](<https://devfeed.tech/tags/loom.md>), [performance](<https://devfeed.tech/tags/performance.md>), [virtual-threads](<https://devfeed.tech/tags/virtual-threads.md>)

### AI overview

The article explains how Java virtual threads improve concurrency for services that spend much of their time waiting on blocking I/O, while providing no benefit for CPU-bound work. It discusses carrier pinning, avoiding virtual-thread pools, and placing concurrency limits at constrained downstream resources.

### Source excerpt

A virtual thread that blocks on I/O unmounts from its carrier and costs nothing while it waits, which makes thread-per-request viable at concurrency levels that would have needed reactive code. It does nothing for CPU bound work, because computation still needs a real core and the carrier pool is sized to the core count. Pooling virtual threads is an anti-pattern since they are cheap to create, and blocking inside a synchronized block pins the carrier, which can deadlock a workload that would have been fine on platform threads.

## Thread Pool in Percona Server and MySQL (Part 2)

DevFeed: [Thread Pool in Percona Server and MySQL (Part 2)](<https://devfeed.tech/articles/thread-pool-in-percona-server-and-mysql-part-2-85430.md>)

Original publisher: [Read original article](<https://www.percona.com/blog/thread-pool-in-percona-server-and-mysql-part-2/>)

Author: Bogdan Degtyariov

Published: 2026-10-12T11:14:07Z

Content type: comparison

Language: en

Sources: [Percona](<https://devfeed.tech/sources/blog-percona.md>)

Topics: [Percona Server for MySQL](<https://devfeed.tech/topics/percona-server-for-mysql.md>), [MySQL](<https://devfeed.tech/topics/mysql.md>), [threadpools](<https://devfeed.tech/topics/threadpools.md>), [Percona](<https://devfeed.tech/topics/percona.md>)

Tags: [benchmark](<https://devfeed.tech/tags/benchmark.md>), [benchmarks](<https://devfeed.tech/tags/benchmarks.md>), [latency](<https://devfeed.tech/tags/latency.md>), [mysql](<https://devfeed.tech/tags/mysql.md>), [mysql-thread-pool](<https://devfeed.tech/tags/mysql-thread-pool.md>), [percona](<https://devfeed.tech/tags/percona.md>), [percona-server-for-mysql](<https://devfeed.tech/tags/percona-server-for-mysql.md>), [performance](<https://devfeed.tech/tags/performance.md>), [thread-pool](<https://devfeed.tech/tags/thread-pool.md>)

### AI overview

The article compares thread pool performance in Percona Server for MySQL and MySQL across buffer pool sizes and connection counts. Percona's thread pool performs better when the data set is not fully buffered, while MySQL performs better in fully buffered tests. The article also reports that optimal thread pool settings differ between the two servers.

### Source excerpt

Thread Pool in Percona Server and MySQL (Part 2) The previous Part 1 focused on explaining the idea of thread pool, configuration options and analysis of thread pool efficiency in Percona Server for MySQL 9.7.1-1 against the base line, which is the same server without thread pooling. We recommend reading the post with Part 1 ... Continued The post Thread Pool in Percona Server and MySQL (Part 2) appeared first on Percona.

## Thread Pool in Percona Server and MySQL (Part 1)

DevFeed: [Thread Pool in Percona Server and MySQL (Part 1)](<https://devfeed.tech/articles/thread-pool-in-percona-server-and-mysql-part-1-64993.md>)

Original publisher: [Read original article](<https://www.percona.com/blog/thread-pool-in-percona-server-and-mysql-part-1/>)

Author: Bogdan Degtyariov

Published: 2026-10-05T10:48:57Z

Content type: article

Language: en

Sources: [Percona](<https://devfeed.tech/sources/blog-percona.md>)

Topics: [threadpools](<https://devfeed.tech/topics/threadpools.md>), [MySQL](<https://devfeed.tech/topics/mysql.md>), [Percona](<https://devfeed.tech/topics/percona.md>), [Percona Server for MySQL](<https://devfeed.tech/topics/percona-server-for-mysql.md>)

Tags: [benchmark](<https://devfeed.tech/tags/benchmark.md>), [benchmarks](<https://devfeed.tech/tags/benchmarks.md>), [efficiency](<https://devfeed.tech/tags/efficiency.md>), [mysql](<https://devfeed.tech/tags/mysql.md>), [percona](<https://devfeed.tech/tags/percona.md>), [percona-server-for-mysql](<https://devfeed.tech/tags/percona-server-for-mysql.md>), [server](<https://devfeed.tech/tags/server.md>), [thread-pool](<https://devfeed.tech/tags/thread-pool.md>)

### AI overview

The article explains MySQL thread pooling and compares its efficiency in Percona Server for MySQL. Its benchmarks show that pooling can greatly improve throughput under heavy, I/O-bound connection loads, while an unpooled configuration performs better with fully buffered data. The article also reports tighter p95 latency at 2,560 connections with pooling and stresses that results depend on careful tuning.

### Source excerpt

Thread Pool in Percona Server and MySQL (Part 1) A new version of Community MySQL Server July release contains two versions 26.7.0 and 9.7.2. It is an important milestone because it finally brings a Thread Pooling feature to the community. The official MySQL Server Thread Pool plugin existed for a long time, but was available ... Continued The post Thread Pool in Percona Server and MySQL (Part 1) appeared first on Percona.

## Thread pool starvation from nested async calls

DevFeed: [Thread pool starvation from nested async calls](<https://devfeed.tech/articles/thread-pool-starvation-from-nested-async-calls-64743.md>)

Original publisher: [Read original article](<https://ankit-rana.com/logs/63-thread-pool-starvation-nested-async/>)

Author: hello@ankit-rana.com

Published: 2026-10-05T00:00:00Z

Content type: tutorial

Language: en

Sources: [Ankit Rana | Mechanical Sympathy](<https://devfeed.tech/sources/ankit-rana-mechanical-sympathy.md>)

Topics: [Deadlock](<https://devfeed.tech/topics/deadlock.md>), [threadpools](<https://devfeed.tech/topics/threadpools.md>), [queueing theory](<https://devfeed.tech/topics/queueing-theory.md>), [synchronization](<https://devfeed.tech/topics/synchronization.md>)

Tags: [async](<https://devfeed.tech/tags/async.md>), [completablefuture](<https://devfeed.tech/tags/completablefuture.md>), [concurrency](<https://devfeed.tech/tags/concurrency.md>), [deadlock](<https://devfeed.tech/tags/deadlock.md>), [executor](<https://devfeed.tech/tags/executor.md>), [executorservice](<https://devfeed.tech/tags/executorservice.md>), [java](<https://devfeed.tech/tags/java.md>), [reliability](<https://devfeed.tech/tags/reliability.md>), [thread-pool](<https://devfeed.tech/tags/thread-pool.md>)

### AI overview

Nested asynchronous work in a bounded Java thread pool can starve the pool when parent tasks block while waiting for child tasks submitted to that same pool. The article explains why increasing pool size only delays the failure and presents alternatives: compose futures without blocking, isolate unavoidable blocking work in a separate bounded pool, use timeouts, and capture thread dumps and queue metrics to diagnose the problem. It also describes the limits of virtual threads for this failure mode.

### Source excerpt

A task that blocks waiting for another task submitted to the same bounded pool can deadlock, because the thread it needs is the thread it is occupying. With N threads and N waiting parents, every thread is blocked on work that has no thread left to run it. Nothing detects this, there is no error and no timeout by default, so the service simply stops responding while looking healthy. Raising the pool size delays it rather than fixing it, since the failure needs only enough concurrent parents to fill the pool.

## \[$\] Thread-identity switcheroo for io\_uring

DevFeed: [\[$\] Thread-identity switcheroo for io\_uring](<https://devfeed.tech/articles/thread-identity-switcheroo-for-io-uring-42126.md>)

Original publisher: [Read original article](<https://lwn.net/Articles/1094303/>)

Author: corbet

Published: 2026-09-17T13:49:59Z

Content type: article

Language: en

Sources: [LWN.net](<https://devfeed.tech/sources/lwn-net.md>)

Topics: [io\_uring](<https://devfeed.tech/topics/io-uring.md>), [async](<https://devfeed.tech/topics/async.md>), [scheduling](<https://devfeed.tech/topics/scheduling.md>), [threadpools](<https://devfeed.tech/topics/threadpools.md>)

Tags: [asynchronous](<https://devfeed.tech/tags/asynchronous.md>), [benchmark](<https://devfeed.tech/tags/benchmark.md>), [blocking](<https://devfeed.tech/tags/blocking.md>), [buffer](<https://devfeed.tech/tags/buffer.md>), [cache](<https://devfeed.tech/tags/cache.md>), [context-switch](<https://devfeed.tech/tags/context-switch.md>), [cves](<https://devfeed.tech/tags/cves.md>), [execution](<https://devfeed.tech/tags/execution.md>), [filesystem](<https://devfeed.tech/tags/filesystem.md>), [flag](<https://devfeed.tech/tags/flag.md>), [fsync](<https://devfeed.tech/tags/fsync.md>), [function](<https://devfeed.tech/tags/function.md>), [i-o](<https://devfeed.tech/tags/i-o.md>), [id](<https://devfeed.tech/tags/id.md>), [identity](<https://devfeed.tech/tags/identity.md>), [io-uring](<https://devfeed.tech/tags/io-uring.md>), [kernel](<https://devfeed.tech/tags/kernel.md>), [patch](<https://devfeed.tech/tags/patch.md>), [performance](<https://devfeed.tech/tags/performance.md>), [thread](<https://devfeed.tech/tags/thread.md>)

### AI overview

Jens Axboe's RFC proposes reducing io_uring overhead for operations that might block but often complete immediately. A scheduler hook detects when a submitting thread is about to sleep; io_uring then swaps its identity with a worker thread so submission processing can continue while the original thread blocks and later finishes the operation. This avoids worker handoff costs when no blocking occurs, but depends on safely exchanging task identities. Conditions such as ptrace, perf events, kernel-tracked futex ownership, realtime scheduling, and shadow stacks can prevent handoff or require additional support. Reported results include nearly 700% improvement for an fsync benchmark on tmpfs, alongside regressions for some always-blocking workloads, especially at higher queue depths where worker parallelism is lost. The series is an RFC exploring viability, not a near-term merge proposal; the excerpt describes safety coverage as a central concern.

### Source excerpt

The io_uring subsystem is all about asynchronous execution; applications count on it to not block -- unless explicitly requested to. Within io_uring, maintaining the "never blocks" guarantee has sometimes been a challenge, given that many paths in the kernel were never designed for asynchronous execution. This problem has been worked around, but at a significant cost to performance. Now, io_uring maintainer Jens Axboe has posted an RFC patch set with a somewhat radical (and potentially scary) solution to the problem.

## Asynchronous I/O in DuckDB: Work, Thread, Work

DevFeed: [Asynchronous I/O in DuckDB: Work, Thread, Work](<https://devfeed.tech/articles/asynchronous-i-o-in-duckdb-work-thread-work-4778.md>)

Original publisher: [Read original article](<https://duckdb.org/2026/07/31/asynchronous-io.html>)

Author: {"picture" =\> "/images/blog/authors/pedro\_holanda.jpg"}

Published: 2026-07-31T00:00:00Z

Content type: article

Language: en

Sources: [DuckDB](<https://devfeed.tech/sources/duckdb.md>)

Topics: [DuckDB](<https://devfeed.tech/topics/duckdb.md>), [async](<https://devfeed.tech/topics/async.md>), [threadpools](<https://devfeed.tech/topics/threadpools.md>), [scheduling](<https://devfeed.tech/topics/scheduling.md>), [parquet](<https://devfeed.tech/topics/parquet.md>), [CSV](<https://devfeed.tech/topics/csv.md>)

Tags: [2026](<https://devfeed.tech/tags/2026.md>), [asynchronous](<https://devfeed.tech/tags/asynchronous.md>), [bandwidth](<https://devfeed.tech/tags/bandwidth.md>), [can](<https://devfeed.tech/tags/can.md>), [compute](<https://devfeed.tech/tags/compute.md>), [csv](<https://devfeed.tech/tags/csv.md>), [deep-dive](<https://devfeed.tech/tags/deep-dive.md>), [duckdb](<https://devfeed.tech/tags/duckdb.md>), [ec2](<https://devfeed.tech/tags/ec2.md>), [fall](<https://devfeed.tech/tags/fall.md>), [files](<https://devfeed.tech/tags/files.md>), [i-o](<https://devfeed.tech/tags/i-o.md>), [parquet](<https://devfeed.tech/tags/parquet.md>), [queries](<https://devfeed.tech/tags/queries.md>), [s3](<https://devfeed.tech/tags/s3.md>), [scheduled](<https://devfeed.tech/tags/scheduled.md>), [speed](<https://devfeed.tech/tags/speed.md>), [storage](<https://devfeed.tech/tags/storage.md>), [support](<https://devfeed.tech/tags/support.md>), [thread](<https://devfeed.tech/tags/thread.md>), [work](<https://devfeed.tech/tags/work.md>)

### AI overview

DuckDB v2.0, scheduled for fall 2026, is expected to use asynchronous reads by default for Parquet and CSV, targeting workloads where synchronous reads leave remote bandwidth idle. Separate ASYNC threads issue read-ahead fetches while regular workers decode; workers can park until a job's fetches finish. Read-ahead is bounded by a configurable job depth or, by default, a temporary-memory budget, so memory pressure can reduce it toward synchronous behavior. In the reported S3 TPC-H Q6 benchmark, Parquet runtime fell from 8.230 seconds in v1.5.5 to 2.844 seconds in the untuned development build, and to 2.227 seconds with tuning; CSV runtime fell from 878 to 45 seconds. Cold local Parquet reads improved about 1.5x, while hot reads showed negligible difference. Too few Parquet row groups limited parallel streams and slowed scans. The excerpt says async support is implemented for Parquet and uncompressed, seekable UTF-8 CSV; JSON and DuckDB-native formats are planned.

### Source excerpt

Starting with v2.0, scheduled for fall 2026, DuckDB will support asynchronous reads of Parquet and CSV files. This can significantly speed up queries when synchronous I/O does not saturate the available bandwidth, as is typical in EC2/S3 compute-storage setups.

## Continuous profiling at Mercado Libre: Turning flamegraphs into fixes

DevFeed: [Continuous profiling at Mercado Libre: Turning flamegraphs into fixes](<https://devfeed.tech/articles/continuous-profiling-at-mercado-libre-turning-flamegraphs-into-fixes-22550.md>)

Original publisher: [Read original article](<https://medium.com/mercadolibre-tech/continuous-profiling-at-mercado-libre-turning-flamegraphs-into-fixes-2ee371c32bfd?source=rss----5011f85401f0---4>)

Author: Elton Hoffmann

Published: 2026-03-11T01:27:33Z

Content type: article

Language: en

Sources: [Mercado Libre Tech](<https://devfeed.tech/sources/mercado-libre-tech.md>)

Topics: [performance-engineering](<https://devfeed.tech/topics/performance-engineering.md>), [Developer Tools](<https://devfeed.tech/topics/developer-tools.md>), [Monitoring](<https://devfeed.tech/topics/monitoring.md>), [internal developer platform automation](<https://devfeed.tech/topics/internal-developer-platform-automation.md>), [Platform Engineering](<https://devfeed.tech/topics/platform-engineering.md>), [Developer experience](<https://devfeed.tech/topics/developer-experience.md>), [dashboards](<https://devfeed.tech/topics/dashboards.md>), [JDK Flight Recorder](<https://devfeed.tech/topics/jdk-flight-recorder.md>), [threadpools](<https://devfeed.tech/topics/threadpools.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [blocking](<https://devfeed.tech/tags/blocking.md>), [continuous](<https://devfeed.tech/tags/continuous.md>), [gc](<https://devfeed.tech/tags/gc.md>), [mercado](<https://devfeed.tech/tags/mercado.md>), [microservices](<https://devfeed.tech/tags/microservices.md>), [observability](<https://devfeed.tech/tags/observability.md>), [performance](<https://devfeed.tech/tags/performance.md>), [performance-engineering](<https://devfeed.tech/tags/performance-engineering.md>), [platform](<https://devfeed.tech/tags/platform.md>), [platform-engineering](<https://devfeed.tech/tags/platform-engineering.md>), [profiling](<https://devfeed.tech/tags/profiling.md>), [thread-pool](<https://devfeed.tech/tags/thread-pool.md>)

### AI overview

Mercado Libre built continuous profiling to help teams detect and address recurring performance problems across about 35,000 microservices. It chose low-overhead sampling profilers, preserving language-specific data while standardizing processing around Google's pprof format. A sidecar accesses internal profile routes; collection is limited to a few seconds every few minutes, with only one pod profiled per high-availability cluster. Developers can view profiles and differential flamegraphs in Grafana, while an AI assistant explains behavior and flags bottlenecks. An engine detects runtime-specific patterns such as elevated GC CPU use, and selected findings can trigger AI-generated pull requests. Profiles also support Go Profile-Guided Optimization; the article reports 4-12% CPU improvements in initial use. Collection covers about 90% of Java and Go services in Fury and produces 4-4.5 million profiles daily.

### Source excerpt

We continue our series on Performance Engineering at Mercado Libre. In previous articles, we discussed how we crafted an observability culture across the company, how performance relates to other observability signals, and how the Performance Engineering team partners with Business Units to enhance platform efficiency. Today, we'll show how we built a continuous profiling platform for 35,000 microservices and how we started turning profiles into automated fixes. Context Our goal in the Performance Engineering team is threefold: to ensure uptime; to improve the end-user experience by reducing latency; to reduce computing costs. As a cross-functional team, we usually work with application owners to achieve these goals. In our two years of existence, our joint efforts have taken us through countless incidents and bottlenecks. Each problem is unique, but over time, we've seen some common patterns: high memory allocation, lack of garbage collection (GC) tuning, thread pool saturation, blocking I/O, and heavy workloads processing repeated tasks. Image 1: Typical flamegraph of high CPU usage replacing string patterns Trained eyes spot these signals quickly. But two eyeballs won't scale to thousands of services. Mercado Libre is an ever-growing company, with about 35,000 microservices, 30,000 deploys per day, and more than 16,000 people in IT roles. What are the odds that a performance issue found on one microservice doesn't exist in another? Or at least a similar issue? We often encounter systems with issues that are easy to fix but hard to detect (unless you have the right tools). It became clear we had to scale. We needed a platform-level solution that would let teams self-diagnose and self-tune. By the end of this article, you'll see how we built that and how we now automate both detection and fixes for certain classes of issues. Continuous profiling After setting our goal to improve performance tooling, we developed our own continuous profiling solution. Why profiling,

## Using Clojure channels to increase throughput

DevFeed: [Using Clojure channels to increase throughput](<https://devfeed.tech/articles/using-clojure-channels-to-increase-throughput-30521.md>)

Original publisher: [Read original article](<https://medium.com/helpshift-engineering/using-clojure-channels-to-increase-throughput-c051cc7f9893?source=rss----3229f31ca4f4---4>)

Author: Abhinav Dubey

Published: 2025-05-28T10:07:12Z

Content type: article

Language: en

Sources: [Helpshift](<https://devfeed.tech/sources/helpshift.md>)

Topics: [Clojure](<https://devfeed.tech/topics/clojure.md>), [multithreading](<https://devfeed.tech/topics/multithreading.md>), [Apache Kafka](<https://devfeed.tech/topics/apache-kafka.md>), [threadpools](<https://devfeed.tech/topics/threadpools.md>), [Messaging](<https://devfeed.tech/topics/messaging.md>), [Benchmark](<https://devfeed.tech/topics/benchmark.md>), [performance-engineering](<https://devfeed.tech/topics/performance-engineering.md>), [LLM evaluation / benchmarking](<https://devfeed.tech/topics/llm-evaluation-benchmarking.md>), [Grafana](<https://devfeed.tech/topics/grafana.md>)

Tags: [channel](<https://devfeed.tech/tags/channel.md>), [clojure](<https://devfeed.tech/tags/clojure.md>), [concurrency](<https://devfeed.tech/tags/concurrency.md>), [core-async](<https://devfeed.tech/tags/core-async.md>), [grafana](<https://devfeed.tech/tags/grafana.md>), [kafka](<https://devfeed.tech/tags/kafka.md>), [kafka-consumer](<https://devfeed.tech/tags/kafka-consumer.md>), [multithreading](<https://devfeed.tech/tags/multithreading.md>), [parallelism](<https://devfeed.tech/tags/parallelism.md>), [performance](<https://devfeed.tech/tags/performance.md>), [single-threaded](<https://devfeed.tech/tags/single-threaded.md>), [throughput](<https://devfeed.tech/tags/throughput.md>), [worker](<https://devfeed.tech/tags/worker.md>)

### AI overview

A Clojure Kafka consumer can process messages faster by placing them on a `core.async` channel and having worker threads take and process them; the example uses blocking `>!!` and `<!!` operations and `future`. With 1,000 events, processing time fell from 16m 30s with one worker to 5m 42s with three and 5m with ten. For 2,500 events, it fell from 40m 28s to 13m 39s with three workers and 5m 6s with ten. More workers increased throughput but also raised CPU use and system load, so the article recommends tuning thread count to system capacity. Benchmarks ran on one machine, which the author says is sufficient to gauge the impact of adding workers but may not represent production.

### Source excerpt

When building systems that process large volumes of messages synchronously, performance bottlenecks can quickly become a challenge specially with single-threaded designs. In this post, we'll look at how leveraging worker threads in a Clojure-based Kafka consumer can significantly boost throughput & reduce total processing time. Using simple concurrency primitives, it's possible to achieve parallelism & scale gracefully, all while keeping the codebase clean & maintainable. We'll start with a baseline, introduce worker threads using Clojure's core.async & measure the impact. Setup & Context Kafka & Zookeeper For observability: Grafana Kafka producer: A simple script that sends messages to a Kafka topic at a configurable rate (messages per minute) for a fixed duration. After each event is pushed, a counter metric is emitted Kafka consumer: A simple script that listens to a topic & consumes messages & simulates processing time finding square-root of a number (henceforth, assume that it takes ~1 second to find the square root) . A counter metric is emitted after processing each message The Baseline: Single-Threaded Consumer If each message takes t seconds to process & there are n messages, total processing time becomes n x t seconds. This provides a clean baseline to evaluate the impact of using channel moving forward. Adding workers with core.asyncValues are conveyed on queue-like channels. By default channels require producer and consumer to rendezvous for the transfer of a value through the channel https://clojuredocs.org/clojure.core.async To improve throughput, we introduce parallelism using Clojure's core.async channels. Messages from Kafka are fed into a channel, & multiple worker threads read from this channel to process messages concurrently Here, we used >!! (blocking put) & <!! (blocking take) to communicate via channels & future to execute the business-logic on a separate thread Who gets blocked & when : The thread putting message into the channel will get bl

## Worker Pooling -- 5x performance for CPU-intensive JavaScript workloads

DevFeed: [Worker Pooling -- 5x performance for CPU-intensive JavaScript workloads](<https://devfeed.tech/articles/worker-pooling-5x-performance-for-cpu-intensive-javascript-workloads-17862.md>)

Original publisher: [Read original article](<https://encore.dev/blog/worker-pooling>)

Author: André Eriksson

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

Content type: release

Language: en

Sources: [Encore Updates](<https://devfeed.tech/sources/encore-updates.md>)

Topics: [threadpools](<https://devfeed.tech/topics/threadpools.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [Node.js](<https://devfeed.tech/topics/node-js.md>), [JavaScript](<https://devfeed.tech/topics/javascript.md>), [Distributed Systems & Parallel Computing](<https://devfeed.tech/topics/distributed-systems-parallel-computing.md>)

Tags: [applications](<https://devfeed.tech/tags/applications.md>), [architecture](<https://devfeed.tech/tags/architecture.md>), [benchmark](<https://devfeed.tech/tags/benchmark.md>), [code](<https://devfeed.tech/tags/code.md>), [complexity](<https://devfeed.tech/tags/complexity.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [cpu](<https://devfeed.tech/tags/cpu.md>), [database](<https://devfeed.tech/tags/database.md>), [demo](<https://devfeed.tech/tags/demo.md>), [event-loop](<https://devfeed.tech/tags/event-loop.md>), [frameworks](<https://devfeed.tech/tags/frameworks.md>), [high-performance](<https://devfeed.tech/tags/high-performance.md>), [http](<https://devfeed.tech/tags/http.md>), [http-client](<https://devfeed.tech/tags/http-client.md>), [improvement](<https://devfeed.tech/tags/improvement.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [launch](<https://devfeed.tech/tags/launch.md>), [launch-week](<https://devfeed.tech/tags/launch-week.md>), [performance](<https://devfeed.tech/tags/performance.md>), [worker](<https://devfeed.tech/tags/worker.md>)

### AI overview

Encore.ts Worker Pooling coordinates multiple Node.js worker threads through its multi-threaded Rust runtime to run CPU-intensive JavaScript workloads across multiple event loops. A simple project configuration enables automatic worker creation, request distribution and load balancing, and Pub/Sub message distribution; developers need not manage thread pools or coordination themselves. In tests, real-world applications limited by Node.js single-threaded performance achieved up to 5x improvement over Encore.ts single-threaded mode. The excerpt notes that sharing resources such as database pools, HTTP connections, and observability integrations can be difficult with other multithreading approaches, but cuts off before explaining the comparison or its tradeoffs in detail.

### Source excerpt

Launch Week Day 5

## Coroutines on Android

DevFeed: [Coroutines on Android](<https://devfeed.tech/articles/coroutines-on-android-23898.md>)

Original publisher: [Read original article](<https://medium.com/smg-real-estate/coroutines-on-android-d3e3413e6aa7?source=rss----2186e5b9bd8f---4>)

Author: Stevan Milovanovic

Published: 2022-05-20T12:36:23Z

Content type: article

Language: en

Sources: [Homegate Engineering Blog - Medium](<https://devfeed.tech/sources/homegate-engineering-blog-medium.md>)

Topics: [Coroutines](<https://devfeed.tech/topics/coroutines.md>), [threadpools](<https://devfeed.tech/topics/threadpools.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [scheduling](<https://devfeed.tech/topics/scheduling.md>), [Structured concurrency](<https://devfeed.tech/topics/structured-concurrency.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [android-apps](<https://devfeed.tech/tags/android-apps.md>), [asynchronous](<https://devfeed.tech/tags/asynchronous.md>), [background](<https://devfeed.tech/tags/background.md>), [context](<https://devfeed.tech/tags/context.md>), [coroutine-testing](<https://devfeed.tech/tags/coroutine-testing.md>), [coroutines](<https://devfeed.tech/tags/coroutines.md>), [dispatcher](<https://devfeed.tech/tags/dispatcher.md>), [job](<https://devfeed.tech/tags/job.md>), [kotlin-coroutines](<https://devfeed.tech/tags/kotlin-coroutines.md>), [launch](<https://devfeed.tech/tags/launch.md>), [networking](<https://devfeed.tech/tags/networking.md>), [parallel](<https://devfeed.tech/tags/parallel.md>), [processing](<https://devfeed.tech/tags/processing.md>), [scope](<https://devfeed.tech/tags/scope.md>), [thread](<https://devfeed.tech/tags/thread.md>), [thread-pools](<https://devfeed.tech/tags/thread-pools.md>)

### AI overview

The excerpt presents coroutines as a lightweight alternative to creating and stopping resource-intensive threads, and says they simplify asynchronous code by making parallel work resemble sequential code. It explains that scopes provide context and propagate cancellation to coroutines launched with builders such as `launch` and `async`; suspending functions allow coroutine work to pause; and a `Job` provides lifecycle control through cancellation and joining, with parent-child cancellation relationships. A dispatcher selects the thread or thread pool. The introduction says the article will demonstrate networking and background processing, but those implementation details are not included in the supplied excerpt.

### Source excerpt

Coroutines on Android In this article I'll try to explain why coroutines are useful and why would you want to use them in your project. After we go through the most important concepts of coroutines, I'll show you how I used coroutines to implement networking and background processing in the example project. First of all, you might ask yourself, why we want to use coroutines over threads? Main problem with threads is that they are resource intensive, meaning it takes a lot of resources to start a thread, stop a thread. Meanwhile, coroutines are lightweight threads, since they use thread pools. Another benefit of coroutines is that they greatly simplify asynchronous code. Callbacks and synchronisation are very easy to use. In fact, they make parallel programming look very much like sequential programming. Coroutines can be paused and resumed at any time, on a number of threads. And lastly, since coroutines are based on a few fairly easy to grasp concepts, their syntax is simple and easy to use. Here are the main concepts we need to explain about coroutines: Scope Coroutine scope, as its name says, defines a scope for new coroutines. Every coroutine builder (like launch and async) is an extension on CoroutineScope and inherits its coroutineContext to automatically propagate all its elements and cancellation. Context Coroutine context represents the context of its scope. Context is encapsulated by the scope and used for implementation of coroutine builders that are extensions on the scope. Scope provides a context in which the coroutine runs (state of the coroutine which provides variables, functionality of the coroutine etc.). Suspending functions Suspending functions are functions that can be run in a coroutine. They make callbacks seamless. They can be run in a coroutine (can be suspended) and that is why they can provide functionalities which have to be run in parallel. Job Job is a handle on that coroutine (on the piece of code which runs in the background). A laun

## Reduce, Reuse & Recycle your thread pools ♻

DevFeed: [Reduce, Reuse & Recycle your thread pools ♻](<https://devfeed.tech/articles/reduce-reuse-recycle-your-thread-pools-25909.md>)

Original publisher: [Read original article](<https://chao2zhang.medium.com/reduce-reuse-recycle-your-thread-pools-%EF%B8%8F-81e2f54d8a1d?source=rss-d19045640fe------2>)

Author: Chao Zhang

Published: 2021-12-20T18:26:36Z

Content type: tutorial

Language: en

Sources: [Chao Zhang](<https://devfeed.tech/sources/stories-by-chao-zhang-on-medium.md>)

Topics: [threadpools](<https://devfeed.tech/topics/threadpools.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [mobile-app-performance](<https://devfeed.tech/topics/mobile-app-performance.md>), [Coroutines](<https://devfeed.tech/topics/coroutines.md>), [ExecutorService](<https://devfeed.tech/topics/executorservice.md>), [Library](<https://devfeed.tech/topics/library.md>), [scheduling](<https://devfeed.tech/topics/scheduling.md>), [Jetpack](<https://devfeed.tech/topics/jetpack.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [app-development](<https://devfeed.tech/tags/app-development.md>), [app-performance](<https://devfeed.tech/tags/app-performance.md>), [concurrency](<https://devfeed.tech/tags/concurrency.md>), [costs](<https://devfeed.tech/tags/costs.md>), [health](<https://devfeed.tech/tags/health.md>), [java](<https://devfeed.tech/tags/java.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [libraries](<https://devfeed.tech/tags/libraries.md>), [manage](<https://devfeed.tech/tags/manage.md>), [memory](<https://devfeed.tech/tags/memory.md>), [memory-pressure](<https://devfeed.tech/tags/memory-pressure.md>), [okhttp](<https://devfeed.tech/tags/okhttp.md>), [overhead](<https://devfeed.tech/tags/overhead.md>), [performance](<https://devfeed.tech/tags/performance.md>), [pool](<https://devfeed.tech/tags/pool.md>), [reduce](<https://devfeed.tech/tags/reduce.md>), [resources](<https://devfeed.tech/tags/resources.md>), [reuse](<https://devfeed.tech/tags/reuse.md>), [runtime](<https://devfeed.tech/tags/runtime.md>), [schedules](<https://devfeed.tech/tags/schedules.md>), [thread](<https://devfeed.tech/tags/thread.md>), [thread-pools](<https://devfeed.tech/tags/thread-pools.md>)

### AI overview

Android thread pools can be consolidated to reduce thread count and resource overhead, but merging changes concurrency behavior and requires auditing every library. The sample app routes OkHttp (including Retrofit and Coil), WorkManager, and coroutines through a shared ThreadPoolExecutor; WorkManager needs on-demand initialization and a custom Configuration.Provider, while coroutine dispatchers must be injectable and converted from the executor. The sample's active threads fell from 35 to 19. A separate A/B test in a large app measured a 2% reduction in 90th-percentile cold launch time, a context-specific result. Pool defaults differ, and missed configuration can leave extra pools active; the author recommends naming and auditing threads, validating changes with A/B tests, and guarding against regressions.

### Source excerpt

Photo: Héctor J. Rivas from Unsplash Real-world applications today are mostly multi-threaded. This means developers should be mindful of managing the concurrency of their applications. Mastering the threading can help boost an app's performance. On the other hand, using concurrency without fully understanding it could lead to problems that negatively impact the app's health. For Android applications, every thread is mapped to a system-level thread at runtime. Each thread costs a minimum of 64k of memory on Android, If we always create a thread for any new asynchronous task, we will create memory pressure on the app. The app performance may suffer because spawning up new threads and context switching among threads are both taking up time and resources. If a thread is referenced even if it is not active, it will be kept in memory and can't be cleaned up by the garbage collector. Thread pools can help us manage concurrency more efficiently. ThreadPoolExecutor creates a pool of worker threads and schedules the tasks for them to execute. It can grow the pool size to meet the demand as new tasks arrive, and it can shrink the pool when threads are idle and no longer need to be kept alive. Thread pool, therefore, improves the app performance by reducing the per-task overhead and controls the resource usage by bounding the resources. Thread pool seems the solution to our concurrency headache, and many libraries have adopted this technique, such as OkHttp and AndroidX WorkManager. Each library maintains its own thread pool by default. When we include these libraries in our application, since each library spins up new threads by itself without the awareness of other thread pools, we come full circle. Hundreds of threads exist in our application because those libraries do not know each other. In this story, we are going to walk through an example of configuring libraries to share a common thread pool. We will also summarize the benefits and costs of managing thread pools, as it

## Anonymous CompletableFuture threads with burstable pods

DevFeed: [Anonymous CompletableFuture threads with burstable pods](<https://devfeed.tech/articles/anonymous-completablefuture-threads-with-burstable-pods-26081.md>)

Original publisher: [Read original article](<https://blog.arkey.fr/2020/12/11/completablefuture-with-burstable-pods/>)

Author: brice.dutheil@gmail.com (Brice Dutheil)

Published: 2020-12-11T13:05:00Z

Content type: article

Language: en

Sources: [The Coffee Workshop](<https://devfeed.tech/sources/the-coffee-workshop.md>)

Topics: [threadpools](<https://devfeed.tech/topics/threadpools.md>), [multithreading](<https://devfeed.tech/topics/multithreading.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [JDK Flight Recorder](<https://devfeed.tech/topics/jdk-flight-recorder.md>)

Tags: [completablefuture](<https://devfeed.tech/tags/completablefuture.md>), [container](<https://devfeed.tech/tags/container.md>), [kubernetes](<https://devfeed.tech/tags/kubernetes.md>), [threads](<https://devfeed.tech/tags/threads.md>)

### AI overview

A JFR recording showed many short-lived anonymous threads, whose allocation events helped trace them to CompletableFuture tasks using the default ForkJoinPool. The excerpt says that when the JVM sees no more than one processor, the pool may create a new thread for each task; a Kubernetes CPU setting of two is mentioned, but the excerpt does not establish what processor count the JVM saw in that case. It identifies two possible fixes: pass an executor to the code or configure the default pool's parallelism. The text ends before detailing the configuration method.

### Source excerpt

It all started when opening a JFR recording, I noticed a very large and growing number of very short lived threads.

## Pool Go Routines To Process Task Oriented Work

DevFeed: [Pool Go Routines To Process Task Oriented Work](<https://devfeed.tech/articles/pool-go-routines-to-process-task-oriented-work-22072.md>)

Original publisher: [Read original article](<https://www.ardanlabs.com/blog/2013/09/pool-go-routines-to-process-task.html>)

Published: 2013-09-14T00:00:00Z

Content type: article

Language: en

Sources: [William Kennedy](<https://devfeed.tech/sources/william-kennedy.md>)

Topics: [threadpools](<https://devfeed.tech/topics/threadpools.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [scheduling](<https://devfeed.tech/topics/scheduling.md>)

Tags: [applications](<https://devfeed.tech/tags/applications.md>), [ardan-labs](<https://devfeed.tech/tags/ardan-labs.md>), [bandwidth](<https://devfeed.tech/tags/bandwidth.md>), [blog](<https://devfeed.tech/tags/blog.md>), [channel](<https://devfeed.tech/tags/channel.md>), [cpu](<https://devfeed.tech/tags/cpu.md>), [go](<https://devfeed.tech/tags/go.md>), [go-programming](<https://devfeed.tech/tags/go-programming.md>), [go-runtime](<https://devfeed.tech/tags/go-runtime.md>), [golang](<https://devfeed.tech/tags/golang.md>), [goroutines](<https://devfeed.tech/tags/goroutines.md>), [impact](<https://devfeed.tech/tags/impact.md>), [less](<https://devfeed.tech/tags/less.md>), [manage](<https://devfeed.tech/tags/manage.md>), [number](<https://devfeed.tech/tags/number.md>), [operating-system](<https://devfeed.tech/tags/operating-system.md>), [pattern](<https://devfeed.tech/tags/pattern.md>), [performance](<https://devfeed.tech/tags/performance.md>), [performance-tuning](<https://devfeed.tech/tags/performance-tuning.md>), [processing](<https://devfeed.tech/tags/processing.md>), [programming](<https://devfeed.tech/tags/programming.md>), [queue](<https://devfeed.tech/tags/queue.md>), [queues](<https://devfeed.tech/tags/queues.md>), [resources](<https://devfeed.tech/tags/resources.md>), [storage](<https://devfeed.tech/tags/storage.md>)

### AI overview

A Go work pool limits and reuses goroutines so task processing does not overwhelm available resources. In the described pattern, the main routine submits 100 tasks; the pool queues them and assigns each to an available goroutine, which returns to the pool when finished. The goroutine count and queue capacity can be configured to tune performance. The excerpt argues that launching goroutines without limits can slow work and harm system responsiveness, and says tuning should consider both completion speed and the overall impact on the application and platform. The author notes a preference for an unbuffered-channel implementation, but this excerpt does not describe that alternative.

### Source excerpt

After working in Go for some time now, I learned how to use an unbuffered channel to build a pool of goroutines. I like this implementation better than what is implemented in this post. That being said, this post still has value in what it describes. External resource on github.com: https://github.com/goinggo/work On more than one occasion I have been asked why I use the Work Pool pattern. Why not just start as many Go routines as needed at any given time to get the work done? My answer is always the same. Depending on the type of work, the computing resources you have available and the constraints that exist within the platform, blindly throwing Go routines to perform work could make things slower and hurt overall system performance and responsiveness. Every application, system and platform has a breaking point. Resources are not unlimited, whether that is memory, CPU, storage, bandwidth, etc. The ability for our applications to reduce and reuse resources is important. Work pools provide a pattern that can help applications manage resources and provide performance tuning options. Here is the pattern behind the work pool: