osallou@debiansid:/tmp/ncbi-blast-2.2.25+-src/debian/ncbi-blast+/usr/bin$
time bash -c 'for (( c=1; c<=50; c++ )) ; do ./blastx -h >
/dev/null ; done'
real*** 0m0.403s
user*** 0m0.292s
sys*** 0m0.124s
# Dynamic build
osallou@debiansid:/tmp/ncbi-blast-2.2.25+-src/debian/ncbi-blast+/usr/bin$
time bash -c 'for (( c=1; c<=50; c++ )) ; do blastx -h >
/dev/null ; done'
real*** 0m8.002s
user*** 0m4.200s
sys*** 0m3.856s
-------- Message original --------
Sujet:
Re: BLAST+ speed & build issues
Date de
renvoi*:
Thu, 4 Aug 2011 09:31:54 +0000 (UTC)
De
(renvoi)*:
debian-med@lists.debian.org
Date*:
Thu, 04 Aug 2011 11:31:34 +0200
De*:
Olivier Sallou <olivier.sallou@irisa.fr>
Pour*:
Tim Booth <avarus@fastmail.fm>
Copie à*:
debian-med@lists.debian.org, "Aaron M. Ucko"
<amu@alum.mit.edu>
Hi,
I quickly build the ncbi-blast+ locally with static build using the
debian build process, and indeed,
static build binaries are much faster (blastx -h) than dynamically
linked ones.
I will investigate if there is a way to speedup this. Or if anyone has
ideas....
Olivier
Le 8/3/11 10:48 AM, Tim Booth a écrit :
> time bash -c 'for (( c=1; c<=50; c++ )) ; do ~/tings/ncbi-blast-2.2.25+/bin/blastx -h > /dev/null ; done'
--
Olivier Sallou
IRISA / University of Rennes 1
Campus de Beaulieu, 35000 RENNES - FRANCE
Tel: 02.99.84.71.95
--
To UNSUBSCRIBE, email to debian-med-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/4E3A66F6.7040008@irisa.fr
08-04-2011, 10:32 AM
Julian Taylor
Fwd: BLAST+ speed & build issues
On 08/04/2011 12:02 PM, Olivier Sallou wrote:
> Hi,
> we have a package on DebianMed which has performance issue regarding
> static build vs dynamic link build (latest gcc)
> Has only impacted compile option is the static vs dynamic choice, has
> anyone an idea on where we could investigate or how we could speedup this?
>
> For a simple "-h" call, here is a benchmark:
>
> # Static build"
> osallou@debiansid:/tmp/ncbi-blast-2.2.25+-src/debian/ncbi-blast+/usr/bin$ time
> bash -c 'for (( c=1; c<=50; c++ )) ; do ./blastx -h > /dev/null ; done'
>
> real 0m0.403s
> user 0m0.292s
> sys 0m0.124s
>
> # Dynamic build
> osallou@debiansid:/tmp/ncbi-blast-2.2.25+-src/debian/ncbi-blast+/usr/bin$ time
> bash -c 'for (( c=1; c<=50; c++ )) ; do blastx -h > /dev/null ; done'
>
> real 0m8.002s
> user 0m4.200s
> sys 0m3.856s
>
>
Hi,
unless the purpose of this program is to display help messages to stdout
this is hardly a meaningful benchmark.
Starting a dynamic linked library is slower than starting a static one,
but that does not yet mean the dynamic version will be so much slower
when its running.
You might be able to reduce startup time by only linking against the
libraries you need or lazyly dynamically loading them.
using ld --as-needed is the solution for the former, but see bug 633567
for problems with this.
Best Regards,
Julian Taylor
08-04-2011, 11:27 AM
Samuel Thibault
Fwd: BLAST+ speed & build issues
Julian Taylor, le Thu 04 Aug 2011 12:32:27 +0200, a écrit :
> You might be able to reduce startup time by only linking against the
> libraries you need or lazyly dynamically loading them.
Or use prelink.
Samuel
--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110804112744.GF4985@type.bordeaux.inria.fr">http ://lists.debian.org/20110804112744.GF4985@type.bordeaux.inria.fr
08-04-2011, 11:50 AM
Yves-Alexis Perez
Fwd: BLAST+ speed & build issues
On jeu., 2011-08-04 at 13:27 +0200, Samuel Thibault wrote:
> Julian Taylor, le Thu 04 Aug 2011 12:32:27 +0200, a écrit :
> > You might be able to reduce startup time by only linking against the
> > libraries you need or lazyly dynamically loading them.
>
> Or use prelink.
Which as issues especially wrt. ASLR.
Regards,
--
Yves-Alexis
08-04-2011, 11:56 AM
Mike Hommey
Fwd: BLAST+ speed & build issues
On Thu, Aug 04, 2011 at 01:50:01PM +0200, Yves-Alexis Perez wrote:
> On jeu., 2011-08-04 at 13:27 +0200, Samuel Thibault wrote:
> > Julian Taylor, le Thu 04 Aug 2011 12:32:27 +0200, a écrit :
> > > You might be able to reduce startup time by only linking against the
> > > libraries you need or lazyly dynamically loading them.
> >
> > Or use prelink.
>
> Which as issues especially wrt. ASLR.
And doesn't help with the biggest problem: I/O
Mike
--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110804115646.GA10717@glandium.org">http://lists.debian.org/20110804115646.GA10717@glandium.org
08-04-2011, 03:33 PM
olivier sallou
Fwd: BLAST+ speed & build issues
Linking against "needed" lib is quite difficult (would need to be done on upstream), package is rather complex regarding compilation.And each solution has its pros and cons....
I think we will have to discuss on validity to provide static builds ( takes a lot of space on package vs perf loss)
Thanks anyway
2011/8/4 Samuel Thibault <sthibault@debian.org>
Julian Taylor, le Thu 04 Aug 2011 12:32:27 +0200, a écrit :
> You might be able to reduce startup time by only linking against the
> libraries you need or lazyly dynamically loading them.
Or use prelink.
Samuel
--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Because "-h is slow" hardly seems like a good justification for having
static packages. Last I checked (which wasn't long ago..), BLAST is
typically a long-running process (at least on the stuff we're doing..).
Also, are subsequent calls (even '-h' ones) faster? I'd expect them to
be, once everything is cache'd, which would reduce the justification
that much further..
No, having the database stay in memory and being able to query against
it rather than having to start up blast every time (ala FastCGI or
something like you'd do for a webserver) might be a way to kill two
birds w/ one stone, as it was, but that'd be a fair bit of work, I
expect.
Thanks,
Stephen
* olivier sallou (olivier.sallou@gmail.com) wrote:
> Linking against "needed" lib is quite difficult (would need to be done on
> upstream), package is rather complex regarding compilation.
> And each solution has its pros and cons....
>
> I think we will have to discuss on validity to provide static builds ( takes
> a lot of space on package vs perf loss)
>
> Thanks anyway
>
> 2011/8/4 Samuel Thibault <sthibault@debian.org>
>
> > Julian Taylor, le Thu 04 Aug 2011 12:32:27 +0200, a écrit :
> > > You might be able to reduce startup time by only linking against the
> > > libraries you need or lazyly dynamically loading them.
> >
> > Or use prelink.
> >
> > Samuel
> >
> >
> > --
> > To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
> > with a subject of "unsubscribe". Trouble? Contact
> > listmaster@lists.debian.org
> > Archive:
> > http://lists.debian.org/20110804112744.GF4985@type.bordeaux.inria.fr
> >
> >
08-06-2011, 10:37 AM
Kurt Roeckx
Fwd: BLAST+ speed & build issues
On Thu, Aug 04, 2011 at 12:02:25PM +0200, Olivier Sallou wrote:
> For info, executable is quite large 11MB (static) vs 2M (dynamic).
The 11MB probably contains a whole bunch of libraries instead,
making it larger. I don't see how this is relavant.
Like others have pointed out, this is not a useful benchmark.
You're basicly testing the startup time of your application. When
you start an applications that dynamic linker has to resolv
symbols and relocations. This takes time which for the static
version was done at link time. Having more libraries it needs to
check for the symbol means it will take longer.
What can help is that you reduce the total amount of symbols that
it needs to check be only exporting the symbols you need from the
shared libraries. There are various methods for that.
The basic 3 methods I know:
- Making things as much as possible static.
- Using symbol visibility: tell gcc which symbols should be visible.
- Using a linker map to only export those that should be visible.
Kurt
--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110806103714.GA2861@roeckx.be">http://lists.debian.org/20110806103714.GA2861@roeckx.be