performance of runing 32/64 bit program in 64 bit kernel.

performance of runing 32/64 bit program in 64 bit kernel.

Post by Andrew La » Sun, 23 Jun 2002 15:29:40



Hi,

After I have installed solaris 9, I have boot solaris 9 as 64-bit kernel
bash-2.05# isainfo -b
64
boot-file=kernel/sparcv9/unix

Howerver, I found that most of the programs in 32bit.
bash-2.05# file /usr/bin/ls
/usr/bin/ls:    ELF 32-bit MSB executable SPARC Version 1, dynamically
linked, stripped

So, I am bit confused here. For example, if I try to download ncurses5.2
, should I compile it as 32 bit or 64 bit?
would 32bit programs running in 64bit kernel will make performance
slower/faster ? If so, should I fall back to the  32 bit kernel ?

many thankx

cheers,
andrew.

 
 
 

performance of runing 32/64 bit program in 64 bit kernel.

Post by Darren Dunha » Fri, 28 Jun 2002 01:02:38



> Hi,
> After I have installed solaris 9, I have boot solaris 9 as 64-bit kernel
> bash-2.05# isainfo -b
> 64
> boot-file=kernel/sparcv9/unix
> Howerver, I found that most of the programs in 32bit.
> bash-2.05# file /usr/bin/ls
> /usr/bin/ls:    ELF 32-bit MSB executable SPARC Version 1, dynamically
> linked, stripped
> So, I am bit confused here. For example, if I try to download ncurses5.2
> , should I compile it as 32 bit or 64 bit?

It's up to you, but a 32 bit program should run on kernels, while a 64
bit program will only run on a 64 bit kernel.

Quote:> would 32bit programs running in 64bit kernel will make performance
> slower/faster?

In most cases, there is little effect.  There might be some differences
due to shoving around larger pointers in a 64 bit app, but I don't think
they're large in a "normal" app.

Quote:> If so, should I fall back to the  32 bit kernel ?

Probably unnecessary.

Most 32 bit programs will run at (roughly) the same speed as 64 bit
programs.  

There is no need to go out and recompile J. Random Program as a 64 bit
binary.

Compelling reasons for particular programs are the need to read kernel
memory (top, lsof, ...), or to handle large VM maps (>4GB).  You also
get around file descriptor limits in stdio, I believe.

--

Unix System Administrator                    Taos - The SysAdmin Company
Got some Dr Pepper?                           San Francisco, CA bay area
         < This line left intentionally blank to confuse you. >

 
 
 

performance of runing 32/64 bit program in 64 bit kernel.

Post by Andrew Gabri » Fri, 28 Jun 2002 06:29:27




Quote:> Hi,

> After I have installed solaris 9, I have boot solaris 9 as 64-bit kernel
> bash-2.05# isainfo -b
> 64
> boot-file=kernel/sparcv9/unix

> Howerver, I found that most of the programs in 32bit.
> bash-2.05# file /usr/bin/ls
> /usr/bin/ls:    ELF 32-bit MSB executable SPARC Version 1, dynamically
> linked, stripped

> So, I am bit confused here. For example, if I try to download ncurses5.2
> , should I compile it as 32 bit or 64 bit?
> would 32bit programs running in 64bit kernel will make performance
> slower/faster ? If so, should I fall back to the  32 bit kernel ?

Build user level programs as 32 bit unless they can make
use of features only available to 64 bit programs to
improve performance (such as > 4Gb address space), or
they need to be 64 bit to interface with something else
(applies mainly to things which interrogate things
relating to other 54 bit processes).

Simply rebuilding a 32 bit process as a 64 bit process
without making use of any addition 64 bit facilities
results in a slower program because the working set size
will be more so it won't make such good use of caches,
etc. (This will be most noticable with CPU-intensive
applications.) Some applications (databases being the
classic example) can more than make up for this by
making use of 64-bit features. If you do build 64 bit
executables, you would probably also need to build 32 bit
versions anyway for people who can't run 64 bit kernels.

Remember also that sparc v9 runs both 32 bit and 64 bit
processes natively, so there's no emulation overhead which
is well known for killing the performance of some other
non-sparc processors in the press at the moment.

--
Andrew Gabriel
Consultant Software Engineer

 
 
 

1. 64-bit kernel vs. 32-bit kernel

I've just installed Solaris 7 on an Ultra 1, and am getting familiar
with it. One of the first things I noticed different from Solaris 2.6 was
the machine telling me that the PROM was too old for 64-bit stuff. So
I let it update it (I had to set a jumper to allow this).

Now, the PROM is at the new level, but I get this still at boot up:

----

SunOS Release 5.7 Version Generic [UNIX(R) System V Release 4.0]
Copyright (c) 1983-1998, Sun Microsystems, Inc.

NOTICE: 64 bit OS installed, but the 32-bit OS is the default
        for the processor(s) on this system.
        See boot(1M) for more information.

Booting the 32-bit OS ...

----

Can anyone shed any light on this? I think I can figure out how to get it
to boot the 64-bit kernel - that's really not the issue. I'm just wondering
why it didn't boot it in the first place, if the Ultra 1 can support it.
The boot(1M) manpage says:

               On systems capable of support-
               ing both the 32-bit and 64-bit kernels, the 64-bit
               kernel  will be chosen in preference to the 32-bit
               kernel.

Of course, then it says:

               boot  chooses an appropriate default file
               to  boot   based  on what software is installed on
               the system, the capabilities of the  hardware  and
               firmware, and on a user configurable policy file.

Which seems to contradict somewhat the previous statement.

Also, if I choose to boot 64-bit, what are some of the gotchas?

Thanks in advance. Email cc's appreciated.

--
Griff Miller II
Senior Unix/NT Sysadmin
PGS Tensor - Houston, TX            "I need to be the owner of all of

2. 3rd Party Display Monitors for IBM 5081??

3. Upgrading from 32-Bit Sparc-Kernel to 64-Bit sparcv9-Kernel??

4. Windows 3.1 under dosemu, anyone Had an unable to load VTDAPI.386 error message on startup ?

5. Can I downgrade 64-bit kernel to 32-bit kernel

6. Program hangs after UID change.

7. Performance Issues on Sun Solaris 64-bit vs. 32-bit

8. X - Background Image

9. Solaris 9 installed with 32 & 64 bit supports but boots in 32 bit mode

10. linking a 64 bit program with a 32 bit library?

11. rss and vsz for 64-bit application from 32-bit program

12. 32 bit driver in 64 bit kernel