bwa 线程数目对比对速度的影响
001、测试条件
(base) [b20223040323@admin1 batch_test]$ ls SRR10083583_trim_1P.fastq.gz SRR10083583_trim_2P.fastq.gz template.slurm (base) [b20223040323@admin1 batch_test]$ cat template.slurm #!/bin/bash #SBATCH -J xxxx #SBATCH -p Cnode2 #SBATCH -N 1 #SBATCH -n xxxx #SBATCH --cpus-per-task=1 STIME=`date +%s` bwa mem -t xxxx -k 32 -M -R "@RG\tID:SRR1008358301\tSM:SRR1008358301\tPL:illumina\tLB:SRR1008358301\tPU:SRR1008358301" /public/home/b20223040323/003_goat_pan_second/003_goat_reference/GCF_001704415.2_ARS1.2_genomic.fna SRR10083583_trim_1P.fastq.gz SRR10083583_trim_2P.fastq.gz > xxxx.sam let ETIME=`date +%s`-$STIME echo thread xxxx Elapsed time: $ETIME s > xxxx.time (base) [b20223040323@admin1 batch_test]$ for i in 4 16 32 64; do sed "s/xxxx/$i/g" template.slurm > $i.slurm; done (base) [b20223040323@admin1 batch_test]$ ls 16.slurm 32.slurm 4.slurm 64.slurm SRR10083583_trim_1P.fastq.gz SRR10083583_trim_2P.fastq.gz template.slurm (base) [b20223040323@admin1 batch_test]$ find *.slurm | grep -v "template.slurm" | xargs -n 1 sbatch Submitted batch job 396059 Submitted batch job 396060 Submitted batch job 396061 Submitted batch job 396062
002、测试结果
(base) [b20223040323@admin1 batch_test]$ cat 4.time 16.time 32.time 64.time ## 查看运行时间 thread 4 Elapsed time: 10086 s thread 16 Elapsed time: 1514 s thread 32 Elapsed time: 744 s thread 64 Elapsed time: 393 s
003、结论
线程数越多,运行速度越快。
。