# q2 beta-group performance

**URL:** <https://forum.qiime2.org/t/q2-beta-group-performance/33676>\
**Category:** Technical Support\
**Tags:** diversity\
**Created:** [September 23, 2025, 12:58pm UTC](https://forum.qiime2.org/t/q2-beta-group-performance/33676 "2025-09-23T12:58:35Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![arwqiime](https://forum.qiime2.org/user_avatar/forum.qiime2.org/arwqiime/32/12728_2.png) [@arwqiime](https://forum.qiime2.org/u/arwqiime)\
**Post date:** [September 23, 2025, 12:58pm UTC](https://forum.qiime2.org/t/q2-beta-group-performance/33676/1 "2025-09-23T12:58:36Z")

</div>

Hello @Oddant1

May I come back to a previous post [q2 diversity beta-group-significance performance - #9 by Oddant1](https://forum.qiime2.org/t/q2-diversity-beta-group-significance-performance/31734/9) and add a short question.

I have re-analyzed the `q2 diversity beta-group-significance` performance after moving to q2-amplicon-2025.4 a while ago using two datasets for my tests:

The first dataset was taken from the Moving Pictures tutorial (downloaded the unweighted\_unifrac\_distance\_matrix.qza created by qiime2-2021.11 and sample-metadata.tsv files).

The second dataset was from an own project (242 samples). This distance matrix was created in q2-2024.2.

A `q2 diversity beta-group-significance` run was started using the identical input data and the following q2-releases (all conda): 2024.2, 2024.10, and 2025.4 on three different machines (the youngest machine is a virtual server maintained by ou IT department). The performance (duration) was taken from the provenance tab of each visualization. The data were in each case stored on the same filesystem, not on a mounted network volume.

 ![grafik](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/3X/d/9/d944f921db6608c6bf359a57d3d2bf8b01b2c717.png)

I do see two results:

First, younger hardware is faster than old ones. Great 🙂

Second, there is a significant preformance drop from 2024.2 to 2024.10 (and on the old hardware with own data also to 2025.4). Although, I can live with the performance e.g. on the younger hardware, are these differences between q2 releases something which you do observe on your machines, too?

Is there anything which I should take care of when adding new releases to to conda? E.g., do you recommend to remove previous conda environments?

Best regards

---

<div class="post-metadata">

**Author:** ![ebolyen](https://forum.qiime2.org/user_avatar/forum.qiime2.org/ebolyen/32/11_2.png) [@ebolyen](https://forum.qiime2.org/u/ebolyen)\
**Post date:** [September 25, 2025, 6:18pm UTC](https://forum.qiime2.org/t/q2-beta-group-performance/33676/5 "2025-09-25T18:18:20Z")

</div>

Thanks for reporting this @arwqiime! We're going to attempt to reproduce this on one of our larger datasets using Docker and will report back with our findings.

---

<div class="post-metadata">

**Author:** ![Oddant1](https://forum.qiime2.org/user_avatar/forum.qiime2.org/oddant1/32/17130_2.png) [@Oddant1](https://forum.qiime2.org/u/Oddant1)\
**Post date:** [September 29, 2025, 9:37pm UTC](https://forum.qiime2.org/t/q2-beta-group-performance/33676/6 "2025-09-29T21:37:33Z")

</div>

I conducted some testing of this on my machine. Three trial runs of the command on the data from moving pictures in 2024.2 and 2025.4. Times taken from provenance.

2024.2  
.944907s  
.996095s  
1.296163s  
avg: 1.07934s

2025.4  
1.764887s  
1.689018s  
1.686567s  
avg: 1.713491s

Seems to be a notable slowdown there.

I tried running the entire core-metrics-phylogenetic command from the tutorial as well, and the pipeline runs ~3x faster in the newer environment. ~7s vs ~24s

---

<div class="post-metadata">

**Author:** ![gregcaporaso](https://forum.qiime2.org/user_avatar/forum.qiime2.org/gregcaporaso/32/17769_2.png) [@gregcaporaso](https://forum.qiime2.org/u/gregcaporaso)\
**Post date:** [October 1, 2025, 6:51pm UTC](https://forum.qiime2.org/t/q2-beta-group-performance/33676/7 "2025-10-01T18:51:29Z")

</div>

I just ran this in the most recent dev environment (installed 31 Sept 2025) and the command completed in ~6s (according to data provenance). This is real data from [this paper's](https://doi.org/10.1093/ismeco/ycaf089) 'artifact archive' on Zenodo.

I think we should test this command on different systems to see if this differs on mac/linux/windows to help narrow down what's going on here. The command that I ran follows, and the inputs are attached here. If we determine that this does differ, next step will be running the Python profiler to try to narrow down where the slowdown is coming from.

```auto
qiime diversity beta-group-significance --i-distance-matrix braycurtis.qza --m-metadata-file sample-metadata.tsv --m-metadata-column "SampleType" --o-visualization bgs-test.qzv

```

[braycurtis.qza](https://forum.qiime2.org/uploads/short-url/p6bCkKPsAGEa6cjdFMcR5XtcfYy.qza) (5.7 MB)  
[sample-metadata.tsv](https://forum.qiime2.org/uploads/short-url/bjChHlEE9MN7nireHlaHQTUrTYd.tsv) (347.7 KB)

Thanks for bringing this up @arwqiime!

Update: when I run this through `time`, I get the following. This is probably preferable to looking at the times in data provenance since that won't represent the full run time as the user sees it - only the time spend inside the action.

```auto
time qiime diversity beta-group-significance ...
real 1m23.442s
user 0m33.142s
sys 0m48.938s

```

Another update: forgot to mention this is on my M3 MacBook Pro.

---

<div class="post-metadata">

**Author:** ![colinbrislawn](https://forum.qiime2.org/user_avatar/forum.qiime2.org/colinbrislawn/32/6221_2.png) [@colinbrislawn](https://forum.qiime2.org/u/colinbrislawn)\
**Post date:** [October 1, 2025, 9:04pm UTC](https://forum.qiime2.org/t/q2-beta-group-performance/33676/8 "2025-10-01T21:04:31Z")

</div>

WSL 2 on Windows 10  
CPU: AMD 5700G x86

[code on GitHub](https://github.com/colinbrislawn/q2-forums/tree/main/33676)

```auto
Saved Visualization to: bgs-colinbrislawn-wsl-qiime2-amplicon-2025.10.qzv
real 0m30.660s

Saved Visualization to: bgs-colinbrislawn-wsl-qiime2-amplicon-2025.7.qzv
real 0m28.935s

Saved Visualization to: bgs-colinbrislawn-wsl-qiime2-amplicon-2024.10.qzv
real 0m14.780s

Saved Visualization to: bgs-colinbrislawn-wsl-qiime2-amplicon-2024.5.qzv
real 0m20.161s

Saved Visualization to: bgs-colinbrislawn-wsl-qiime2-amplicon-2023.9.qzv
real 0m13.457s

```

---

<div class="post-metadata">

**Author:** ![arwqiime](https://forum.qiime2.org/user_avatar/forum.qiime2.org/arwqiime/32/12728_2.png) [@arwqiime](https://forum.qiime2.org/u/arwqiime)\
**Post date:** [October 7, 2025, 2:46pm UTC](https://forum.qiime2.org/t/q2-beta-group-performance/33676/9 "2025-10-07T14:46:36Z")

</div>

Hello @colinbrislawn, @gregcaporaso , and @Oddant1

Thank you for suggesting to use ‘time’ to get real numbers. I have rerun the previous data through time and added also Colin’s data from Github. Here are the results (single runs, not repeated).

It seems to me that the issue is related to the distance matrix from my own project. This was created by `qiime deicode rpca`, which has been replaced by `qiime gemelli rpca` recently. As far as I can tell now is that there is not much differences between distance matrices created by the deicode or gemelli. I would be ready to share my data by DM if necessary.

Best,

 ![time-q2-permanova](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/3X/3/a/3a0b72a1453462cb75241220cb75979533a27672.png)

---

<div class="post-metadata">

**Author:** ![cherman2](https://forum.qiime2.org/user_avatar/forum.qiime2.org/cherman2/32/17129_2.png) [@cherman2](https://forum.qiime2.org/u/cherman2)\
**Post date:** [October 16, 2025, 7:55pm UTC](https://forum.qiime2.org/t/q2-beta-group-performance/33676/10 "2025-10-16T19:55:07Z")

</div>

Thank you so much for pointing this issue out!

We have created a github issue for this bug and will update there with progress. Check out [this issue](https://github.com/qiime2/q2-diversity/issues/387) for updates on this fix!

---

<div class="post-metadata">

**Author:** ![Oddant1](https://forum.qiime2.org/user_avatar/forum.qiime2.org/oddant1/32/17130_2.png) [@Oddant1](https://forum.qiime2.org/u/Oddant1)\
**Post date:** [October 21, 2025, 5:43pm UTC](https://forum.qiime2.org/t/q2-beta-group-performance/33676/11 "2025-10-21T17:43:46Z")

</div>

Hello @arwqiime, if you could DM me your data I would appreciate it. I've been running some pretty involved benchmarks with the Python profiler, and would like to see if I can determine what it is about your data in particular that seems to cause such a massive slowdown.

---

<div class="post-metadata">

**Author:** ![system](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/3X/2/1/21af5fe23cb6f4579467c66a9ed94e55274ca7bd.svg) [@system](https://forum.qiime2.org/u/system)\
**Post date:** [November 21, 2025, 11:43pm UTC](https://forum.qiime2.org/t/q2-beta-group-performance/33676/12 "2025-11-21T23:43:54Z")

</div>

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
