One for All Thread Pool - yatp

Описание к видео One for All Thread Pool - yatp

slide: https://docs.google.com/presentation/...

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.

Комментарии

Информация по комментариям в разработке