Skip to content

fix: Cap azcopy memory usage at 80% of container memory #6177

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

adamrtalbot
Copy link
Collaborator

@adamrtalbot adamrtalbot commented Jun 6, 2025

azcopy was consuming more memory than the hard cap of the container memory. This PR does two things:

  • Downloads the files in linear, since azcopy is super fast anyway
  • Caps it to 80% of the container memory, which should be sufficient for most cases while preventing excessive memory usage.

Fixes #6161

azcopy was consuming more memory than the hard cap of the container memory. This PR caps it to 80% of the container memory, which should be sufficient for most cases while preventing excessive memory usage.

Fixes #6161

Signed-off-by: adamrtalbot <[email protected]>
Copy link

netlify bot commented Jun 6, 2025

Deploy Preview for nextflow-docs-staging canceled.

Name Link
🔨 Latest commit 07fe822
🔍 Latest deploy log https://app.netlify.com/projects/nextflow-docs-staging/deploys/68432dd19a56fd0008a773bc

@adamrtalbot
Copy link
Collaborator Author

Doesn't work yet

@adamrtalbot adamrtalbot closed this Jun 6, 2025
…loaded by the same process

Signed-off-by: adamrtalbot <[email protected]>
@adamrtalbot adamrtalbot reopened this Jun 6, 2025
@adamrtalbot
Copy link
Collaborator Author

Pipeline to test:

process create_file {
    machineType "Standard_D16D_v5"
    memory 1.GB
    container "ubuntu:23.10"

    input:
        val n

    output:
        path "test.file", emit: "tmpFile"

    script:
    """
    fallocate -l 50G test.file
    """
}

process do_sth {
    machineType "Standard_D16d_v5"
    memory 1.GB
    container "ubuntu:23.10"

    input:
    path "???"

    output:
    path "out.txt"

    script:
    """
    ls > out.txt
    """
}

workflow {
    n_ch = Channel.of(1..3)
    create_file(n_ch)
    do_sth(create_file.out.collect())
}

@adamrtalbot adamrtalbot changed the title feat: Cap azcopy memory usage at 80% of container memory fix: Cap azcopy memory usage at 80% of container memory Jun 6, 2025
@adamrtalbot
Copy link
Collaborator Author

Does not fix the problem again

@adamrtalbot adamrtalbot closed this Jun 6, 2025
azcopy is extremely efficient anyway, so why not just loop the download and uploads? This shouldn't be too much slower since the bottleneck is memory.

Signed-off-by: adamrtalbot <[email protected]>
@adamrtalbot
Copy link
Collaborator Author

THIS TIME.

@adamrtalbot adamrtalbot reopened this Jun 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Restrict azcopy memory usage by task setting
1 participant