Bowtie2 '-P' Threads
3
1
Entering edit mode
10.2 years ago
fire_water ▴ 80

Hi,

I will be using Bowtie2 to trim and map paired-end reads from FASTQ files stored on a USB drive. I noticed Bowtie is equipped with the '-p' option which will launch N parallel search threads (default = 1).

My questions are:

  1. what is the optimal number of threads to use?
  2. how to calculate that number?

Environemnt:

  • Bowtie2 (v2.1.0)
  • Mac OS X 10.8.5
  • 2 x 2.4 GHz 6-Core Xeon (12 cores total)
  • 64 GB Memory

Thank you :)

bowtie • 15k views
ADD COMMENT
4
Entering edit mode
10.2 years ago

In general you're best off just using the number of cores present, so "-p 12". In practice, you need to run a simulation to find out the optimal number. One example of that was done here (they used up to 32 threads and ended up modifying bowtie for a bit better performance). There are other examples out there if you look for them. I should note that doing timing as in that example is only useful if you have >>12 threads.

Edit: Actually, Xeon's have hyperthreading, so you might do some benchmarking with up to 24 or so threads. See an example of using/disabling hyperthreading in this PDF, which seems to jive with my own experience that you might as well use the number of hyperthreads.

ADD COMMENT
3
Entering edit mode
10.2 years ago
jpiper ▴ 60

I use Bowtie2 on a Xeon workstation (nehalem architecture) and do notice a speed increase (not double though) between using -p (the number of cores) or -p (number of hyperthreads), but with -p (number of hyperthreads) it tends to make my computer quite unusable (coffee time!).

So much like @dpryan79 said, experiment between 12 and 24.

ADD COMMENT
1
Entering edit mode
10.2 years ago
Chris Cole ▴ 800

In my testing I've found that you start losing the benefit of more threads when you go above 8 threads with bowtie2. Plus, hyperthreading only helps when a cpu has low load. If you're running on all cores, hyperthreading slows things down. This is both on 12 (24 with HT) core AMDs or 32 (64 with HT) core Intel Xeons.

Bowtie2 performance

Of course, this could be dependent on our set-up here.

ADD COMMENT

Login before adding your answer.

Traffic: 2415 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6