Skip to content

[ML] Inference plugin's utility threadpool executing when no tasks to run #126853

@jonathan-buttner

Description

@jonathan-buttner

The inference plugin leverages a thread to check for inference requests that are waiting to send based on the rate limit settings. If there are no tasks to send the thread sleeps and wakes up and checks later.

This issue is to investigate if we can improve the code to avoid sleeping and doing nothing. We should look into transitioning to how the TransformScheduler handles it by doing a scheduleWithFixedDelay. We should also confirm that the threadpool is not utilized until a request is sent.

In 8.18 I believe this will be near immediately because the EIS authorization request is sent after a node boots up.

https://github.com/elastic/elasticsearch/blob/main/x-pack/plugin/transform/src/main/java/org/elasticsearch/xpack/transform/transforms/scheduling/TransformScheduler.java#L101

Metadata

Metadata

Assignees

No one assigned

    Labels

    :mlMachine learning>bugFeature:GenAIFeatures around GenAITeam:MLMeta label for the ML team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions