Hi,

I struggle to sort whole-genome 110G BAM file. I run 8G RAM and 2CPU google
instance.

vmorozov@gstat:/disk/genomes$ samtools

Program: samtools (Tools for alignments in the SAM format)
Version: 1.2 (using htslib 1.2.1)


I tried:
nohup samtools sort -n -@ 2 -m 2G my_sample.bam sort > e&
the command crashed after 2 hours creating ~40G of sort.*.bam files. Empty
error/stdoutput.  Now I have launched:
 nohup samtools sort -n -@ 2 -m 1G my_sample.bam sort > e&

and I observe gradual increase of samtools occupied memory. After 30 min
run and creating 20Gb of temporary files, samtools occupied ~4G of memory:

top - 21:16:10 up  4:38,  2 users,  load average: 2.15, 2.01, 1.70
Tasks:  94 total,   1 running,  93 sleeping,   0 stopped,   0 zombie
%Cpu(s): 89.2 us, 10.7 sy,  0.0 ni,  0.2 id,  0.0 wa,  0.0 hi,  0.0 si,
 0.0 st
KiB Mem:   7660696 total,  7526644 used,   134052 free,     1244 buffers
KiB Swap:        0 total,        0 used,        0 free.  3234156 cached Mem

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND

 6045 vmorozov  20   0 4116052 3.769g   1796 S 196.5 51.6  49:14.03
samtools
   26 root      39  19       0      0      0 S   2.3  0.0   0:10.80
khugepaged
   39 root      20   0       0      0      0 S   1.0  0.0   3:13.44 kswapd0



Is it memory leakage? I guess it will crash eventually. Any suggestion how
to get the sort job done?

Thanks
Vlad
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Samtools-help mailing list
Samtools-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/samtools-help

Reply via email to