I'm using bwa mem for alignment but I noticed this behavior which I don't fully understand:
I created large aws ec2 instances (60G RAM and 32 cores), installed bwa, downloaded the human reference (=3G), indexed it, the bwa command is very straightforward:
bwa mem human_ref.fasta input.fq
What happens is that the first time I use the command it takes a long time. It doesn't output anything onto stdout or stderr but I noticed it is loading something in the RAM (I think its the reference index), after it loads 5G or so, bwa "runs" fast enough with respect to the small input size (in megas). This Scenario only happens the first time I run the command on the machine, any runs after that don't take such time and finish reasonably fast.
Is this is normal? Why doesn't bwa take such long time after the first run?
Any help is appreciated.