27 November 2021, 15:41 | #1 |
Registered User
Join Date: Dec 2018
Location: Earth
Posts: 1,058
|
CPU usage in Idle Workbench
Hi Folks
I was wondering, why the CPU usage in an idle Workbench is so High. You see, i was looking at Dopus Cpu usage Gauge and i was wondering why it was changing, without doing anything It was always changing, from 14% to 18 to 38% and then repeat the same loop. So, i did download PerfMonitor https://aminet.net/package/util/moni/PerfMonitor and it showed me that the Input.Device needs a lot of Cpu usage. Even the wait for the Trackdisk.device needs a few Procent. But the results are completly different from DOpus. The Tool System Idle https://aminet.net/package/dev/src/SystemIdle10 on the other hand, showed 99-100% free Cpu. ? Now, i am really confused. Maybe you can help me out ? 1) Is it normal that the Input Device needs that much Cpu ? 2) Are those tests even real ? (Dopus Cpu, PrefMonitor, SystemIdle, ect.) 3) If they are, why are they conflicting each other in the results ? 4) If the Input.device really needs that much Cpu, why dosent multitask (OS friendly) Apps/games suffer. Hmmm, i dont understand these results ....; a confused, Torti |
27 November 2021, 16:18 | #2 |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
|
It may be that the software that does the measurement itself takes important amount of cpu.
As input.device is the context GUI is normally handled, as long as you need to draw something -- it will take its toll. In short, this kind of measurement isn't reliable. But you could see how much is taken by just creating and running some program whose instruction timing is known and measures its own speed, then compare the result with the counted clocks (i dunno if i'm clear here ). |
27 November 2021, 23:40 | #3 |
Registered User
Join Date: Dec 2018
Location: Earth
Posts: 1,058
|
Sounds Complicated; at least for a baked Smurf like me
Those Cpu Monitors report pretty much always the same results. (dosent matter if real Hardware or Emulated. 68020 or 68060 Cpu ..... dosent make a difference Weird |
08 December 2021, 08:33 | #4 | |||||
Registered User
Join Date: Mar 2018
Location: Hastings, New Zealand
Posts: 2,544
|
Quote:
Tasks that are 'waiting' use almost no CPU time. These tasks don't get any CPU time unless something they are waiting for becomes active. Quote:
Tally up all the 'waiting' percentages and you will get close to 100%. That doesn't mean the CPU is being used during that time. On the Amiga the CPU doesn't just 'spin its heels' when no tasks need it, it actually goes into an idle state while waiting for the task scheduling (or any other) interrupt. It does this using the 'STOP' instruction, which halts the CPU until an interrupt occurs. This reduces system power consumption because there is no CPU bus activity, and also significantly reduces CPU power consumption on CMOS CPUs. Quote:
Quote:
Quote:
|
|||||
08 December 2021, 09:56 | #5 | |
ex. demoscener "Bigmama"
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 1,624
|
Quote:
|
|
08 December 2021, 10:30 | #6 | |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
|
Quote:
If you want more concrete proof, here is idle loop from rom 39.106 (A1200) : Code:
00f8138e: move.w #$2700,sr 00f81392: movea.l (a0),a3 00f81394: move.l (a3),d0 00f81396: bne.s $f813a8 00f81398: addq.l #1,$118(a6) 00f8139c: bset #7,$124(a6) 00f813a2: stop #$2000 00f813a6: bra.s $f8138e |
|
08 December 2021, 11:14 | #7 | |
ex. demoscener "Bigmama"
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 1,624
|
Quote:
So the emulator will suspend the native emulator process when emulating the STOP instruction (or something along those lines) - interesting... |
|
08 December 2021, 11:22 | #8 |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
|
This is linked to the "CPU Idle" setting in Winuae properties pages. I don't know how it works exactly, it is possible this has no effect if "Fastest possible" isn't ticked.
|
08 December 2021, 11:28 | #9 |
Registered User
Join Date: Jun 2015
Location: Germany
Posts: 1,918
|
The interesting thing about this is that it took the Windows NT branch until the early 2000s (?) to add such a simple feature.
|
08 December 2021, 19:57 | #10 |
Registered User
Join Date: Dec 2018
Location: Earth
Posts: 1,058
|
Really interestig stuff. Thanks for all the feedback so far
|
24 December 2021, 16:00 | #11 |
A1260T/PPC/BV/SCSI/NET
Join Date: Jan 2013
Location: Moscow / Russia
Posts: 839
|
In general CPU usage should be very low, unless you have some 'devils' running in the background that do something, even if you don't see it.
It could be a busy signal from one of the devices that causes problems.. PS: The DOpus5 CPU meter is a simple approach to the problem, that does not do justice most of the time untill there is some real load. Use something more dedicated if you really wish to see how cpu usage varies. Like above, small spikes are windows moved. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
change cpu idle from within emulation | honx | support.WinUAE | 9 | 25 May 2019 15:31 |
Sound glitches with CPU Idle(?) | hexaae | support.WinUAE | 70 | 05 July 2018 14:54 |
WinUAE utilization CPU Idle | AMIGASYSTEM | support.WinUAE | 1 | 13 April 2018 13:03 |
CPU Idle works good with 68020 CE | Leandro Jardim | support.WinUAE | 1 | 30 April 2014 18:15 |
Help with 'CPU Idle' slider in WinUAE | antonvaltaz | support.WinUAE | 18 | 14 September 2009 16:26 |
|
|