Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pre-existing SPU cache kills performance in LittleBigPlanet games (#10003) #10497

Closed
Kilowog01 opened this issue Jun 26, 2021 · 14 comments
Closed
Labels

Comments

@Kilowog01
Copy link
Contributor

Kilowog01 commented Jun 26, 2021

Quick summary

Pre-existing SPU cache kills LittleBigPlanet 2 performance.

Details

During my adventures trying to reach 100% in LBP2, tweaking a setting here, installing a DLC there, new savegame, new build etc. I noticed that sometimes the game ran at 30fps, especially on the first run. That wasn't normal, I was used to 17ish fps.
I started the investigations, downloaded a new build, installed the minimum necessary and bam, constant 30fps. But when i restarted the game, there was loss of 12fps with instability.
So I found that if I delete all caches, the game goes back to 30fps. While the shader cache is being compiled the fps drops a bit, but then I can play at 30 for as long as I want(I tested for about 2 hours), the fps doesn't decrease over time, it's always around 30fps. But if I restart the game, the fps drops back to 17ish.

The logs contained here are with default settings, with the exception of the overlay performance.

Pre-existing cache:
https://user-images.githubusercontent.com/16064499/123503758-44bb5e80-d62b-11eb-9591-3c2fb1ba0abe.mp4
RPCS3_old cache.log.gz

Fresh cache:
https://user-images.githubusercontent.com/16064499/123503750-3c632380-d62b-11eb-9e18-0e17db93b043.mp4
RPCS3_fresh cache.log.gz

Fresh cache after a while:
https://user-images.githubusercontent.com/16064499/123504482-083e3180-d630-11eb-932e-2b7fd0b07192.mp4

System configuration:

  • Windows 10
  • AMD Ryzen 7 3700X
  • NVIDIA GeForce GTX 1080 (466.77)
  • 31.91 GiB RAM
@elad335
Copy link
Contributor

elad335 commented Jun 26, 2021

Which cache?

@Kilowog01
Copy link
Contributor Author

Kilowog01 commented Jun 26, 2021

SPU cache is the one that makes the most difference between the 3.

@Megamouse Megamouse changed the title "Old" cache kills performance in LittleBigPlanet 2 Pre-existing cache kills performance in LittleBigPlanet 2 Jun 26, 2021
@Kilowog01 Kilowog01 changed the title Pre-existing cache kills performance in LittleBigPlanet 2 Pre-existing SPU cache kills performance in LittleBigPlanet 2 Jun 28, 2021
@AniLeo AniLeo added the CPU label Jun 30, 2021
@Remov84
Copy link

Remov84 commented Jul 6, 2021

same problem but on LBP1
RPCS3.log.gz

@Kilowog01
Copy link
Contributor Author

Kilowog01 commented Jul 16, 2021

Issue #10045 talks about the same problem, but the reported pull is incorrect, in fact this problem is a regression caused by the pull #10003 by @elad335
The generally recommended build (12025) was the problem all along, the only reason people reported improvement was the fact that they were running the game for the first time, with no pre-existing spu cache.
Build 12023 doesn't have this problem.

Logs (pre-existing spu cache)
12023
12025

@Kilowog01 Kilowog01 changed the title Pre-existing SPU cache kills performance in LittleBigPlanet 2 Pre-existing SPU cache kills performance in LittleBigPlanet games (#10003) Jul 19, 2021
@ghost
Copy link

ghost commented Jul 26, 2021

Interesting. I started LittleBigPlanet 1 for the first time and got a solid 30fps. The next time it dropped to 23FPS for no reason and I was wondering what's wrong with my machine. Maybe this is the cause.

@Nekotekina
Copy link
Member

Can someone upload SPU cache dat file after FPS is dropped?

@Remov84
Copy link

Remov84 commented Jul 26, 2021

\cache\BCES00141\ppu-Jo3ijKqksCR388Rnxnw5vwpisVCV-EBOOT.BIN"spu-safe-v1-tane.dat" right ?
https://cdn.discordapp.com/attachments/861214916290674718/869188821839925298/spu-safe-v1-tane.dat

@Kilowog01
Copy link
Contributor Author

spu-safe-v1-tane.zip
Using 4.46 fw because VSH

@Nekotekina
Copy link
Member

Nekotekina commented Jul 31, 2021

I'd like to ask for logs (make sure to use latest version), but with a few debug options set in config:

  1. Open config.yml in an appropriate text editor
  2. Find "SPU Debug" and change its value from false to true
  3. Find "SPU Profiler" and change its value from false to true
    • Provide two logs, with deleted SPU cache and with a cache that initiates the slowdown.
    • Pause and unpause game when in the area showing the FPS difference, wait at least 20 seconds before stopping the emulation

@Kilowog01
Copy link
Contributor Author

I'd like to ask for logs (make sure to use latest version), but with a few debug options set in config:

  1. Open config.yml in an appropriate text editor
  2. Find "SPU Debug" and change its value from false to true
  3. Find "SPU Profiler" and change its value from false to true
    • Provide two logs, with deleted SPU cache and with a cache that initiates the slowdown.
    • Pause and unpause game when in the area showing the FPS difference, wait at least 20 seconds before stopping the emulation

Okay, I had a problem while doing it with pre-existing cache. I did what you asked but game won't boot with SPU debug on, only with profiler. At the end of "building spu cache" RPCS3 closes without any error. The log with deleted cache is exactly as requested.
RPCS3 SPU - Pre-existing cache - SPU DEBUG CRASH.log
RPCS3 SPU - Pre-existing cache - SPU Profiler ONLY.log.gz
RPCS3_DELETED CACHE.log.gz

@KryptonicDragon
Copy link

KryptonicDragon commented Aug 1, 2021

I am having the same issue, where having existing SPU caches causes performance to tank in NPUA80662 (LittleBigPlanet 2).

Here are some logs from me as well, with "SPU Debug" and "SPU Profiler" enabled in (the game's custom) config.yml:
NPUA80662 SPU cache slowdown - 1st run (cleared SPU cache).log.gz
NPUA80662 SPU cache slowdown - 2nd run (existing SPU cache).log.gz

Unlike @Kilowog01, my game successfully booted with "SPU Debug" enabled when running the 2nd time (with existing SPU cache).

Here is the SPU Cache file used in the 2nd run (at least, I think this is the right file):
spu-safe-v1-tane.zip

In both runs, I launched the game, spammed start to skip the warnings/intros, went into the same level, and walked/jumped around for a bit. Both times, I paused the emulator for about 1-2 seconds, un-paused, waited 20 seconds, then exited RPCS3.

The slowdown exists throughout the entire game, no matter what level I'm playing (or even if I'm not in a level and am in the "pod" (the game's "lobby")).

Here is a screenshot from the 1st (cleared SPU cache) run:
image
And here is one from the 2nd (existing SPU cache) run:
image

RPCS3 Version: 0.0.17-12565-8af694da Alpha
OS: Windows 10 x64 v20H2
CPU: AMD Ryzen 7 5800X
GPU: NVIDIA RTX 3070
GPU Driver version: 466.27

@Kilowog01
Copy link
Contributor Author

it seems that Neko fixed SPU debug, i can run the game now.
RPCS3 WITH CACHE.log.gz
RPCS3 WITHOUT CACHE.log.gz
And yes, the main menu/pod is technically already a level. I pause when sackboy hits the ground, count to 5, unpause and then count to 20 before closing. The logs should look very similar.

@AphelionWasTaken
Copy link

AphelionWasTaken commented Sep 3, 2021

This issue appears to be related to logging. I can reproduce this to some extent on builds going all the way back to last September (probably further, but that's where I stopped).

0.0.15-12025 does appear to have made it worse though; when launching with an existing spu cache before this build, performance would dip by about 25% for me, whereas now it drops by about 50%.

With logs silenced, performance is consistent boot after boot with or without an existing SPU cache:
Launch 1:
image
Launch 2, 3, 4, etc...:
image

With logs enabled, performance takes a dip. Launching the game with no SPU cache results in the performance below:
image
RPCS3 NO CACHE.log.gz

Closing the emulator and relaunching the game with logs enabled and an existing SPU cache causes performance to tank
image
RPCS3 CACHE.log.gz

@elad335
Copy link
Contributor

elad335 commented May 29, 2024

Heavily outdated and probably fixed, also log spam iirc is reduced significantly since.

@elad335 elad335 closed this as completed May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants