hiccups with 0% cpu used (host) 0% speed in PCem

Support and general discussion.
Post Reply
User avatar
resle
Posts: 50
Joined: Mon 23 Feb, 2015 8:00 am

hiccups with 0% cpu used (host) 0% speed in PCem

Post by resle » Mon 26 Feb, 2018 11:47 am

One more observation of odd behavior.

PCem suddenly and repeatedly freezes for 3-5 seconds. The emulation freezes, not the emulator itself, whose window remains responsive.
This happens with very different machines.

When these freezes happen, PCem reports a "0%" of emulated cpu speed.
I expected a 100% cpu usage in task manager, where instead I can see the cpu usage quickly dropping to 0% and then going back to normal when PCem unfreezes.

Xeon W3960 (6 cores / 12 threads)


As usual I can provide configuration files etc. but so far it seems there isn't much interest in the oddities I keep stumbling on :)

User avatar
SarahWalker
Site Admin
Posts: 1541
Joined: Thu 24 Apr, 2014 4:18 pm

Re: hiccups with 0% cpu used (host) 0% speed in PCem

Post by SarahWalker » Mon 26 Feb, 2018 5:29 pm

resle wrote:
Mon 26 Feb, 2018 11:47 am
As usual I can provide configuration files etc. but so far it seems there isn't much interest in the oddities I keep stumbling on :)
I'm very interested! Your other reported problems haven't been addressed yet due to a backlog of other things to look at, not due to a lack of interest! :)

User avatar
resle
Posts: 50
Joined: Mon 23 Feb, 2015 8:00 am

Re: hiccups with 0% cpu used (host) 0% speed in PCem

Post by resle » Mon 26 Feb, 2018 11:48 pm

Hah all right. I assumed that it wasn't the case due to using PCem on a not-so-common kind of hardware.
Configs attached, let me know if anything else is needed.

(I use shaders, which I didn't attach, but the problem happens with or without them, and with any of the renderers)

Moreover: at some point I thought dynarec was the culprit. I noticed the dynarec checkbox was greyed out. Changed cpu type, and saw now I could check/uncheck it. I unchecked it.
Later, when I switched back to the previous cpu, the dynarec checkbox became greyed out again - while still being unchecked. Expect behavior? Probably not.
Attachments
Pentium-100.cfg
(1.48 KiB) Downloaded 30 times
386-40.cfg
(2.22 KiB) Downloaded 28 times

jznomoney
Posts: 80
Joined: Sat 06 Dec, 2014 9:11 pm

Re: hiccups with 0% cpu used (host) 0% speed in PCem

Post by jznomoney » Tue 27 Feb, 2018 12:01 am

I have a spare i7 970 machine I can try it out tomorrow. What are the other specs of your machine?

User avatar
leilei
Posts: 548
Joined: Fri 25 Apr, 2014 4:47 pm

Re: hiccups with 0% cpu used (host) 0% speed in PCem

Post by leilei » Tue 27 Feb, 2018 12:05 am

resle wrote:
Mon 26 Feb, 2018 11:48 pm
I noticed the dynarec checkbox was greyed out. Changed cpu type, and saw now I could check/uncheck it. I unchecked it.
Later, when I switched back to the previous cpu, the dynarec checkbox became greyed out again - while still being unchecked. Expect behavior? Probably not.
This is expected behavior:
Dynamic grays out unchecked when you use any pre-486 CPU (including the "486" SLC/DLCs). No recompilers are implemented for those CPUs.
Dynamic grays out checked when you use any Pentium CPU or 6x86 CPU because having a C interpreter for those wouldn't be very effective to recreate their timing and how they batch instructions etc.
IDT Winchip allows interpreter emulation because it's a relatively simpler CPU meant as a low-power budget S7 CPU solution. Simpler than K5, K6, etc.

User avatar
resle
Posts: 50
Joined: Mon 23 Feb, 2015 8:00 am

Re: hiccups with 0% cpu used (host) 0% speed in PCem

Post by resle » Tue 27 Feb, 2018 1:07 am

jznomoney wrote:
Tue 27 Feb, 2018 12:01 am
I have a spare i7 970 machine I can try it out tomorrow. What are the other specs of your machine?
Xeon w3960 with ht enabled (12 logical cores)
Mb Asus rampage III
48gb ddr3
Geforce GTX980, latest drivers
Win 10x64 build 17107
3 x samsung 960pro ssd (os / swap / data)

Basically it's an 8 years old server/workstation with a few upgrades.

I doubt it matters but I have a couple Hyper-V machines running all the time in the background.


leilei wrote:
Tue 27 Feb, 2018 12:05 am
This is expected behavior:
Dynamic grays out unchecked when you use any pre-486 CPU (including the "486" SLC/DLCs). No recompilers are implemented for those CPUs.
Dynamic grays out checked when you use any Pentium CPU or 6x86 CPU because having a C interpreter for those wouldn't be very effective to recreate their timing and how they batch instructions etc.
IDT Winchip allows interpreter emulation because it's a relatively simpler CPU meant as a low-power budget S7 CPU solution. Simpler than K5, K6, etc.
Thanks! Very informative. I wish there was detailed PCem documentation with this kind of stuff laid out for all the small bits and pieces, just as you did now...

jznomoney
Posts: 80
Joined: Sat 06 Dec, 2014 9:11 pm

Re: hiccups with 0% cpu used (host) 0% speed in PCem

Post by jznomoney » Tue 27 Feb, 2018 9:12 pm

Are the hyper-v machines running when you use pcem? If so it will affect performance. Try running pcem with the hyper-v machines powered off.

User avatar
resle
Posts: 50
Joined: Mon 23 Feb, 2015 8:00 am

Re: hiccups with 0% cpu used (host) 0% speed in PCem

Post by resle » Tue 27 Feb, 2018 11:47 pm

jznomoney wrote:
Tue 27 Feb, 2018 9:12 pm
Are the hyper-v machines running when you use pcem? If so it will affect performance. Try running pcem with the hyper-v machines powered off.
I have 12 logical cores, the machines take about 10% of a core each. Keeping Chrome open uses more cpu than that.

Also as I mentioned, the problem is that pcem stops running for a few seconds, not that it slows down.

This is not a performance issue.

jznomoney
Posts: 80
Joined: Sat 06 Dec, 2014 9:11 pm

Re: hiccups with 0% cpu used (host) 0% speed in PCem

Post by jznomoney » Wed 28 Feb, 2018 12:50 am

I ran it on my i7 970 which is the same socket as your pc 6 cores 12 threads and it ran just fine. I even played a game of warcraft to on an emulated pentium 120mhz.

User avatar
resle
Posts: 50
Joined: Mon 23 Feb, 2015 8:00 am

Re: hiccups with 0% cpu used (host) 0% speed in PCem

Post by resle » Wed 28 Feb, 2018 9:52 am

jznomoney wrote:
Wed 28 Feb, 2018 12:50 am
I ran it on my i7 970 which is the same socket as your pc 6 cores 12 threads and it ran just fine. I even played a game of warcraft to on an emulated pentium 120mhz.
as I said, this is not performance related.
I can emulate a Pentium MMX 233 mhz t 100% speed.
The hiccups happen both when I emulate a Pentium MMX233, a 386/40, or an 8088.

User avatar
resle
Posts: 50
Joined: Mon 23 Feb, 2015 8:00 am

Re: hiccups with 0% cpu used (host) 0% speed in PCem

Post by resle » Thu 15 Mar, 2018 8:55 am

With the latest build of Windows 10 (17120), the problem is gone.

Post Reply