[uae] Re: euae not using all available cycles?

  • From: Richard Drummond <evilrich@xxxxxxxxxxxxxx>
  • To: uae@xxxxxxxxxxxxx
  • Date: Fri, 27 Apr 2007 00:20:51 -0400

Hi Don

Sorry for the slow reply. Been crazily busy.

On Saturday 21 April 2007 20:15:15 Don Venhaus wrote:
> I always keep a cpu monitor up ( xosview ) and have noticed that, when
> cpu_speed=max, all of the available cpu time is not always used. Shouldn't
> the host cpu be running full blast in that case? I have noticed that it is
> sound dependent. With sound off cpu usage is about 100%, as I would expect.
> Sometimes ( with sound on ) it will be at 100%, then drop to 20% when a
> program that uses sound is started. Sometimes it will be at 100% 10 or 15
> seconds before dropping.
>
> It took some time to narrow this down, but it seems to be sound buffer size
> related. With the sound latency at the default value (100 ), only about 20%
> of the available host cpu time is used (On my machine, anyway). It's just
> loafing for 80% of the time. However with latency=200, it jumps to 80%. The
> sound part of config looks like...
>
> sound_output=normal
> sound_channels=stereo
> sound_bits=16
> sound_frequency=22050
> sound_interpol=none
> sound_latency=100
>
> Surprisingly, I get about a 20% increase in amiga execution speed by
> changing frequency to 44100. That's right, more samples means more
> instructions per second! ?  Can this be right?
>
> This is without the JIT, to keep it simple. It happens with the JIT, but
> not as quickly.
>
> Just for the record, this is on an Athlon XP 2500 running Slackware 10.2,
> alsa 1.0.9b, e-uae-0.8.29-WIP4 with config...
>
> ./configure --with-alsa --with-sdl-gfx  --disable-action-replay \
>        --disable-bsdsoc
>
> This might explain why setting latency low causes such a perfomance hit.
> E-uae is just not using all the cpu time available. Has anyone else seen
> this?

I apologize to the others here for reproducing your mail in full, but what you 
say hints at what's causing your problem.

You say you are using ALSA 1.0.9, and, if memory serves me correctly, this 
wasn't a great version. E-UAE tries to use your default ALSA device, which 
since 1.0.9 is the dmix device (ALSA's software mixer). However, in that 
version, the default set-up of the dmix device was particularly shoddy and 
led to poor performance.

Possible solutions:

1) Don't use the default ALSA device (dmix), instead specify the device with 
the E-UAE config option 'alsa.device=plughw:'

2) Upgrade ALSA.

3) Compile E-UAE againt OSS instead of ALSA.

BTW, if you are using dmix, you'll probably find that selecting 48000Hz as 
E-UAE's output frequency the best, since dmix typically defaults to using 
that frequency.

Cheers,
Rich
--
Richard Drummond

Web:  http://www.rcdrummond.net/
Mail: mailto:evilrich@xxxxxxxxxxxxxx

Other related posts: