Skip to content
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

Merge speed has not been increased by '--threads' option ? #2340

Open
Jerry-Wang-Dog opened this issue Dec 17, 2024 · 2 comments
Open

Merge speed has not been increased by '--threads' option ? #2340

Jerry-Wang-Dog opened this issue Dec 17, 2024 · 2 comments

Comments

@Jerry-Wang-Dog
Copy link

bcftools merge ---file-list list.txt -O z -o output.vcf --threads 16

Why the CPU% is only about 130%, but Virtual Memory has increased to 60G?
What‘s important is that the MERGE speed has not been increased!!!

(My file-list contains 200 samples with vcf.gz format. There are infomation of each site in those VCF files, not only variants site)

@davmlaw
Copy link

davmlaw commented Dec 18, 2024

Hi, it might help to run some benchmarks with and without threads recording run time, CPU, memory and I/O. This provides context to "increased to 60G" (ie how much ram it used before)

/usr/bin/time --verbose bcftools merge ---file-list  list.txt -O z -o output.vcf  2> benchmark_no_threads.txt
/usr/bin/time --verbose bcftools merge ---file-list  list.txt -O z -o output.vcf --threads 16 2> benchmark_threads.txt

You could also try 2/4/8 threads and see what happens there

@jcm6t
Copy link

jcm6t commented Dec 18, 2024

Per the bcftools manual, Common Options

--threads INT
Use multithreading with INT worker threads. The option is currently used only for the compression of the output stream, only when --output-type is b or z. Default: 0.

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

No branches or pull requests

3 participants