# NCBI+ blastp and GALAXY\_SLOTS - increase number of threads

**URL:** <https://help.galaxyproject.org/t/ncbi-blastp-and-galaxy-slots-increase-number-of-threads/11326>\
**Category:** Uncategorized\
**Tags:** devops-administration, ncbi, galaxy-local, blast, blastp\
**Created:** [December 15, 2023, 7:33pm UTC](https://help.galaxyproject.org/t/ncbi-blastp-and-galaxy-slots-increase-number-of-threads/11326 "2023-12-15T19:33:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![prao123](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/prao123/32/2456_2.png) [@prao123](https://help.galaxyproject.org/u/prao123)\
**Post date:** [December 15, 2023, 7:33pm UTC](https://help.galaxyproject.org/t/ncbi-blastp-and-galaxy-slots-increase-number-of-threads/11326/1 "2023-12-15T19:33:01Z")

</div>

Hello Galaxy team!  
We are running a local Galaxy installation which is set on a server with multiple cores. I executed a job for searching peptides against the NCBI-nr database querying 5000 peptides against the NCBI-nr database. The query is taking quite long. For speeding up the process, we edited a tool\_conf.xml template to tell Galaxy to use more threads using the “local\_slots” parameter set to 16.

We tested the this conf file using TopHat and it works as expected i.e. TopHat takes the num\_threads parameter from the job\_conf.xml file. However, when using BLAST+ blastp (v2.14 or v2.10), the operation resorts back to 1 thread. Our job\_conf.xml file is as follows:

```auto
<?xml version="1.0"?>
<!-- A sample job config that explicitly configures job running the way it is
     configured by default (if there is no explicit config). -->
<job_conf>
    <plugins>
        <plugin id="local" type="runner" load="galaxy.jobs.runners.local:LocalJobRunner" workers="4"/>
        <plugin id="multilocal" type="runner" load="galaxy.jobs.runners.local:LocalJobRunner" workers="1"/>
        <plugin id="cli" type="runner" load="galaxy.jobs.runners.cli:ShellJobRunner" workers="1"/>
    </plugins>

    <!--
    <handlers>
       <handler id="main" />
    </handlers>
    -->

    <destinations default="local">
        <destination id="local" runner="local"/>
        <destination id="multicore16" runner="multilocal">
            <param id="local_slots">16</param>
        </destination>
        <destination id="mccli16" runner="cli">
            <param id="local_slots">16</param>
        </destination>
    </destinations>
    <tools>
      <tool id="bowtie2" destination="multicore16" />
      <tool id="bowtie" destination="multicore16" />
      <tool id="tophat2" destination="multicore16" />>
      <tool id="blast" destination="mccli16" />
      <tool id="blastp" destination="mccli16" />
      <tool id="ncbi_blast_plus" destination="mccli16" />
    </tools>
</job_conf>

```

Navigating down the rabbit hole of connected files, we are still not able to figure out why TopHat takes the parameters from job\_conf.xml but ncbi-blastp+ does not. We assume that blastp is taking the number\_threads parameter from some other file.  
My question is: Which file specifies the parameter for increasing the number of threads for the blastp tool? Or  
How can we increase the number of threads for the blastp tool?

Thank you!

---

<div class="post-metadata">

**Author:** ![jennaj](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/jennaj/32/27_2.png) [@jennaj](https://help.galaxyproject.org/u/jennaj)\
**Post date:** [December 15, 2023, 11:58pm UTC](https://help.galaxyproject.org/t/ncbi-blastp-and-galaxy-slots-increase-number-of-threads/11326/2 "2023-12-15T23:58:37Z")

</div>

Hi @prao123

I cross-posted your question over to the Admin chat. They may reply here or there, and feel free to join the chat. [You're invited to talk on Matrix](https://matrix.to/#/!rfLDbcWEWZapZrujix:gitter.im/$6J37j76Ttz2Z_l-ZzHrJeewrf7SpL4FG-Vq_OeRhOZU?via=gitter.im&via=matrix.org)

Meanwhile, the tutorials may also help, along with this recent Q&A.

> [@Increasing cores](https://help.galaxyproject.org/t/increasing-cores/11267/6):
>
> Hi, you can find the resources here: [tpv-shared-database/tools.yml at main · galaxyproject/tpv-shared-database · GitHub](https://github.com/galaxyproject/tpv-shared-database/blob/main/tools.yml#L2421) which is shared across Galaxy instances and then local overwrites for EU here: [infrastructure-playbook/files/galaxy/tpv/tools.yml at master · usegalaxy-eu/infrastructure-playbook · GitHub](https://github.com/usegalaxy-eu/infrastructure-playbook/blob/master/files/galaxy/tpv/tools.yml) ${GALAXY\_SLOTS:-1} is a bash syntax and just states that if the environment variable GALAXY\_SLOTS is not set, then default to 1 core. We do set GALAXY\_SLOTS with the values given in the linked resources files. What is your scientific question you want to answer? There might be a better way to solve your problem that does not involve mafft. Ciao, Bjoern

### Local Galaxy

A local Galaxy server is a choice for personal use, and can be scaled to support multiple users.

Your service can be hosted publicly or privately. Connect to local, institutional, or commercial cloud computing resources and customize your usage policies.

💻 Local Galaxy

- Training Network [Galaxy server administration training](https://training.galaxyproject.org/training-material/topics/admin/)
- Technical Documentation [Galaxy releases, plus Admin and Development docs](https://docs.galaxyproject.org/)
- Open-source code base [GalaxyProject Github repositories](https://github.com/galaxyproject)

---

<div class="post-metadata">

**Author:** ![bernt-matthias](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/bernt-matthias/32/502_2.png) [@bernt-matthias](https://help.galaxyproject.org/u/bernt-matthias)\
**Post date:** [December 16, 2023, 11:01am UTC](https://help.galaxyproject.org/t/ncbi-blastp-and-galaxy-slots-increase-number-of-threads/11326/3 "2023-12-16T11:01:56Z")

</div>

My first guess would be that the used tool id is wrong. For blastp the id is `ncbi_blastp_wrapper`, [see here](https://github.com/peterjc/galaxy_blast/blob/2dd12dc4b078ed9f8c2cbfc1cfc19a361812753b/tools/ncbi_blast_plus/ncbi_blastp_wrapper.xml#L1C11-L1C30).

Note that for small instances the `job_conf.xml` is sufficient for configuring ressources. The TPV method cited by @jennaj seems to be better on the long run (maybe even for smaller instances).

---

<div class="post-metadata">

**Author:** ![prao123](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/prao123/32/2456_2.png) [@prao123](https://help.galaxyproject.org/u/prao123)\
**Post date:** [December 19, 2023, 5:54pm UTC](https://help.galaxyproject.org/t/ncbi-blastp-and-galaxy-slots-increase-number-of-threads/11326/4 "2023-12-19T17:54:34Z")

</div>

Sometimes the most inane thing that I forget is the solution! I changed the tool id to “ncbi\_blastp\_wrapper” and it worked!

Thank you for that solution!

---

<div class="post-metadata">

**Author:** ![jennaj](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/jennaj/32/27_2.png) [@jennaj](https://help.galaxyproject.org/u/jennaj)\
**Post date:** [March 17, 2026, 4:43am UTC](https://help.galaxyproject.org/t/ncbi-blastp-and-galaxy-slots-increase-number-of-threads/11326/5 "2026-03-17T04:43:53Z")

</div>


