Add LEAST_WASTED task memory killer #12242
Conversation
...no-main/src/main/java/io/trino/memory/TotalReservationOnBlockedNodesLowMemoryTaskKiller.java
Outdated
Show resolved
Hide resolved
...no-main/src/test/java/io/trino/memory/TestTotalReservationOnBlockedNodesLowMemoryKiller.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/memory/LeastWastedEffortLowMemoryTaskKiller.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
It's a bit weird to have multiple low memory killers, unless we plan to support pipelined execution and fault tolerant execution in the same cluster.
There was a problem hiding this comment.
I agree that if properly used cluster only one should trigger. But currently, we are not forcibly forbidding users from running both types of workloads in the same cluster, so we need to handle that in code I think.
There was a problem hiding this comment.
Does it make sense to remove the session property for retry-policy (or at least don't allow hybrid mode) right now? cc @arhimondr
There was a problem hiding this comment.
Actually I don't mind removing the session property since currently we don't support mixed workloads. Then based on the retry-policy value we may inject the killer we need to keep it simple. However we would still probably need two configuration properties, one that defines what killer to use for killing tasks and the other one for queries as they are going to have different defaults. We can pick one based on the retry-policy then. It feels like it would make things simpler.
There was a problem hiding this comment.
It could be done - but we would need to rework testing. In FTE tests we currently run query with and without retries. We switch the mode using session property. We would need to migrate approach to have two query runners - can be done but tests will be a bit longer and would require more resources (we need two query runners up and running).
I will see how easy it is to change it in a separate PR.
f33410e to
576bc64
Compare
|
AC |
core/trino-main/src/main/java/io/trino/memory/LeastWastedEffortLowMemoryTaskKiller.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/memory/LowMemoryKiller.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/memory/LowMemoryKiller.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/server/CoordinatorModule.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/memory/ClusterMemoryManager.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Actually I don't mind removing the session property since currently we don't support mixed workloads. Then based on the retry-policy value we may inject the killer we need to keep it simple. However we would still probably need two configuration properties, one that defines what killer to use for killing tasks and the other one for queries as they are going to have different defaults. We can pick one based on the retry-policy then. It feels like it would make things simpler.
...o-main/src/main/java/io/trino/memory/TotalReservationOnBlockedNodesLowMemoryQueryKiller.java
Outdated
Show resolved
Hide resolved
...no-main/src/main/java/io/trino/memory/TotalReservationOnBlockedNodesLowMemoryTaskKiller.java
Outdated
Show resolved
Hide resolved
b1fb8ed to
e31b684
Compare
There was a problem hiding this comment.
nit: TestLeastWastedEffortTaskLowMemoryKiller (same for other tests)
e31b684 to
a088ee2
Compare
|
@jhlodin could you PTAL at doc changes? |
There was a problem hiding this comment.
Seems like this should be "Set the query.low-memory-task-killer.policy". It's in the context of "recommended changes for a TASK retry policy" so we can be specific about which one.
There was a problem hiding this comment.
In this situation, are any changes recommended to the query task killer policy?
There was a problem hiding this comment.
We do not care about query.low-memory-query-killer.policy after we split properties. Fixed the typo.
There was a problem hiding this comment.
What's the interaction between this and the other low memory killer property if both are set?
There was a problem hiding this comment.
From context it seems like this property is only used when retry-policy is set to TASK. If that's the case, should add a sentence to this description saying that, and whether the query low memory killer does anything in that case.
There was a problem hiding this comment.
What we should be sayint to users is:
query.low-memory-task-killer.policy is used whenretry_policy is TASK.
query.low-memory-query-killer.policy is used otherwise.
In reality it is that:
query.low-memory-task-killer.policy is used for queries which were run with retry_policy set to tasks and query.low-memory-query-killer.policy for other queries - but we officially do not support mixed workloads so we should not word it like that.
There was a problem hiding this comment.
O - actualy we use such wording already:
Does not apply for queries with task level retries enabled (``retry-policy=TASK``)
I will keep it consistent for now then
There was a problem hiding this comment.
a value different than NONE
|
What will happen to clusters that currently have an explicit configuration of the now-legacy |
Nope - you can still use legacy config keys - you will just get a warning during startup in logs. |
Add task low memory killer which picks ups a task which has highest used-memory/task-runtime ratio.
a088ee2 to
2c1025e
Compare
Fixes #11952
Description
Improvement
core
Documentation
( ) No documentation is needed.
(x) Sufficient documentation is included in this PR.
( ) Documentation PR is available with #prnumber.
( ) Documentation issue #issuenumber is filed, and can be handled later.
Release notes
( ) No release notes entries required.
(x) Release notes entries required with the following suggested text: