This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Any program to check resources used by Bioinfo Tools

Hello Everyone,

I have a bash Script of FastQC and Trimmomatic. I want to know how much resources each of these tool uses. So is there any way or any bash command or tool which helps with this situation. If possible I would like to change the resources they use to make them perform faster.

Thank you, Nikhil

bash

2 answers

You cannot really 'change the resources' they use unless the tool itself has options for the number of threads/memory usage etc.

The only real changes you could make that might marginally speed something up would be to parallelise it with gnu parallel (if possible), or maybe change the niceness of the process.

As Dariober said, there are not really many options in 'default' tools to monitor resource usage other than at the overall system level once a script is running (e.g. free, htop/top and ps etc). You would have to look at installing some sort of server monitoring solution, but its probably not worth the effort. There are some tools here, but even they are not 'in-script' measures https://www.tecmint.com/command-line-tools-to-monitor-linux-performance/

You can 'profile' your commands by using time to figure out where the slow bits are, but unless your code is very inefficient you won't be able to do much to change it.

Joe, Understood. Thank you for your help. This really helps.

I don't have any sophisticated recommendation - I usually have a terminal window open with htop to keep an eye on what's happening. See also this thread https://stackoverflow.com/questions/774556/peak-memory-usage-of-a-linux-unix-process

@dariober Thank you. Your answer helped me.

Log in to answer this question.