Operating System - Linux
1752590 Members
3974 Online
108788 Solutions
New Discussion юеВ

Re: Performance on HP with shlibs

 
Satya_6
Frequent Advisor

Performance on HP

Hi,

I have a strange performance issue on HP. I have a module and if I create a single executable, the performance is good and if I make my application an executable and some shared libraries, then all the functionalities that are performed inside my shared library are much slower compared to the performance I get when it is part of the executable. Please help me to understand and resolve this issue

The options used when I create a single executable are

CCOPTIONS = -Aa -Ae +Z -O +Oprocelim +Ofastaccess +Oaggressive +DA2.0 +DS2.0
CPPOPTIONS = +eh +Z -z +d

the options used when I create the dll

+O3 +Onolimit +Onofltacc +Odataprefetch +DA2.0 +DS2.0 +d -ext -z

TIA
Satya
2 REPLIES 2
Andrew Merritt_2
Honored Contributor

Re: Performance on HP

Hi Satya,
I won't be able to give an answer, but it might help others to if you can explain what you did to measure the performance, and what differences you noted between using a single executable and a dll.

As a general comment, I would expect to see a slightly longer start-up time for the single executable, but faster access to the functions when they are first called, compared with a faster startup but longer first time to access the functions when using the dll. That's because loading the dll won't happen until the functions are called, and that's going to involve disk access through the file system (unless it's already cached).

Andrew
Dennis Handly
Acclaimed Contributor

Re: Performance on HP with shlibs

When you create a shared lib, all of the calls inside need to go through stubs. While using +DA2.0 is much faster than using +DA1.1, there is a cost.

So how many calls are from your executable to the shlib? And how many are from the shlib to itself?

You can speed up the intra shlib calls by linking with -B symbolic.

There are some other hints under HP_DEFINED_EXTERNAL:
http://docs.hp.com/en/7763/5991-4871/summ_opt.html#RN.CVT.NN511

>the options used when I create the shlib: +d -ext -z

-z is useless for shlibs. +d will prevent inlining. I don't see it for the executable?