32 and 64 bit apps on Solaris 10 - SUN

This is a discussion on 32 and 64 bit apps on Solaris 10 - SUN ; I have a new solaris 10 v440 server, and this is my first 64 bit and Solaris 10 install. When I compile (ie) openssl, defining only LD_LIBRARY_PATH and pointing it to the 64 bit libraries, it compiles fine. I read ...

+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 20 of 21

Thread: 32 and 64 bit apps on Solaris 10

  1. 32 and 64 bit apps on Solaris 10

    I have a new solaris 10 v440 server, and this is my first 64 bit and
    Solaris 10 install.

    When I compile (ie) openssl, defining only LD_LIBRARY_PATH and
    pointing it to the 64 bit libraries, it compiles fine.

    I read that if you define LD_LIBRARY_PATH32 and LD_LIBRARY_PATH64 to
    point to the appropriate libraries, it should compile fine. So I
    added those variables (along with LD_LIBRARY_PATH pointing to 32 bit
    libs), and it fails and I got ELF32 errors cause I was compiling 64
    bit. So I removed the LD_LIBRARY_PATH variable and the compile goes
    much further but fails saying it can't find gcclib.s.so.1. I search
    for that file and it is in the directory specified by
    LD_LIBRARY_PATH64. I do NOT get any ELF32 or ELF64 errors.

    I have to get this environment to work, being able to compile both 32
    and 64 bit. Any suggestions? I see alot of people talk about
    libtool, but I am unfamiliar with it.

    Thanks


  2. Re: 32 and 64 bit apps on Solaris 10

    On Sat, 12 May 2007 09:53:42 -0700, csgona wrote:

    > I have a new solaris 10 v440 server, and this is my first 64 bit and
    > Solaris 10 install.
    >
    > When I compile (ie) openssl, defining only LD_LIBRARY_PATH and
    > pointing it to the 64 bit libraries, it compiles fine.


    Why are you even trying to compile openssl?

    [~]$ pkgchk -lp /usr/sfw/lib/libssl.so.0.9.7
    NOTE: Couldn't lock the package database.
    Pathname: /usr/sfw/lib/libssl.so.0.9.7
    Type: regular file
    Expected mode: 0755
    Expected owner: root
    Expected group: bin
    Expected file size (bytes): 1323548
    Expected sum(1) of contents: 3646
    Expected last modification: Jan 22 19:19:00 2005
    Referenced by the following packages:
    SUNWopenssl-libraries
    Current status: installed

    And why are you using LD_LIBRARY_PATH at all? Solaris uses ELF binaries
    which are linked correctly by using the -R/path/to/lib argument in
    $LDFLAGS.


  3. Re: 32 and 64 bit apps on Solaris 10

    On May 12, 10:34 am, Dave Uhring wrote:
    > On Sat, 12 May 2007 09:53:42 -0700, csgona wrote:
    > > I have a new solaris 10 v440 server, and this is my first 64 bit and
    > > Solaris 10 install.
    > > When I compile (ie) openssl, defining only LD_LIBRARY_PATH and
    > > pointing it to the 64 bit libraries, it compiles fine.

    > Why are you even trying to compile openssl?


    A good question. On top of that why use gcc when Studio 11 produces
    highly optimized code in this case. But even then it wont match
    the speed when you add-on SUNWcry available free from Sun
    which gives you quite a kick in engine performance over the GA
    delivered
    packages. And you get the 64 bit libs as well. All Sun supported. nice

    > [~]$ pkgchk -lp /usr/sfw/lib/libssl.so.0.9.7
    > NOTE: Couldn't lock the package database.
    > Pathname: /usr/sfw/lib/libssl.so.0.9.7
    > Type: regular file
    > Expected mode: 0755
    > Expected owner: root
    > Expected group: bin
    > Expected file size (bytes): 1323548
    > Expected sum(1) of contents: 3646
    > Expected last modification: Jan 22 19:19:00 2005
    > Referenced by the following packages:
    > SUNWopenssl-libraries
    > Current status: installed


    > And why are you using LD_LIBRARY_PATH at all? Solaris uses ELF binaries
    > which are linked correctly by using the -R/path/to/lib argument in
    > $LDFLAGS.


    That must be a rhetorical question : >
    At least the OP didnt go to sunfreeware, partially install something
    without reading
    the online docs there and multi-post all over the place when "it
    doesnt work" happened.
    A read of man ld.so.1 and man ldd would be a good start for the OP.


  4. Re: 32 and 64 bit apps on Solaris 10

    csgonan@yahoo.com wrote:
    > I have a new solaris 10 v440 server, and this is my first 64 bit and
    > Solaris 10 install.
    >
    > When I compile (ie) openssl, defining only LD_LIBRARY_PATH and
    > pointing it to the 64 bit libraries, it compiles fine.
    >
    > I read that if you define LD_LIBRARY_PATH32 and LD_LIBRARY_PATH64 to
    > point to the appropriate libraries, it should compile fine. So I
    > added those variables (along with LD_LIBRARY_PATH pointing to 32 bit
    > libs), and it fails and I got ELF32 errors cause I was compiling 64
    > bit. So I removed the LD_LIBRARY_PATH variable and the compile goes
    > much further but fails saying it can't find gcclib.s.so.1. I search
    > for that file and it is in the directory specified by
    > LD_LIBRARY_PATH64. I do NOT get any ELF32 or ELF64 errors.
    >
    > I have to get this environment to work, being able to compile both 32
    > and 64 bit. Any suggestions? I see alot of people talk about
    > libtool, but I am unfamiliar with it.
    >
    > Thanks
    >


    Try compiling WITHOUT LD_LIBRARY_PATH! One of the options to the
    compiler should tell it where you keep the libraries you want to use and
    the executable should be built already knowing where the libraries are
    supposed to be.

    Excuse me for being too lazy to look it up. The man "page" for cc is
    more like 100 pages!


  5. Re: 32 and 64 bit apps on Solaris 10

    gerryt wrote:
    > A good question. On top of that why use gcc when Studio 11 produces
    > highly optimized code in this case.


    gcc 4.1.1 produces much faster code than Studio 11 for OpenSSL most of the
    time.

    ../Configure no-asm solaris64-x86_64-cc

    vs.

    ../Configure no-asm solaris64-x86_64-gcc

    positive percentages: gcc was faster
    negative percentage: Studio 11 was faster

    type 16B 64B 256B 1024B 8192B
    md2 2.31% 2.38% 2.17% 1.90% 1.95%
    md4 26.94% 31.90% 42.53% 57.73% 69.77%
    md5 15.15% 18.31% 26.14% 34.08% 38.99%
    hmac(md5) 29.79% 29.06% 33.26% 37.32% 39.36%
    sha1 14.51% 20.64% 31.24% 33.62% 35.94%
    rmd160 30.72% 39.88% 54.02% 63.29% 68.00%
    rc4 -14.06% -15.15% -15.19% -15.35% -15.40%
    des cbc 4.39% 5.26% 5.42% 5.53% 5.41%
    idea cbc -5.23% -9.13% -10.22% -10.49% -10.47%
    rc2 cbc -5.78% -5.70% -5.95% -6.00% -5.91%
    blowfish cbc 17.46% 18.34% 18.54% 18.63% 19.03%
    cast cbc 42.77% 43.79% 43.92% 45.47% 44.42%
    aes-128 cbc 13.49% 16.56% 17.83% 17.73% 18.04%
    aes-192 cbc 15.29% 18.08% 18.68% 18.78% 19.05%
    aes-256 cbc 15.41% 18.71% 19.12% 19.48% 19.71%
    sha256 29.78% 34.61% 39.95% 43.14% 44.50%
    sha512 29.04% 29.04% 33.51% 35.32% 37.11%

    sign verify
    rsa 512 bits 46.14% 53.01%
    rsa 1024 bits 70.39% 67.51%
    rsa 2048 bits 86.89% 89.64%
    rsa 4096 bits 94.29% 95.69%
    dsa 512 bits 66.00% 66.58%
    dsa 1024 bits 81.30% 80.66%
    dsa 2048 bits 91.30% 90.99%


    > But even then it wont match
    > the speed when you add-on SUNWcry available free from Sun
    > which gives you quite a kick in engine performance over the GA
    > delivered


    SUNWcry won't give you any additional speed unless you have some crypto
    hardware installed - but then you are comparing compiler speed vs. hardware
    speed.

    --
    Daniel

  6. Re: 32 and 64 bit apps on Solaris 10

    "Daniel Rock" writes:

    >gcc 4.1.1 produces much faster code than Studio 11 for OpenSSL most of the
    >time.


    >./Configure no-asm solaris64-x86_64-cc


    > vs.


    >./Configure no-asm solaris64-x86_64-gcc


    Which compiler options were used?

    >SUNWcry won't give you any additional speed unless you have some crypto
    >hardware installed - but then you are comparing compiler speed vs. hardware
    >speed.


    SUNWcry only gives longer keys; the default software stack in Solaris
    is pretty well optimized and should give performance near the optimum.

    But with hardware crypto support it will be much better.

    Casper
    --
    Expressed in this posting are my opinions. They are in no way related
    to opinions held by my employer, Sun Microsystems.
    Statements on Sun products included here are not gospel and may
    be fiction rather than truth.

  7. Re: 32 and 64 bit apps on Solaris 10

    Casper H.S. Dik wrote:
    > "Daniel Rock" writes:
    >
    >>gcc 4.1.1 produces much faster code than Studio 11 for OpenSSL most of the
    >>time.

    >
    >>./Configure no-asm solaris64-x86_64-cc

    >
    >> vs.

    >
    >>./Configure no-asm solaris64-x86_64-gcc

    >
    > Which compiler options were used?


    The compiler options are predefined by OpenSSL based on the os/compiler
    parameter. They will be expanded to:

    solaris64-x86_64-cc
    cc -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -fast
    -xstrconst -xarch=amd64 -Xa -DL_ENDIAN

    solaris64-x86_64-gcc
    gcc -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -O3
    -fomit-frame-pointer -DL_ENDIAN
    -m64 -DL_ENDIAN -DMD32_REG_T=int

    --
    Daniel

  8. Re: 32 and 64 bit apps on Solaris 10

    On May 13, 5:38 am, Casper H.S. Dik wrote:
    > "Daniel Rock" writes:
    > >gcc 4.1.1 produces much faster code than Studio 11 for OpenSSL most of the
    > >time.
    > >./Configure no-asm solaris64-x86_64-cc
    > > vs.
    > >./Configure no-asm solaris64-x86_64-gcc

    > Which compiler options were used?

    The OPs using a V440..
    > >SUNWcry won't give you any additional speed unless you have some crypto
    > >hardware installed - but then you are comparing compiler speed vs. hardware
    > >speed.

    > SUNWcry only gives longer keys; the default software stack in Solaris
    > is pretty well optimized and should give performance near the optimum.


    Odd. I recall getting better numbers after installing the SUNWcry
    package

    > But with hardware crypto support it will be much better.


    Up to 4096 or 8192 bits - I cant remember which - on a V240 that I
    tested once.



  9. Re: 32 and 64 bit apps on Solaris 10

    On May 13, 7:07 am, "Daniel Rock" wrote:
    > Casper H.S. Dik wrote:
    >
    > > "Daniel Rock" writes:
    > >>gcc 4.1.1 produces much faster code than Studio 11 for OpenSSL most of the
    > >>time.
    > >>./Configure no-asm solaris64-x86_64-cc
    > >> vs.
    > >>./Configure no-asm solaris64-x86_64-gcc

    > > Which compiler options were used?

    > The compiler options are predefined by OpenSSL based on the os/compiler
    > parameter. They will be expanded to:
    > solaris64-x86_64-cc
    > cc -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -fast
    > -xstrconst -xarch=amd64 -Xa -DL_ENDIAN


    Yes but these are easily changed by adding your own config...
    -fast -xtarget etc. it make quite a difference on a SPARC CPU over
    what's in the
    default Config.
    Even old ones like my ultra3cu


  10. Re: 32 and 64 bit apps on Solaris 10

    gerryt wrote:
    > Yes but these are easily changed by adding your own config...
    > -fast -xtarget etc. it make quite a difference on a SPARC CPU over
    > what's in the
    > default Config.
    > Even old ones like my ultra3cu


    The same applies to gcc also. So I benchmarked with the "recommended" options
    by the OpenSSL team to get some fair results. And the 64 bit results on
    x86/amd clearly shows gcc generates much better code than Sun Studio. The
    lead is so large, I doubt some compiler flags would change the outcome.

    For SPARC I'm just running the benchmark once again. I only have an old
    Blade 150 so the results will take some time.

    --
    Daniel

  11. Re: 32 and 64 bit apps on Solaris 10

    "Daniel Rock" writes:

    >gerryt wrote:
    >> Yes but these are easily changed by adding your own config...
    >> -fast -xtarget etc. it make quite a difference on a SPARC CPU over
    >> what's in the
    >> default Config.
    >> Even old ones like my ultra3cu


    >The same applies to gcc also. So I benchmarked with the "recommended" options
    >by the OpenSSL team to get some fair results. And the 64 bit results on
    >x86/amd clearly shows gcc generates much better code than Sun Studio. The
    >lead is so large, I doubt some compiler flags would change the outcome.



    Which studio 11 version was this, BTW? (There was a bit of performance
    work in some of the patches)

    Casper

  12. Re: 32 and 64 bit apps on Solaris 10

    On May 13, 10:58 am, "Daniel Rock" wrote:
    > gerryt wrote:
    > > Yes but these are easily changed by adding your own config...
    > > -fast -xtarget etc. it make quite a difference on a SPARC CPU over
    > > what's in the
    > > default Config.
    > > Even old ones like my ultra3cu

    >
    > The same applies to gcc also. So I benchmarked with the "recommended" options
    > by the OpenSSL team to get some fair results. And the 64 bit results on
    > x86/amd clearly shows gcc generates much better code than Sun Studio. The
    > lead is so large, I doubt some compiler flags would change the outcome.
    >
    > For SPARC I'm just running the benchmark once again. I only have an old
    > Blade 150 so the results will take some time.


    You should? find quite a difference with -fast and -target tuned to
    your particular CPU.
    But WinTel and SPARC thats apples and oranges maybe.
    But it turns out I built a 64 bit version of my own :

    compiler: cc -xcode=pic32 -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -
    D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -fns -fsimple=2 -fsingle -
    xalias_level=basic -xbuiltin=%all -xlibmil -xlibmopt -xmemalign=8s -
    xO5 -xprefetch=auto,explicit -xtarget=ultra3cu -xarch=v9b -xstrconst -
    Xa -DB_ENDIAN -DMD5_ASM
    Arbitrary result samples:
    /opt/local/bin/openssl speed rsa
    Doing 1024 bit public rsa's for 10s: 24611 1024 bit public RSA's in
    9.82s
    Now with /usr/sfw/bin/openssl 32 bit:
    Doing 1024 bit public rsa's for 10s: 11530 1024 bit public RSA's in
    9.87s
    And with -engine pkcs11 turned on
    Doing 1024 bit public rsa's for 10s: 16870 1024 bit public RSA's in
    9.81s

    So -engine seems to affect results but not as well as I remember in
    this sample anyway
    Another summed? sample:

    sign verify sign/s verify/s
    64bit:
    rsa 1024 bits 0.0076s 0.0004s 130.9 2506.2
    32bit w/o -engine
    rsa 1024 bits 0.0151s 0.0009s 66.2 1168.2
    with -engine:
    rsa 1024 bits 0.0031s 0.0006s 320.0 1719.7

    So much for my memory re: SUNWcry : <
    Its not faster than a self compile of my own after all.


  13. Sun Studio 11 vs. gcc 4.1.1 (was: 32 and 64 bit apps on Solaris 10)

    I did some further OpenSSL benchmarks to compare the optimizer of Studio 11
    vs. gcc 4.1.1.

    The contestants:

    Studio 11
    x86:
    cc: Sun C 5.8 Patch 121016-05 2007/01/10
    ube: Sun Compiler Common 11 Patch 120759-10 2007/02/05
    SPARC
    cc: Sun C 5.8 Patch 121015-04 2007/01/10
    fbe: Sun Compiler Common 11 Patch 120760-13 2007/03/08

    gcc 4.1.1
    x86
    Using built-in specs.
    Target: i386-sun-solaris2.10
    Configured with: ../gcc-4.1.1/configure --with-system-zlib --with-gnu-as --with-as=/usr/sfw/bin/gas --without-included-gettext --without-libiconv-prefix --enable-languages=c,c++,ada,fortran,objc --with-x --enable-java-awt=xlib
    Thread model: posix
    gcc version 4.1.1

    SPARC
    Using built-in specs.
    Target: sparc-sun-solaris2.10
    Configured with: ../gcc-4.1.1/configure --with-system-zlib --without-included-gettext --without-libiconv-prefix --enable-languages=c,c++,ada,fortran,objc,java --with-x --enable-java-awt=xlib
    Thread model: posix
    gcc version 4.1.1


    The benchmark:
    OpenSSL 0.9.8e with builtin test "openssl speed". Hand optimized
    assembler routines were turned off with "no-asm". libcrypto and
    libssl were generated and linked as static libraries.

    The generated binaries:

    .. SPARC 32bit cc
    options:bn(64,32) md2(int) rc4(ptr,char) des(ptr,risc1,16,long) aes(partial) idea(int) blowfish(ptr)
    compiler: cc -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -xtarget=ultra -xarch=v8plus -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W

    .. SPARC 32bit gcc
    options:bn(64,32) md2(int) rc4(ptr,char) des(idx,cisc,16,long) aes(partial) idea(int) blowfish(ptr)
    compiler: gcc -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -m32 -mcpu=ultrasparc -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W

    .. SPARC 64bit cc
    options:bn(64,64) md2(int) rc4(ptr,char) des(ptr,risc1,16,int) aes(partial) idea(int) blowfish(ptr)
    compiler: cc -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -xtarget=ultra -xarch=v9 -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN

    .. SPARC 64bit gcc
    options:bn(64,64) md2(int) rc4(ptr,char) des(ptr,risc1,16,int) aes(partial) idea(int) blowfish(ptr)
    compiler: gcc -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -m64 -mcpu=ultrasparc -O3 -Wall -DB_ENDIAN

    .. x86 32bit cc
    options:bn(64,32) md2(int) rc4(ptr,char) des(ptr,cisc,16,long) aes(partial) idea(int) blowfish(ptr)
    compiler: cc -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -fast -O -Xa

    .. x86 32bit gcc
    options:bn(64,32) md2(int) rc4(idx,int) des(ptr,risc1,16,long) aes(partial) idea(int) blowfish(idx)
    compiler: gcc -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -O3 -fomit-frame-pointer -march=pentium -Wall -DL_ENDIAN -DOPENSSL_NO_INLINE_ASM

    .. x86 64bit cc
    options:bn(64,64) md2(int) rc4(ptr,int) des(idx,cisc,16,int) aes(partial) idea(int) blowfish(ptr2)
    compiler: cc -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -fast -xarch=amd64 -xstrconst -Xa -DL_ENDIAN

    .. x86 64bit gcc
    options:bn(64,64) md2(int) rc4(ptr,int) des(idx,cisc,16,int) aes(partial) idea(int) blowfish(ptr2)
    compiler: gcc -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -m64 -O3 -Wall -DL_ENDIAN -DMD32_REG_T=int

    Test method:
    "openssl speed" was run three times against above generated binaries. The
    best individual results were taken for the comparisons.


    How to interpret the results:
    Results are percentages "A vs. B". Positive percentages means B was faster,
    negative percentages means A was faster. 100% (or -100%) means twice as
    fast. Calculation is basically:
    (resB - resA) / min(resA, resB) * 100 %
    resA and resB are the results from "openssl speed". Higher numbers are
    better.

    Benchmark platform:

    x86:
    Athlon 64 X2 4400+ (=== Opteron 175)

    SPARC:
    UltraSPARC IIe 650MHz, 512kB E-Cache

    And here are the results:


    (1) x86
    a. 32bit: Studio 11 vs. gcc
    16 Bytes 64 Bytes 256 Bytes 1024 Bytes 8192 Bytes
    md2 32.60% 32.80% 32.76% 32.64% 32.88%
    md4 22.04% 23.20% 26.03% 30.53% 34.48%
    md5 17.36% 16.50% 16.19% 16.49% 16.40%
    hmac(md5) 12.06% 13.10% 12.62% 15.50% 16.26%
    sha1 -2.07% -3.95% -11.73% -19.08% -23.21%
    rmd160 18.23% 17.37% 14.24% 13.03% 12.37%
    rc4 25.27% 26.29% 24.58% 24.75% 24.89%
    des cbc -45.43% -43.61% -44.27% -44.27% -44.00%
    des ede3 -111.88% -112.28% -113.31% -113.46% -113.23%
    idea cbc -8.58% -10.07% -9.63% -9.43% -9.15%
    rc2 cbc -4.93% -4.41% -4.44% -4.23% -4.33%
    blowfish cbc 6.82% 8.64% 9.45% 9.55% 9.82%
    cast cbc -80.29% -81.88% -82.45% -82.72% -82.41%
    aes-128 cbc 7.69% 8.79% 8.65% 8.68% 8.85%
    aes-192 cbc 7.46% 8.60% 8.24% 8.23% 8.44%
    aes-256 cbc 7.07% 7.96% 7.61% 7.78% 7.79%
    sha256 6.12% 7.29% 6.37% 5.69% 5.62%
    sha512 -15.17% -14.62% -21.41% -24.79% -25.31%
    sign/s verify/s
    rsa 512 bits 8.38% -10.19%
    rsa 1024 bits -3.65% -19.39%
    rsa 2048 bits -14.12% -24.53%
    rsa 4096 bits -22.64% -30.51%
    dsa 512 bits -3.36% -3.64%
    dsa 1024 bits -13.17% -11.27%
    dsa 2048 bits -21.59% -19.79%

    I'd say Studio 11 wins. On some benchmarks gcc is up to 40%
    faster, but on others Studio 11 is more than twice as fast.

    b. 64bit: Studio 11 vs. gcc
    16 Bytes 64 Bytes 256 Bytes 1024 Bytes 8192 Bytes
    md2 1.06% 1.04% 2.37% 2.34% 2.66%
    md4 -4.39% 0.62% 17.18% 43.08% 67.03%
    md5 8.59% 8.43% 18.73% 29.40% 38.23%
    hmac(md5) 35.51% 30.97% 34.19% 37.08% 39.57%
    sha1 13.11% 17.56% 46.08% 39.20% 35.99%
    rmd160 19.22% 31.41% 47.40% 60.76% 67.25%
    rc4 -14.33% -16.25% -14.38% -14.55% -14.38%
    des cbc 3.84% 4.86% 5.30% 5.23% 5.34%
    des ede3 8.16% 8.57% 8.81% 8.70% 9.03%
    idea cbc -5.79% -10.52% -11.52% -11.62% -11.98%
    rc2 cbc -6.03% -6.45% -6.32% -6.52% -6.24%
    blowfish cbc 19.66% 21.64% 20.23% 19.98% 19.60%
    cast cbc 42.77% 43.84% 44.41% 44.06% 44.29%
    aes-128 cbc 18.42% 18.78% 19.60% 19.28% 19.29%
    aes-192 cbc 20.27% 19.91% 20.45% 19.87% 19.90%
    aes-256 cbc 20.55% 20.20% 20.70% 20.30% 21.12%
    sha256 25.79% 31.41% 38.71% 42.12% 44.04%
    sha512 23.83% 23.61% 30.94% 34.44% 37.16%
    sign/s verify/s
    rsa 512 bits 47.67% 52.86%
    rsa 1024 bits 70.73% 67.10%
    rsa 2048 bits 86.26% 90.37%
    rsa 4096 bits 90.14% 94.20%
    dsa 512 bits 67.72% 65.82%
    dsa 1024 bits 80.70% 84.85%
    dsa 2048 bits 90.97% 93.68%

    Big difference. Clear winner is gcc. It wins most of the benchmarks with a
    large margin (up to 90%) and loses only a few with a small gap (no more than
    15%)

    c. Studio 11: 32bit vs. 64bit
    16 Bytes 64 Bytes 256 Bytes 1024 Bytes 8192 Bytes
    md2 17.05% 16.62% 15.77% 15.62% 15.56%
    md4 21.35% 17.73% 7.81% -2.74% -10.71%
    md5 12.88% 8.55% -0.11% -9.16% -16.33%
    hmac(md5) 3.44% 2.90% -4.58% -12.17% -16.92%
    sha1 -3.83% -7.88% -41.04% -40.91% -41.01%
    rmd160 0.03% -9.79% -24.21% -35.32% -41.08%
    rc4 75.82% 78.00% 75.45% 76.05% 75.98%
    des cbc -9.60% -9.73% -10.57% -10.60% -10.64%
    des ede3 -13.15% -13.59% -14.15% -14.12% -14.24%
    idea cbc 6.43% 6.27% 5.99% 6.07% 6.14%
    rc2 cbc 2.14% 1.93% 1.61% 1.91% 1.62%
    blowfish cbc -10.17% -13.02% -12.01% -11.97% -11.37%
    cast cbc -30.04% -32.15% -33.25% -33.00% -33.42%
    aes-128 cbc 64.80% 67.57% 67.16% 68.07% 68.46%
    aes-192 cbc 67.73% 69.10% 69.34% 70.56% 71.03%
    aes-256 cbc 69.24% 71.83% 71.78% 72.27% 71.38%
    sha256 -14.47% -20.42% -28.99% -34.16% -36.63%
    sha512 90.29% 91.80% 116.19% 130.04% 137.86%
    sign/s verify/s
    rsa 512 bits 43.44% 29.72%
    rsa 1024 bits 30.87% 18.90%
    rsa 2048 bits 17.08% 4.03%
    rsa 4096 bits 9.23% -2.57%
    dsa 512 bits 31.57% 28.90%
    dsa 1024 bits 22.15% 20.69%
    dsa 2048 bits 7.72% 7.55%

    Hmm, better compare it to the gcc results.

    d. gcc: 32bit vs. 64bit
    16 Bytes 64 Bytes 256 Bytes 1024 Bytes 8192 Bytes
    md2 -12.10% -12.70% -12.02% -12.10% -12.00%
    md4 -4.99% -4.00% 0.24% 6.69% 12.19%
    md5 4.44% 1.04% 2.07% 1.77% 2.08%
    hmac(md5) 25.10% 19.17% 13.94% 5.81% 2.67%
    sha1 11.19% 13.28% 15.72% 17.63% 18.82%
    rmd160 0.87% 1.99% 3.88% 5.11% 5.51%
    rc4 22.76% 21.24% 23.13% 23.21% 23.19%
    des cbc 37.79% 37.23% 37.40% 37.27% 37.10%
    des ede3 102.54% 102.91% 103.35% 103.31% 103.50%
    idea cbc 9.24% 5.83% 4.20% 3.99% 3.46%
    rc2 cbc 1.08% -0.02% -0.18% -0.27% -0.21%
    blowfish cbc 1.68% -0.94% -1.96% -2.24% -2.26%
    cast cbc 97.92% 97.96% 97.73% 97.91% 97.28%
    aes-128 cbc 81.22% 82.96% 84.01% 84.46% 84.62%
    aes-192 cbc 87.72% 86.70% 88.44% 88.91% 89.11%
    aes-256 cbc 90.55% 91.31% 92.69% 92.30% 92.58%
    sha256 3.55% 1.71% 1.10% 0.23% -0.18%
    sha512 171.39% 171.75% 243.69% 285.91% 308.85%
    sign/s verify/s
    rsa 512 bits 95.44% 118.50%
    rsa 1024 bits 131.59% 137.20%
    rsa 2048 bits 148.87% 146.62%
    rsa 4096 bits 154.72% 147.09%
    dsa 512 bits 128.09% 121.52%
    dsa 1024 bits 149.80% 148.22%
    dsa 2048 bits 150.11% 149.51%

    In contrast to Studio 11, binaries compiled with gcc get a huge
    performance gain by just compiling them 64bit.


    (2) SPARC
    a. 32bit: Studio 11 vs. gcc
    16 Bytes 64 Bytes 256 Bytes 1024 Bytes 8192 Bytes
    md2 -14.99% -15.46% -15.87% -16.02% -15.90%
    md4 6.73% 5.50% 6.14% 9.93% 13.66%
    md5 -11.51% -3.24% -2.49% -0.86% 0.80%
    hmac(md5) -10.71% -5.32% -3.47% -1.06% 0.66%
    sha1 -8.82% -12.79% 44.78% 9.15% -12.46%
    rmd160 20.38% -8.16% 3.31% 19.66% 33.26%
    rc4 -2.85% -8.07% -10.11% -2.25% -9.34%
    des cbc 4.78% 5.23% 5.25% 5.31% 6.82%
    des ede3 -0.01% 0.26% 0.28% 0.35% 1.07%
    idea cbc -9.86% -10.06% -10.06% -10.03% -10.35%
    rc2 cbc -7.16% -6.26% -5.76% -5.24% -5.96%
    blowfish cbc 4.50% 4.32% 3.98% 0.47% -3.13%
    cast cbc -11.24% -15.48% -16.29% -15.20% -5.53%
    aes-128 cbc -0.71% -12.92% -17.14% -18.44% -18.25%
    aes-192 cbc -8.25% -12.09% -13.56% -14.05% -13.96%
    aes-256 cbc -13.25% -15.20% -16.13% -18.54% -16.09%
    sha256 -15.82% -15.98% -16.10% -17.17% -18.09%
    sha512 -216.24% -217.43% -263.80% -279.27% -294.03%
    sign/s verify/s
    rsa 512 bits -28.93% -34.72%
    rsa 1024 bits -38.64% -42.13%
    rsa 2048 bits -43.90% -46.32%
    rsa 4096 bits -50.00% -48.74%
    dsa 512 bits -36.62% -35.38%
    dsa 1024 bits -42.53% -43.78%
    dsa 2048 bits -46.98% -44.80%

    Clear winner: Studio 11

    b. 64bit: Studio 11 vs. gcc
    16 Bytes 64 Bytes 256 Bytes 1024 Bytes 8192 Bytes
    md2 -11.69% -12.39% -12.48% -12.67% -12.73%
    md4 -12.20% 1.29% 4.74% 8.76% 11.14%
    md5 -9.69% -6.62% -3.53% 0.13% 1.88%
    hmac(md5) -10.52% -4.58% -1.69% 1.34% 2.25%
    sha1 -2.85% 0.01% 94.10% 38.80% 5.27%
    rmd160 -9.58% -18.76% -7.46% 7.59% 20.04%
    rc4 4.94% 1.32% 0.23% -0.13% -0.17%
    des cbc -38.79% -49.12% -52.06% -52.42% -43.49%
    des ede3 -64.02% -68.65% -69.81% -69.96% -65.78%
    idea cbc -5.10% -5.07% -5.09% -5.18% -5.48%
    rc2 cbc -6.77% -7.11% -7.17% -7.19% -7.05%
    blowfish cbc -13.97% -14.40% -14.37% -14.48% -19.17%
    cast cbc -15.09% -18.38% -19.92% -17.75% -15.60%
    aes-128 cbc -21.24% -27.27% -28.97% -29.42% -24.67%
    aes-192 cbc -21.40% -26.47% -27.57% -27.90% -23.49%
    aes-256 cbc -24.05% -27.98% -29.72% -29.95% -26.03%
    sha256 -47.39% -61.20% -74.79% -82.19% -83.30%
    sha512 -27.44% -26.52% -31.95% -37.04% -36.03%
    sign/s verify/s
    rsa 512 bits 4.63% 4.62%
    rsa 1024 bits 4.17% 0.70%
    rsa 2048 bits 3.45% 1.94%
    rsa 4096 bits 0.00% 1.23%
    dsa 512 bits 4.39% 7.81%
    dsa 1024 bits 2.87% 2.17%
    dsa 2048 bits 1.89% 2.31%

    Clear winner: Studio 11 again

    c. Studio 11: 32bit vs. 64bit
    16 Bytes 64 Bytes 256 Bytes 1024 Bytes 8192 Bytes
    md2 -13.12% -14.15% -15.38% -15.77% -15.63%
    md4 6.48% -4.98% -5.54% -6.52% -6.64%
    md5 -10.28% -5.70% -6.13% -7.12% -6.81%
    hmac(md5) -5.70% -9.20% -8.26% -7.67% -6.92%
    sha1 -10.78% -14.21% -32.53% -21.89% -12.62%
    rmd160 -7.58% -15.06% -11.25% -6.34% -3.24%
    rc4 0.39% 0.38% 0.08% 8.46% 1.26%
    des cbc 1.76% 7.15% 8.84% 9.20% 8.67%
    des ede3 3.06% 5.26% 5.74% 5.89% 5.80%
    idea cbc 2.65% 2.79% 2.81% 2.83% 2.79%
    rc2 cbc 0.48% 0.50% 0.53% 2.41% 0.53%
    blowfish cbc 17.58% 19.14% 19.10% 15.20% 10.59%
    cast cbc -33.03% -35.81% -36.78% -39.88% -36.90%
    aes-128 cbc 12.43% 5.74% 3.57% 2.84% 1.97%
    aes-192 cbc 5.23% 5.41% 4.95% 4.79% 3.88%
    aes-256 cbc 1.98% 3.21% 3.80% 3.74% 3.32%
    sha256 -8.55% -6.98% -5.00% -4.96% -5.62%
    sha512 27.83% 26.37% 44.28% 56.66% 60.30%
    sign/s verify/s
    rsa 512 bits 7.41% -1.30%
    rsa 1024 bits -1.67% -2.04%
    rsa 2048 bits -1.72% -3.25%
    rsa 4096 bits 0.00% -3.86%
    dsa 512 bits -1.71% -3.35%
    dsa 1024 bits -3.01% -4.00%
    dsa 2048 bits -3.30% -4.62%

    d. gcc: 32bit vs. 64bit
    16 Bytes 64 Bytes 256 Bytes 1024 Bytes 8192 Bytes
    md2 -9.86% -11.11% -12.01% -12.43% -12.46%
    md4 -12.46% -9.34% -6.96% -7.67% -9.06%
    md5 -8.49% -9.16% -7.21% -6.07% -5.67%
    hmac(md5) -5.52% -8.44% -6.40% -5.12% -5.26%
    sha1 -4.71% -1.25% 1.16% 4.34% 5.12%
    rmd160 -41.91% -26.33% -23.51% -18.27% -14.61%
    rc4 8.36% 9.92% 10.46% 10.75% 10.54%
    des cbc -42.92% -46.46% -47.05% -47.00% -41.05%
    des ede3 -59.14% -60.64% -61.05% -61.07% -58.37%
    idea cbc 7.31% 7.68% 7.67% 7.57% 7.53%
    rc2 cbc 0.84% -0.30% -0.80% 0.54% -0.50%
    blowfish cbc -1.29% -0.18% 0.16% 0.16% -4.49%
    cast cbc -37.64% -39.22% -41.04% -42.96% -49.97%
    aes-128 cbc -7.07% -6.58% -6.30% -6.25% -3.39%
    aes-192 cbc -6.58% -7.04% -7.04% -7.01% -4.31%
    aes-256 cbc -7.40% -7.63% -7.61% -5.68% -5.08%
    sha256 -38.15% -48.69% -58.07% -63.20% -63.94%
    sha512 217.21% 217.07% 297.80% 333.56% 364.33%
    sign/s verify/s
    rsa 512 bits 44.90% 39.14%
    rsa 1024 bits 42.05% 40.27%
    rsa 2048 bits 46.34% 44.47%
    rsa 4096 bits 50.00% 44.97%
    dsa 512 bits 40.23% 41.23%
    dsa 1024 bits 42.34% 41.24%
    dsa 2048 bits 44.97% 41.60%

    In contrast to x86/amd64 there are only a few benchmarks which do perform
    better compiled as 64bit. On SPARC you usually loose a few performance
    percentages when you compile an application as 64bit.


    Conclusion: On SPARC Studio 11 generates the best code almost all of the
    time compared to gcc.

    On x86 the results are mixed: In 32bit Studio 11 usually generates better
    code, but there are also benchmarks which favour gcc. Better stay away
    from Studio 11 64bit code. It maybe even slower than the 32bit code and
    is way behind gcc's 64bit code generation.

    --
    Daniel

  14. Re: Sun Studio 11 vs. gcc 4.1.1

    On Sun, 13 May 2007 22:40:49 +0000 (UTC) "Daniel Rock" wrote:
    > I did some further OpenSSL benchmarks to compare the optimizer of Studio 11
    > vs. gcc 4.1.1.

    ....
    > The benchmark:
    > OpenSSL 0.9.8e with builtin test "openssl speed". Hand optimized
    > assembler routines were turned off with "no-asm". libcrypto and
    > libssl were generated and linked as static libraries.

    ....
    > Conclusion: On SPARC Studio 11 generates the best code almost all of the
    > time compared to gcc.
    >
    > On x86 the results are mixed: In 32bit Studio 11 usually generates better
    > code, but there are also benchmarks which favour gcc. Better stay away
    > from Studio 11 64bit code. It maybe even slower than the 32bit code and
    > is way behind gcc's 64bit code generation.


    I would just say, be careful about generalizing this from OpenSSL to code
    in general.

    Also, this does not mean that OpenSSL should be compiled with Studio 11.
    (You disabled the asm routines.)

    -frank

  15. Re: 32 and 64 bit apps on Solaris 10

    On 12 May 2007 09:53:42 -0700, csgonan@yahoo.com wrote:

    >I have a new solaris 10 v440 server, and this is my first 64 bit and
    >Solaris 10 install.
    >
    >When I compile (ie) openssl, defining only LD_LIBRARY_PATH and
    >pointing it to the 64 bit libraries, it compiles fine.
    >
    >I read that if you define LD_LIBRARY_PATH32 and LD_LIBRARY_PATH64 to
    >point to the appropriate libraries, it should compile fine. So I
    >added those variables (along with LD_LIBRARY_PATH pointing to 32 bit
    >libs), and it fails and I got ELF32 errors cause I was compiling 64
    >bit. So I removed the LD_LIBRARY_PATH variable and the compile goes
    >much further but fails saying it can't find gcclib.s.so.1. I search
    >for that file and it is in the directory specified by
    >LD_LIBRARY_PATH64. I do NOT get any ELF32 or ELF64 errors.


    Where did you get the compiler? Solaris 10 does not include a compiler.

    >I have to get this environment to work, being able to compile both 32
    >and 64 bit. Any suggestions? I see alot of people talk about
    >libtool, but I am unfamiliar with it.


    I'm not familer with the non-word alot. Its not in any online dictionaries.
    Please define.



    >
    >Thanks


    Barry
    =====
    Home page
    http://members.iinet.net.au/~barry.og
    I do not represent atheists or atheism

  16. Re: Sun Studio 11 vs. gcc 4.1.1

    On May 13, 6:48 pm, Frank Cusack wrote:
    > On Sun, 13 May 2007 22:40:49 +0000 (UTC) "Daniel Rock" wrote:
    >
    > > I did some further OpenSSL benchmarks to compare the optimizer of Studio 11
    > > vs. gcc 4.1.1.
    > > The benchmark:
    > > OpenSSL 0.9.8e with builtin test "openssl speed". Hand optimized
    > > assembler routines were turned off with "no-asm". libcrypto and
    > > libssl were generated and linked as static libraries.

    I used shared..
    > > Conclusion: On SPARC Studio 11 generates the best code almost all of the
    > > time compared to gcc.

    Yay
    > > On x86 the results are mixed: In 32bit Studio 11 usually generates better
    > > code, but there are also benchmarks which favour gcc. Better stay away
    > > from Studio 11 64bit code. It maybe even slower than the 32bit code and
    > > is way behind gcc's 64bit code generation.

    Maybe.
    > I would just say, be careful about generalizing this from OpenSSL to code
    > in general.


    And all benchmarks?? : >
    I think we know that these tests are an indicator at best.

    > Also, this does not mean that OpenSSL should be compiled with Studio 11.
    > (You disabled the asm routines.)


    I think that was intentional.

    More numbers from me after Daniel throws down a rather large gauntlet:
    Blade 2000 dual 1.2 MHz
    Studio 12 SPARC 32 bit:
    rsa 1024 bits 0.015939s 0.000839s 62.7 1191.7
    rsa 4096 bits 0.712143s 0.010901s 1.4 91.7
    64 bit:
    rsa 1024 bits 0.006890s 0.000375s 145.1 2668.0
    rsa 4096 bits 0.282000s 0.004318s 3.5 231.6
    Both runs had the same options
    -xcode=pic32 -fast -xtarget=ultra3cu
    Diffs:
    -xarch=v8plusb, -xarch=v9a
    64 bit wins.


  17. Re: 32 and 64 bit apps on Solaris 10

    Barry OGrady writes:

    >Where did you get the compiler? Solaris 10 does not include a compiler.


    It does include /usr/sfw/bin/gcc

    Casper
    --
    Expressed in this posting are my opinions. They are in no way related
    to opinions held by my employer, Sun Microsystems.
    Statements on Sun products included here are not gospel and may
    be fiction rather than truth.

  18. Re: Sun Studio 11 vs. gcc 4.1.1

    On 13 May 2007 21:53:12 -0700 gerryt wrote:
    > On May 13, 6:48 pm, Frank Cusack wrote:
    >> Also, this does not mean that OpenSSL should be compiled with Studio 11.
    >> (You disabled the asm routines.)

    >
    > I think that was intentional.


    Yes, of course ... in order to compare Studio 11 code generation to gcc
    code generation. I just didn't want the casual reader to walk away with
    the lesson that OpenSSL should be compiled with Studio 11.

    -frank

  19. Re: Sun Studio 11 vs. gcc 4.1.1

    On Sun, 13 May 2007 18:48:08 -0700 Frank Cusack wrote:
    > On Sun, 13 May 2007 22:40:49 +0000 (UTC) "Daniel Rock" wrote:
    >> I did some further OpenSSL benchmarks to compare the optimizer of Studio 11
    >> vs. gcc 4.1.1.

    > ...
    >> The benchmark:
    >> OpenSSL 0.9.8e with builtin test "openssl speed". Hand optimized
    >> assembler routines were turned off with "no-asm". libcrypto and
    >> libssl were generated and linked as static libraries.

    > ...
    >> Conclusion: On SPARC Studio 11 generates the best code almost all of the
    >> time compared to gcc.
    >>
    >> On x86 the results are mixed: In 32bit Studio 11 usually generates better
    >> code, but there are also benchmarks which favour gcc. Better stay away
    >> from Studio 11 64bit code. It maybe even slower than the 32bit code and
    >> is way behind gcc's 64bit code generation.

    >
    > I would just say, be careful about generalizing this from OpenSSL to code
    > in general.
    >
    > Also, this does not mean that OpenSSL should be compiled with Studio 11.
    > (You disabled the asm routines.)


    Oh, make sure that you are using -mno-app-regs with gcc on sparc.
    When compiling libraries you need to do that with gcc-4.x. (It
    is the default setting for gcc-3.x.) I don't know what Studio does.

    -mno-app-regs
    -mapp-regs

    Specify -mapp-regs to generate output using the global registers 2
    through 4, which the SPARC SVR4 ABI reserves for
    applications. This is the default.

    To be fully SVR4 ABI compliant at the cost of some performance
    loss, specify -mno-app-regs. You should compile libraries and
    system software with this option.

    -frank

  20. Re: 32 and 64 bit apps on Solaris 10


    "Barry OGrady" wrote:
    > Where did you get the compiler? Solaris 10 does not include a compiler.


    Solaris 10 ships Sun Studio 11 on the "Development Tools" DVD
    (I think thats with 10 06/06 and higher), and gcc under /usr/sfw/bin/gcc.


    Thomas

+ Reply to Thread
Page 1 of 2 1 2 LastLast