Hi Flyte community, Is 500MiB roughly expected fo...
# ask-the-community
j
Hi Flyte community, Is 500MiB roughly expected for the hello_world.py workflow in the flyte cookbook? Running locally without Flyte (but with Flyte annotations) seems to use 140MiB (but when I execute remotely through Flyte with
./bin/pyflyte run --remote core/flyte_basics/hello_world.py my_wf
an allocation of 300MiB results in OOM, 500MiB allowed workflow to complete successfully). Running hello_world.py without importing flyte modules seems to use 0.55MiB. Are there potential settings I could look into to optimize memory usage? Looking into using Flyte for long running operations, so reducing memory overhead as much as possible would help reduce costs for these long running concurrent workflows.
k
Hmm we cannot tell why it’s using more memory
Could be fsspec connecting to s3
Important is to understand if overhead is constant
This is a great question though, we would love a memory profile?
j
Hi Ketan, this is the memory profile from annotating my_wf in hello_world.py:
Copy code
Filename: core/flyte_basics/hello_world.py

Line #    Mem usage    Increment  Occurrences   Line Contents
=============================================================
    28    142.3 MiB    142.3 MiB           1   @workflow
    29                                         @profile
    30                                         def my_wf() -> str:
    31    142.3 MiB      0.0 MiB           1       res = say_hello()
    32    142.3 MiB      0.0 MiB           1       return res


Filename: core/flyte_basics/hello_world.py

Line #    Mem usage    Increment  Occurrences   Line Contents
=============================================================
    28    142.4 MiB    142.4 MiB           1   @workflow
    29                                         @profile
    30                                         def my_wf() -> str:
    31    142.4 MiB      0.1 MiB           1       res = say_hello()
    32    142.4 MiB      0.0 MiB           1       return res
Profile for hello_world.py without workflow/task annotations:
Copy code
Filename: hello_world_test.py

Line #    Mem usage    Increment  Occurrences   Line Contents
=============================================================
    25     19.0 MiB     19.0 MiB           1   @profile
    26                                         def my_wf() -> str:
    27     19.0 MiB      0.0 MiB           1       res = say_hello()
    28     19.0 MiB      0.0 MiB           1       return res
k
Ya I was running it today to and I found that pandas and ipython and docker take like 90MB to load, so we will work to reduce them as we can
But, I don’t know in the container will try that too
148 Views