FAQ: Emulator speed

Speed testing with different host processors
Speed testing with ethernet involved
Speed testing with different TME GCC compile options
Fastest way to run Sun3 applications

 

Speed testing with different host processors

Execution time comparison for a CPU intensive task to complete running on real Sun3(x)s and inside TME.
TME compiled with NetBSD 3.1, gcc-3.3.3 in all cases.

Application running inside TME: Assembling, compiling, and linking assembly and Ada code under SunOS 4.1.1
Assembler/compiler/linker and all data files stored on local hard drive:

Host system Host processor speed Minutes ~Emulated MHz ~ratio: Host MHz to Emulated MHz
Real Sun 3/80 20 MHz 40.97 - -
         
Intel Pentium 4 1296.14 MHz 38.92 21 MHz 62
Intel Pentium 4 2266.39 MHz 22.17 37 MHz 61
Intel Pentium 4 3790.76 MHz 12.02 68 MHz 56
         
AMD Opteron 150 2393.34 MHz 11.53 71 MHz 34

So, very roughly, divide your Intel MHz by 60 - and divide your AMD Mhz by 35 to get emulated Sun3 MHz.

 

Speed testing with ethernet involved

BUT - the emulator is emulating more than just the 68020.  Its also emulating every single chip in the system - such as the Intel Ethernet i285x6 chip.  On a real Sun3, all the chips are running in parallel: the i825x6 chip can be processing ethernet packets while the 68020 is busy compiling, but with the emulator everything is emulated sequentially, so that the emulated 68020 is on hold while the i825x6 chip is being emulated.

So with the exact same scenario above - but with the assembler/compiler/linker and all data files NFS mounted on a remote system, the real sun3 takes slightly longer, and the emulator takes even longer:

Host system Host processor speed Time to compile locally (min) Time to compile NFS mounted (min) Percentage increase
Real Sun 3/80 20 MHz 40.97 43.58 6%
         
AMD Opteron 150 2393.34 MHz 11.53 13.85 20% -  Note 1

Note 1: The prior TME release had "delay 10000" on the bpf line in SUN-CARRERA.  With the delay, the increase in time was 72%.  This delay has been removed from the current release.  Matt explained:

This line was copied over from SUN2-MULTIBUS, and
predates the SCSI support, back when tme always had to network boot.
There was (and still is, I should have filed a PR) a race condition in
the NetBSD kernel RARP client, where if the network interface is
actually too fast, the kernel never sees its RARP reply.  So I added
the "delay" option to tme/host/bsd/bpf to slow the network down.
I've removed the delay 10000 from SUN3-CARRERA for the next release.
 

Speed testing with different TME GCC compile options

Below is the time required for the same application with everything stored on the local drive, under TME compiled with different GCC options:

Host system GCC / optimization minutes
Intel Pentium 4, 2266.39 Mhz gcc-3.3.3 22.17
Intel Pentium 4, 2266.39 Mhz gcc-3.3.3 -O0 28.93
Intel Pentium 4, 2266.39 Mhz gcc-4.1.1 22.78
Intel Pentium 4, 2266.39 Mhz gcc-4.1.1 -O0 33.65

 

Fastest way to run Sun3 applications

As shown in the first table, with today's fastest Intel/AMD chip, the emulator runs about twice as fast (70 MHz) as the fastest Sun3/3x (33MHz).  If you have a binary (such as from SunOS) that won't run under NetBSD 3.0 or NetBSD 1.5.3 (see the FAQ-sun3-in-and-out-of-the-emulator for more details), then the emulator is the fastest solution on the planet.

But... if you have a NetBSD binary (or a SunOS binary that runs under NetBSD), then your fastest option is to forgo the emulator and run NetBSD directly on a MVME177 single-board-computer.  With a 60Mhz 68060 and 256Mb of memory, the mvme177 should run about twice as fast as the emulator on the fastest Intel/AMD chip (since a 68060 has 2 to 3 times the performance capability of the 68040) - and even faster, relatively, if you were doing lots of ethernet access.  But then you'd never get to see the cool Sun logo upon booting the emulated Sun3.


Get your cool ILVSUN3 paraphernalia!
I have a bet going on how many ILVSUN3 dog t-shirts I can sell by Christmas 2007.  Oh YEAH!

ILVSUN3 home