Some Questions about q2-fragment-insertion

I recently am using q2-fragment-insertion, which you developed in qiime2. It is a nice tool. And your tutorial said that it's more accurate than the previous tool. But my mentor and I encountered some difficulties. The plugin has a p-thread setting, but it seems not to work. My mentor and I are using qiime2-2022.8. My computer is an m1 MacBook air, and my mentor is an m1 max MacBook pro. When we set the threads to 20000 or 80000, CPU use doesn't increase. It will keep about 3000 threads. So, may you check the function of p--threads? I think it's a problem because it will cost me 12 hours to produce a tree instead of half an hour using the traditional tool.

Thank you for your contribution to the development of microbiome data analysis!

Good morning @Caffery_Yang,

Welcome to the forums! :qiime2:

I also have an M1 Macbook Air, and as far as I know, it has an 8-core CPU. This means you could set --p-threads 8 on plugins that support multi-threading to fully use the CPU. Sometimes 'overprovisioning' your CPU by passing more threads per core can help, but it can also cause bottlenecks and slow things down!

Try using 8 threads on the M1 and 10 threads on the M1 MAX your mentor has and see if that speeds up the process.

Keep us posted!

Oh, I guess that I don’t really understand the concept of threads.Thank you! I will try to run it in p threads 8.

The problem has been solved. Thank you! I really appreciate it.

Despite the solved problem, I still want to say that we may have a different understanding about threads. Maybe the "thread" has different meaning. Because when you search "how many threads m1 can use?" in google, you can find the website said that In total, the M1 GPU contains up to 128 Execution units or 1024 ALUs, which Apple says can execute up to 24,576 threads simultaneously. So it may be a good idea to change p--thread to p--CPU core. Thank you for your attention!(how many threads m1 can use - Google Search)

Oh yeah, I totally understand the confusion:

In total, the M1 GPU contains up to 128 Execution units or 1024 ALUs, which Apple says can execute up to 24,576 threads simultaneously

That's the GPU, while all the Qiime 2 commands I know run on the CPU.

Even on the CPU, some processors have 2x the number of threads per core using hyperthreading, and now e-cores and p-cores make core count confusing!

Thank you for bringing this to the forums! There's a lot of folks here using M1 macs. :apple:

1 Like