apache/kyuubi

[TASK][MEDIUM] Engine adaptive pool size

Open

#5,373 建立於 2023年10月8日

在 GitHub 查看
 (6 留言) (0 反應) (1 負責人)Scala (996 fork)batch import
hacktoberfest

倉庫指標

Star
 (2,332 star)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

Code of Conduct

Search before creating

  • I have searched in the task list and found no similar tasks.

Mentor

  • I have sufficient knowledge and experience of this task, and I volunteer to be the mentor of this task to guide contributors to complete the task.

Skill requirements

  • Basic knowledge of Scala programming language
  • Familiar with the architect of Apache Kyuubi

Background and Goals

In kyuubi.engine.share.level non-CONNECTION mode, how many engines the Kyuubi server starts is determined by kyuubi.engine.pool.size.

The engine selection policy is determined by kyuubi.engine.pool.selectPolicy. The default is RANDOM, which means randomly selecting a number within the engine pool size range and checking whether the engine corresponding to this number has been created. If not, create one.

When kyuubi.engine.pool.size is a relatively large value, it may randomly create many engines.

In addition, kyuubi.session.engine.idle.timeout configures a relatively large idle time, so that once the engine is created, it will be slower to release the engine.

This selection strategy is a bit of a waste of resources, especially since it takes a while to start the spark cluster mode.

Implementation steps

We can expose some information about the engine load in the Engine. When the server selects the engine, it will decide whether to use a new engine or reuse the old engine based on the load.

Additional context

Original reporter is @cxzl25

Introduction of https://github.com/apache/kyuubi/issues/6232

貢獻者指南