RPCS3 / rpcs3

PlayStation 3 emulator and debugger
https://rpcs3.net/
GNU General Public License v2.0
15.33k stars 1.91k forks source link

RPCS3 leaks memory on PPU compilation #15376

Closed mguinhos closed 6 months ago

mguinhos commented 6 months ago

Compiling with 16 llvm threads eats the whole RAM and Swap. Even when the game is closed, the memory isnt freed.

Tested on i5-13450HX (PS3UPDATE.PUP)

20240330_052351.jpg

Its only when we exit RPCS3 that the memory is freed.

elad335 commented 6 months ago

Try to set LLVM threads to 8 on Emulator tab and compile again with Firmware cache removed.

mguinhos commented 6 months ago

Try to set LLVM threads to 8 on Emulator tab and compile again with Firmware cache removed.

Thanks, i guess i solved. My swap was too small. Increased to 4GB, and it was sufficient.

Reducing to 8 threads only also worked.

It used 2.8GB of swap at some point.

elad335 commented 6 months ago

But with 8 threads, the leak itself is not resolved, just lowered the memory usage, correct?

mguinhos commented 6 months ago

Not a memory leak, just a misconfiguration on my operating system.

Sorry for opening an issue about that.

And thanks for the help.

elad335 commented 6 months ago

Nah, its a bug of RPCS3, we do compile concurrently up to the amount of CPU threads you have without considering real world memory restrictions.

elad335 commented 6 months ago

Actually it was not the thread count after all, but I'll provide a tentative fix for that too.