One for All Thread Pool - yatp

  • 10:50 - 11:15 (JST)

    • Session Language: 日本語
    • Caption Language: English

This talk will discuss yatp, the unified thread pool in TiKV. In the past, there were many thread pools in TiKV, in which 2 kinds of thread pools serve read requests in TiKV.

  • Coprocessor Pool
  • Storage Pool

In practice, there are tasks with various priorities, e.g. for the fast tasks, latency is an important metric. When some CPU-intensive tasks being executed, the operating system will allocate more CPU time to their thread pool, thus the latency of fast tasks increases. The increment of fast tasks even affects the production stability, it’s a great drawback in TiKV before.

yatp, the unified thread pool, can replace the multiple thread pools in TiKV. Due to the unified thread pool, when the tasks need to be re-balanced, it’s scheduled in user mode with our control instead of kernel mode. This strategy is known as work-stealing. Further, when some particular tasks have high CPU usage, other tasks can avoid being starving and still being executed in an expected way.

In a word, a unified thread pool can make the database system use CPU resources in a better way with less overhead. We’ll talk about how yatp solves the starving problem.

Share it on


Bio

Tong Mu

Tong Mu

I’m Tong Mu and am working in the distributed transaction team in TiDB. My research interest is the transaction’s isolation theory, submission protocol, and concurrency. We face many kinds of stability issues in the database system’s development and the unified thread pool is one that can increase the stability of the system. I’m expecting to share the works with you.

Copyright © Rust.Tokyo 2021 all rights reserved.


特定商取引法に基づく表示

Twitterもぜひフォローしてください! @rustlang_tokyo

お問い合わせ: rust-tokyo-staff@googlegroups.com

過去の開催