[Simh] VAX Emulation Speed Ramblings...

Mark Pizzolato mark at infocomm.com
Thu Aug 26 23:01:54 EDT 2004


I agree with all of the ideas that have been thrown out.

Personally, I've done several things beyond where the current
codebase is to speed things up:

  1) With a Windows host, Microsoft Visual Studio 2003's C compiler
does a significantly better job than gcc's best optimization. 
Yielding approximately a 15% improvement in instruction speed.

  2) I used a profiler and found a couple of hot spots that caused
another gain of 10% using Visual Studio's compiler, and just a couple
of percent with gcc by forcing a particular function to be inlined.

  3) I've carefully analyzed the device polling intervals used by
several devices to produce minimal overhead for the polls which only
steal available cycles to execute instructions.

That's the best I could do with the CPU execution without resorting
to dramatically different techniques as mentioned by others.

For I/O:

  4) I've optimized the VAX DMA code, which provided an increase of
about 15% total I/O transfer rates, but these DMA rates are already
FAR above what was available with real hardware on a MicroVAX.  I'm
seeing about 25MB/sec to/from disk on my 1Ghz PIII notebook computer
to/from host cache (not acutally touching the disk).

  5) I've thought quite a bit about going away from the single thread
polled model currently ingrained in SIMH and provide a threaded I/O
framework.  This would only help avoid simulated CPU stalls during
real I/O waits which would help random disk I/O operations behave
better.  I haven't gone far with this due to it being in the realm of
diminishing returns, and my not being motivated enough.

I've got a Pentium IV 2.8Ghz system purchased 18 months ago, on which
a SIMH VAX does 14500 V1.1 dhrystones per second (VAX 780 was 1857). 
That is 7.8 VUPs by my calculation.  What 1.2ghz system is producing
5 VUPS?

- Mark Pizzolato

--- Robert Lawrence <rob at rjltech.com> wrote:

> This "Accelerated CPU Emulation" sounds very similar in concept to
> JIT
> used in many emulators such a ARanyM (Atari ST), Baskilisk (Mac
> 68K),
> UAE (Amiga), and PearPC (PowerPC Mac).
> 
> I am not an emulator-level programmer, but I wonder if JIT can be
> applied to simh?
> 
> Robert
> 
> Norman Lastovica wrote:
> 
> >assuming that this REVIVER is (or is based on) charon-vax, SRI
> claims:
> >
> >	"Using a technology known as Accelerated CPU Emulation (ACE), 
> >	the emulator dynamically optimizes the emulation of the VAX 
> >	instructions, providing an improvement of 3 to 5 times over 
> >	emulators without ACE.
> >
> >	"The ACE technology in CHARON-VAX/Industrial Plus does not 
> >	require intermediate storage of translated code, but provides 
> >	its full capability instantly. As the optimization takes place 
> >	below the emulated hardware level, the emulator remains fully 
> >	VAX hardware compatible and is completely transparent to VAX 
> >	operating systems and applications, like the earlier CHARON-VAX 
> >	emulators. "
> >
> >  
> >
> >>-----Original Message-----
> >>From: simh-bounces at trailing-edge.com
> >>[mailto:simh-bounces at trailing-edge.com]On Behalf Of Kevin Brunt
> >>Sent: Thursday, August 26, 2004 2:48 PM
> >>To: Kevin Handy
> >>Cc: simh at trailing-edge.com
> >>Subject: Re: [Simh] VAX Emulation Speed Ramblings...
> >>
> >>
> >>
> >>On Thu, 26 Aug 2004 13:01:56 -0600 Kevin Handy <kth at srv.net>
> wrote:
> >>
> >>    
> >>
> >>>Robert Lawrence wrote:
> >>>
> >>>      
> >>>
> >>>>According to 
>
>>>>http://www.comwaretech.com/products/legacy_solutions/microvax.shtml,
> >>>>"The REVIVER-VAX performance scales linearly with the PC's CPU
> speed. 
> >>>>For integer operations, REVIVER-VAX provides a performance of
> about 
> >>>>one VAX Unit of Processing (VUP) per 100 MHz of CPU clock. Disk
> I/O is 
> >>>>5 to 20 times faster than on the original VAX."
> >>>>
> >>>>How are they doing this?  Are they using some sort of JIT?  I
> get 
> >>>>about 5 VUPs from a 1.2ghz using simh.  According to their 
> >>>>calculations, 12 VUPs should be possible.
> >>>>
> >>>>What methods can be used to increase performance of simh/vax on
> any 
> >>>>given pc?
> >>>>
> >>>>        
> >>>>
> >>>You are only looking at a ~2x difference in speed. Some
> possibilities:
> >>>
> >>>1. Hand tuned machine language code.
> >>>
> >>>Compilers can do a good job, but handcrafted machine code can
> >>>make a large improvement, and a 2x difference should be
> possible.
> >>>
> >>>However, you would then tie the emulator to run on only one
> >>>specific CPU.
> >>>
> >>>2. Improve the optimizers.
> >>>
> >>>Make the compilers produce better/faster code.
> >>>
> >>>3. Hand optimization.
> >>>
> >>>Look for hot-spots in the simh code, and speed them up.
> >>>
> >>>4. Less accurate emulation.
> >>>
> >>>If it doesn't have to produce the correct answer, you can make
> it
> >>>as fast as you want.
> >>>
> >>>      
> >>>
> >>>>Thanks,
> >>>>        
> >>>>
> >>You've possibly missed the underlying point which is that it's
> not 
> >>really fair comparing simh with a commercial product. Somebody is
> being 
> >>*paid* to make 'REVIVER-VAX' fast, no doubt getting the
> performance at 
> >>the expense of maintainability and portability - tuning a program
> up is 
> >>always something that is done *after* you've finished writing it.
> >>
> >>The first place to look at in trying to speed up any emulator has
> to be 
> >>the memory access code - it's accessed repeatedly during (almost)
> every 
> >>instruction cycle. Every native instruction squeezed out here
> would 
> >>have the greatest overall effect.
> >>
> >>Kevin
> >>
> >>_______________________________________________
> >>Simh mailing list
> >>Simh at trailing-edge.com
> >>http://mailman.trailing-edge.com/mailman/listinfo/simh
> >>
> >>    
> >>
> >_______________________________________________
> >Simh mailing list
> >Simh at trailing-edge.com
> >http://mailman.trailing-edge.com/mailman/listinfo/simh
> >
> >
> >
> >  
> >
> 
> 
> _______________________________________________
> Simh mailing list
> Simh at trailing-edge.com
> http://mailman.trailing-edge.com/mailman/listinfo/simh
> 




More information about the Simh mailing list