public inbox for cygwin-developers@cygwin.com
 help / color / mirror / Atom feed
From: "Teemu Nätkinniemi" <tnatkinn@gmail.com>
To: Mark Geisert <mark@maxrnd.com>
Cc: "cygwin-developers@cygwin.com" <cygwin-developers@cygwin.com>
Subject: Re: Maybe consider rpmalloc
Date: Mon, 12 Apr 2021 11:48:48 +0300	[thread overview]
Message-ID: <CAEHcbmdsQBFzCHD_zgyADQ-7+1De0O0JMz0Gp=vhfP_XFsKarg@mail.gmail.com> (raw)
In-Reply-To: <3adb36f3-8740-3ff7-5f8a-90cdf3dfb64d@maxrnd.com>

Hello,

Thanks for testing! I found a better test case with smaller files
which should clearly show the issue.

https://drive.google.com/drive/folders/1jOilHtKrr6CHn7zg__DE93RCDyseoTB1?usp=sharing

Here's the results. Bwa_working is the one with rpmalloc and
bwa_original is unpatched. As you can see the unpatched version with
several threads takes a  whole lot more time to finish even when
compared with unpatched exe running with a single thread. I am not the
only one experiencing the issue so I doubt it is my system.

$ ../bwa-working/bwa_working.exe mem chr19_KI270866v1_alt.fasta
7859_GPI.read1.fq 7859_GPI.read2.fq > test1working.sam
(cut)
[main] Real time: 1.744 sec; CPU: 1.624 sec

$ ../bwa-working/bwa_working.exe mem -t 10 chr19_KI270866v1_alt.fasta
7859_GPI.read1.fq 7859_GPI.read2.fq > test1workingt10.sam
(cut)
[main] Real time: 0.354 sec; CPU: 2.218 sec

$ ../bwa-test/bwa_original.exe mem chr19_KI270866v1_alt.fasta
7859_GPI.read1.fq 7859_GPI.read2.fq > test1orig.sam
(cut)
[main] Real time: 1.733 sec; CPU: 1.608 sec

$ ../bwa-test/bwa_original.exe mem -t 10 chr19_KI270866v1_alt.fasta
7859_GPI.read1.fq 7859_GPI.read2.fq > test1origt10.sam
(cut)
[main] Real time: 8.131 sec; CPU: 5.265 sec

Teemu


su 11. huhtik. 2021 klo 12.52 Mark Geisert (mark@maxrnd.com) kirjoitti:
>
> Hi Teemu,
>
> Teemu Nätkinniemi via Cygwin-developers wrote:
> > Sorry, hurt my back yesterday and looks like I am not thinking clearly.
>
> Hope you are feeling better by this time.
>
> > ./bwa mem -t 10 bwa_reference/hs37d5.fa ERS4238880_1.fastq > test1.sam
>
> Thanks.  It was my unfamiliarity with Google Drive which prevented my finding all
> the data files you had stored there.  After a while I did find all I needed.
>
> I rebuilt bwa.exe alternately using the provided Makefile and Makefile.cygwin.
> When building with the latter I made sure your #ifdef patches were enabled so that
> rpmalloc was pulled in for the build.  When building with the former I made sure
> your patches were disabled, so the Cygwin malloc would be used for this case.
>
> I had no difficulty running either version of bwa to completion.  On one smallish
> test machine the rpmalloc version finished in a bit less elapsed time but with the
> same CPU time as the Cygwin malloc version.
>
> I also ran on a larger system; here both versions ran with similar elapsed and CPU
> times.  I also ran the Cygwin malloc version with '-t 32' to add some stress but
> still your test case ran to successful completion.
>
> So I'm afraid I can't explain the results you were seeing.  Is it possible that
> you might have given up too soon running the Cygwin malloc version, thinking you
> should be seeing output as quickly as you would on Linux?  You won't, unfortunately.
>
> You might try backing out your changes, or I think, building again on your main
> branch, to see if waiting longer proves successful.  If you have any other
> suggestions, please let us know.
> Thanks & Regards,
>
> ..mark
>
> P.S. Here's Cygwin malloc version's output from my smallish system
> (i5, 2.3GHz, 2C/4T)...
> ./bwa mem -t 10 bwa_reference/hs37d5.fa /tmp/ERS4238880_1.fastq > test1.sam
> [M::bwa_idx_load_from_disk] read 0 ALT contigs
> [M::process] read 1712342 sequences (100000087 bp)...
> [M::process] read 1103688 sequences (64503600 bp)...
> [M::mem_process_seqs] Processed 1712342 reads in 2157.077 CPU sec, 2214.871 real sec
> [M::mem_process_seqs] Processed 1103688 reads in 1541.766 CPU sec, 1591.704 real sec
> [main] Version: 0.7.17-r1198-dirty
> [main] CMD: ./bwa mem -t 10 bwa_reference/hs37d5.fa /tmp/ERS4238880_1.fastq
> [main] Real time: 3831.624 sec; CPU: 3713.937 sec

  reply	other threads:[~2021-04-12  8:49 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-25  6:01 Cygwin malloc tune-up status Mark Geisert
2020-09-27 16:54 ` Johannes Schindelin
2020-09-29  2:22   ` Mark Geisert
2021-04-01  9:19     ` Teemu Nätkinniemi
2021-04-02  5:45       ` Maybe consider rpmalloc -- Was: " Mark Geisert
2021-04-03  2:53         ` Maybe consider rpmalloc Mark Geisert
2021-04-03  6:46           ` Teemu Nätkinniemi
2021-04-03  6:48             ` Teemu Nätkinniemi
2021-04-11  9:28               ` Mark Geisert
2021-04-12  8:48                 ` Teemu Nätkinniemi [this message]
2021-04-13  8:24                   ` Mark Geisert
2021-04-13 13:05                     ` Teemu Nätkinniemi
2021-04-14  8:19                       ` Mark Geisert
2021-04-14 18:36                         ` Teemu Nätkinniemi
2021-04-14 18:53                         ` Jon Turney
2021-04-19  5:16                           ` Mark Geisert
2021-04-20 19:34                             ` Jon Turney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAEHcbmdsQBFzCHD_zgyADQ-7+1De0O0JMz0Gp=vhfP_XFsKarg@mail.gmail.com' \
    --to=tnatkinn@gmail.com \
    --cc=cygwin-developers@cygwin.com \
    --cc=mark@maxrnd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).