Preparing for an installation of Galaxy:
I am asking with a simple multicore VM i mind. No cluster.
How will Galaxy handle multithreading? Can I define globally the amount of available CPUs somewhere and then the tools will use the availble CPUs. Or what is the strategy?
Maybe this helps https://galaxyproject.org/admin/config/galaxy_slots/.
For a more detailed answer I think a developer need to help you. In the file config/job_conf.xml you can specify the cores. This “value” can be used in the XML wrapper by using the GALAXY_SLOTS variable.
But what I want to add and maybe this will partly answer your other questions as well. Keep in mind that in the basics galaxy is a “wrapper”, “shell”, “UI” around the command line. So if you execute a tool it just executing a command. (galaxy can do much more but for this is enough for your question).
So galaxy itself is not really handling the multithreading, trough galaxy you tell BWA for example how many threats it need to use and BWA handles the multithreading.
So the prepared tools (on the Tool Shed, assuming they are configured accordingly) will understand GALAXY_SLOTS and automatically use the appropriate number of cores?
As an example: Lets say I move from 8 to 16 cores and I just adjust GALAXA_SLOTS, most tools should switch to 16 cores?
@michi_s assuming you are using a cluster scheduler of some kind, yes, any tools that use $GALAXY_SLOTS in the <command> block of the tool config will automatically use the correct number of cores if you submit the job to your cluster with your cluster scheduler’s native multicore option.