ares-emulator / ares

ares is a cross-platform, open source, multi-system emulator, focusing on accuracy and preservation.
https://ares-emu.net
Other
940 stars 114 forks source link

[N64] - General - Framerate drops for no discernible reason on Linux #69

Open HeroponRikiBestest opened 3 years ago

HeroponRikiBestest commented 3 years ago

After testing on both a Lenovo t14 with a ryzen 7 pro 4750u, and a desktop computer with a RX 580 and a 5900X, on both Linux (Linux Mint and Arch were tested) and Windows 10, on ares V120, V122, and V123-dev, N64 games in ares seem to experience framerate drops for no discernible reason- meaning that no CPU cores/threads were at any point at 100% load, and neither was the GPU, but Ares was dropping frames regardless. When I say that it's dropping frames, I mean that the framerate counter in the bottom left displayed lower than 60fps on NTSC games, and had the accompanying audio crackle. The easiest I found to experience frame drops was in the intro of Conker, but the drops happen in most if not all n64 games and could easily be experienced elsewhere.

Just in case memory speed/bandwidth was an issue, I tested both computers using https://zsmith.co/bandwidth.php, specifically https://zsmith.co/archives/bandwidth-1.9.4.tar.gz, and attached the results of both. bandwidth1 bandwidth2

Shideravan commented 3 years ago

Both of these tests was made entirely with conker's bad fur day opening cutscene?

HeroponRikiBestest commented 3 years ago

No, as I mentioned, they were tested on other games. I just brought up conker because it was a pretty fast way to see these results. I can even get frame drops in mario 64 by going into BoB (where, on the T14, no CPU thread goes above 60%, and the GPU is around 50% busy).

Shideravan commented 3 years ago

If we don't know even where they were tested, these pictures are completely useless

HeroponRikiBestest commented 3 years ago

Oh, you were referring to the pictures specifically? Those images aren't from running ares, they're just benchmarking the memory bandwidth of both computers. As far as I know, there is no way to test exactly how ares affects memory bandwidth on a given system, so the best I can do is just benchmark how a given computer performs in general. At the moment, I have not had access to a computer that does not have these frame drops, so there's no way I can benchmark what a computer without these issues looks like, either. If you know of a way to properly test how ares affects memory bandwidth, or if you can run the aforementioned benchmarking program on a computer without these frame drops, please let me know.

meowthed commented 3 years ago

Might be related to https://github.com/higan-emu/ares/issues/27

HeroponRikiBestest commented 3 years ago

the fps counter stays locked to 60fps regardless of what the performance looks like

No, their issue seems to be different.

Shideravan commented 3 years ago

Oh, you were referring to the pictures specifically? Those images aren't from running ares, they're just benchmarking the memory bandwidth of both computers. As far as I know, there is no way to test exactly how ares affects memory bandwidth on a given system, so the best I can do is just benchmark how a given computer performs in general. At the moment, I have not had access to a computer that does not have these frame drops, so there's no way I can benchmark what a computer without these issues looks like, either. If you know of a way to properly test how ares affects memory bandwidth, or if you can run the aforementioned benchmarking program on a computer without these frame drops, please let me know.

Maybe the command pmap can be useful. as you're using Linux

HeroponRikiBestest commented 3 years ago

Pmap only shows how memory is used by a process; not read and write info.

HeroponRikiBestest commented 3 years ago

I did some more testing. On the 5990X machine, the latest release that put Pulseaudio above ALSA fixed it. I still experienced issues on the T14, however, so I went and tested on windows again. It seems that on Linux, none of the T14's CPU threads reach 100% load, even when ares starts dropping frames. However, on windows, 2 of the CPU threads reach 100% load when the framerate is uncapped, or when the player enters a particularly intensive area (as they should). As a result, Windows gets a ~20+ fps advantage on N64 because it properly utilizes the CPU threads available. I also made sure to select "none" for audio drivers when testing on both OSes, just in case it was an issue of WASAPI vs Pulseaudio, but it made no difference. So, it seems the remaining issue has to do with the Linux build specifically.

HeroponRikiBestest commented 1 year ago

Since it has come up recently, yes, this is still an issue as of the latest build.