English Amiga Board Amiga Lore


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 28 August 2016, 20:18   #1
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,483
Periodic "stuttering" and large CPU usage

I was going to post this in the 3.4 beta thread but then noticed it happens with 3.3.0 too... I suppose this could be graphics driver or OS bug.

Dell D830, Nvidia Quadro NVS135M driver 341.96, Windows 10 1511 x86-64. Windows desktop 1920x1200 50Hz.

A500-like cycle-exact config, just sitting at the insert Workbench screen.

Line mode set to double, fields+ because that shows up any timing glitches very clearly.

D3D, no buffering or triple buffering, no vsync: initially CPU% ~20 with FPS ~49.8. But after a few seconds, goes to CPU% 100%, FPS dips to about 27. When that happens, the display seems to only/mostly show odd fields (or only even). Then it returns to the normal CPU and FPS again for a while.

There doesn't seem to be anything relevant in the log.

The problem doesn't seem to occur when line mode is set to Double. In fact it only seems to happen with Double, fields+ line mode.
Attached Files
File Type: uae Test.uae (11.4 KB, 43 views)

Last edited by mark_k; 28 August 2016 at 20:29.
mark_k is offline  
AdSense AdSense  
Old 28 August 2016, 20:40   #2
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,561
Power saving getting confused or some kind of CPU throttling?
Toni Wilen is online now  
Old 28 August 2016, 22:21   #3
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,483
I don't know, it's strange. Only happens with double, fields+ line mode. Happens with Windows power mode set to either balanced or high performance.

Looking at the actual CPU usage (as shown in Task Manager), when the WinUAE CPU% rises and FPS falls, actual CPU usage falls.

I see a similar periodical effect in Wine, at least in terms of WinUAE CPU%. Hopefully I'll post a screenshot showing Task Manager CPU history tomorrow.
mark_k is offline  
Old 29 August 2016, 21:25   #4
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,483
This screenshot shows the Windows Task Manager CPU usage as WinUAE runs. The dips pointed out with arrows correspond to the WinUAE CPU% going up (and FPS going down) periodically.

Can anyone duplicate this?
Attached Thumbnails
Click image for larger version

Name:	Final.png
Views:	100
Size:	72.3 KB
ID:	49667  
mark_k is offline  
Old 29 August 2016, 21:54   #5
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,483
And this is a screenshot on Linux/Wine. Here when the CPU usage shown in the graph jumps, the WinUAE CPU% indicator jumps & FPS falls.
Attached Thumbnails
Click image for larger version

Name:	Linux_Wine.png
Views:	94
Size:	120.2 KB
ID:	49676  
mark_k is offline  
Old 04 September 2016, 22:32   #6
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,483
The strange thing is, I can have the system sitting at the insert Workbench screen and see the CPU usage (and FPS) cycling up/down. If I then insert a disk (some demo) and it boots, FPS and CPU% return to stability almost immediately once the demo starts.

Could there be some issue with WinUAE when the CPU is idle? (I guess Exec issues STOP instructions then?)
mark_k is offline  
Old 05 September 2016, 09:55   #7
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,561
Does 3.3 and 3.4 work exactly the same? If yes, it can't be CPU idle because 3.4 works totally differently in CPU idle mode. (3.4 = count number of stopped state scanlines, if enough during last 1s -> idle mode)
Toni Wilen is online now  
Old 11 September 2016, 19:40   #8
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,483
I was using a cycle-exact config so maybe it's nothing to do with CPU idle. I also tested some older WinUAE versions and they all show this issue back to 2.8.1 (which was the first with the "double, fields+" non-interlaced line mode).

I did some more testing today, and noticed that the problem also occurs with scanlines line mode! Here are some screenshots.

The problem happens on the insert Workbench screen, but not when the CLI window is showing. It still happened with Windows set to powersave as opposed to high performance.

You definitely can't reproduce this behaviour?
Attached Thumbnails
Click image for larger version

Name:	WinUAE330_50Hz.png
Views:	54
Size:	69.2 KB
ID:	49905   Click image for larger version

Name:	WinUAE330_50Hz_CLI.png
Views:	56
Size:	61.9 KB
ID:	49906   Click image for larger version

Name:	WinUAE330_50Hz_scanlines.png
Views:	61
Size:	65.9 KB
ID:	49907   Click image for larger version

Name:	WinUAE330_50Hz_scanlines_powersave.png
Views:	60
Size:	66.8 KB
ID:	49908  
mark_k is offline  
Old 11 September 2016, 21:14   #9
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,483
Since the problem happens with scanlines line mode too, I tested some older WinUAE versions. Problem is present with 2.1.0, not present with 2.0.1.

Are the 2.1.0 betas still online? I was going to test some of those but (for example) http://www.winuae.net/files/b/winuae_2100b13.zip is no longer there.
mark_k is offline  
Old 11 September 2016, 21:20   #10
prowler
Global Moderator

prowler's Avatar
 
Join Date: Aug 2008
Location: Sidcup, England
Posts: 10,200
There was a set of 2.0.2 betas (1-12) as well as 2.1.0 betas (13-25).

I can supply them for test purposes if required.
prowler is offline  
Old 11 September 2016, 21:41   #11
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,483
Sure, if you could upload them to The Zone or elsewhere that would be good.
mark_k is offline  
Old 12 September 2016, 22:13   #12
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,483
An update on this...

It seems the stuttering is caused by GPU throttling. I'm not sure why it's throttling though. Look at the two attached pics. According to CPUID HWMonitor there are two GPU temperature monitors, both labelled TMPIN0. The lower one moves between ~70℃ when unthrottled and ~96℃ when throttled.

Strangely, the displayed temp jumps from ~70℃ immediately to ~96℃ then after a few seconds straight back down again. Which surely can't be right, since the system fan just stays on constantly (not at full speed either).

Anyway, it's still a bit of a mystery why this issue only happens:
(a) When line mode is Scanlines or Double, fields+. (Not with Single, Double, or Double, fields.)
(b) At the insert Workbench screen. It doesn't happen when CLI window is showing or (as far as I can tell) in most other cases like when a demo is running.

Is there some optimisation or difference in behaviour of those two line modes compared to the others? And what could have changed between WinUAE 2.0.1 and 2.1.0 to produce this strange problem?
Attached Thumbnails
Click image for larger version

Name:	D3D_NoBuf_Scanlines_GPUNotThrottled_annotated_opt.png
Views:	61
Size:	95.8 KB
ID:	49929   Click image for larger version

Name:	D3D_NoBuf_Scanlines_GPUThrottled_annotated_opt.png
Views:	54
Size:	88.4 KB
ID:	49930  

Last edited by mark_k; 12 September 2016 at 23:34.
mark_k is offline  
Old 12 September 2016, 22:33   #13
prowler
Global Moderator

prowler's Avatar
 
Join Date: Aug 2008
Location: Sidcup, England
Posts: 10,200
Quote:
Originally Posted by mark_k View Post
Sure, if you could upload them to The Zone or elsewhere that would be good.
I shall upload the entire set for you tomorrow.

I have them on an old hard drive and I have been too busy to retrieve them today.
prowler is offline  
Old 12 September 2016, 23:32   #14
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,483
I repeated the tests using a patched version of Kickstart 1.2 which always forces interlace mode. With that, I saw periodic throttling with double, fields+ (interlaced) line mode at the insert Workbench screen, no throttling when idling at CLI (e.g. after booting a disk with no startup-sequence). And no throttling with any other line mode.

[If anyone cares about the details of the force-interlace Kickstart patch I can give some details.]
mark_k is offline  
Old 13 September 2016, 11:43   #15
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,561
Driver optimizations (and bugs) can be mysterious. It probably triggers some (mis)optimization in texture handling or something.
Toni Wilen is online now  
Old 14 September 2016, 00:10   #16
prowler
Global Moderator

prowler's Avatar
 
Join Date: Aug 2008
Location: Sidcup, England
Posts: 10,200
I have uploaded the WinUAE 2.0.2 and 2.1.0 Betas to help with debugging this issue.
prowler is offline  
AdSense AdSense  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
"Voices8" 8 Channel Soundtracker "DemoSongI" song - "This is the Amiga with 8 Voices" DemosongIHunter request.Music 40 13 April 2017 05:06
Someone should set up a "Large Drive Installation Guide" really Doc Mindie support.Hardware 5 14 April 2016 15:05
"Hard drive" access causes sound & video stuttering Gameboi project.WHDLoad 3 15 January 2009 17:59
"HDF emulation" for large single-file binaries (e. g. demos) andreas request.UAE Wishlist 2 11 June 2007 01:26
WinUAE 1.3.2 - "fastest possible" not at 100% cpu usage? rsn8887 support.WinUAE 12 15 October 2006 22:34

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 16:39.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Page generated in 0.24129 seconds with 12 queries