Erik Amundson
09/08/2021, 8:49 PMimport prefect
@prefect.task
def do_nothing(n):
pass
with prefect.Flow("Dummy Flow") as flow:
listy = list(range(200000))
do_nothing.map(listy)
The scheduler pod runs out of memory after around 300 tasks, the screenshot of the dask dashboard is attached.
Has anyone ran into this issue or have any ideas for a fix? We normally run prefect 0.14.16 but I've tried on both 0.14.16 and latest (0.15.5) with the same results.Kevin Kho
Erik Amundson
09/08/2021, 9:07 PMDaskExecutor(
cluster_class="dask_kubernetes.KubeCluster",
cluster_kwargs={
"pod_template": make_pod_spec(
image="my/image:tag",
memory_limit="3G",
memory_request="3G",
cpu_limit=0.9,
cpu_request=0.9,
extra_pod_config={
"imagePullSecrets": [{"name": "regcred"}],
"tolerations": [
{
"key": "k8s.dask.org_dedicated",
"operator": "Equal",
"effect": "NoSchedule",
"value": "worker",
}
],
},
),
"env": {"MALLOC_TRIM_THRESHOLD_": "0"},
"n_workers": 10,
},
)
with the run configuration:
KubernetesRun(
image=f"my/image:tag",
image_pull_secrets=["regcred"],
)
Erik Amundson
09/08/2021, 9:08 PMKevin Kho
MALLOC_TRIM_THRESHOLD
also. Will ask people for answers.Kevin Kho
MALLOC_TIM_THRESHOLD_
does help most of the time. I’ve seen this issue before and I thought it was resolved (haven’t seen it in this Slack channel lately). That said, I’ll try taking a look at it but this will probably take a while.
If you need something immediately, You likely need to batch up the elements of the list before passing it to the mapped task so that you map over a lower amount of elements and have a lower number futures returnedErik Amundson
09/09/2021, 3:50 PMKevin Kho
StartFlowRun
on the batches