This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GC Evaluation for Jpcsp
#1
Lightbulb 
Since I had some free time this morning, I decided to try the different GC algorithms available in the JRE using the Java VisualVM utility included in the JDK. BTW, it's an awesome utility for profiling and optimizing Java code. NetBeans also has something very similar, but the Java VisualVM is a nice stand-alone tool and more convenient to use.

I tested 4 different GC algorithms and results are in the attachments to this post:
1. Default Serial GC using no extra switches
2. Incremental Serial GC using: -Xincgc
3. Parallel GC using: -XX:+UseParallelGC -XX:+UseParallelOldGC
4. Concurrent Mark & Sweep GC using: -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSClassUnloadingEnabled

To get the results above, I ran around the Sector 8 Fountain area in Crisis Core FFVII. You can see in the results that the CPU, Classes, and Threads graphs are pretty much the same since I used the same running pattern in all tests. Ignore the drop at the end of some of the graphs there where I shutdown Jpcsp. The interesting thing is the Heap graph which shows how the various GCs do their jobs differently in cleaning up heap memory.

The worst is obviously the default serial GC which causes big jumps in used heap size (blue color). During the test, the default GC causes very bad stutterings and lags. Not recommended at all for Jpcsp gaming.

The incremental serial GC is noticeably better than the default one both in the graph and also during the test. It causes less stutterings and lags but still very noticeable.

The Parallel GC is pretty smooth in the graph, and during the test it's noticeably smooth as well with no major stutterings or lags. There are still small stutterings and lags but performance is very good overall. Also notice how the total heap size (orange color) gets adjusted more dynamically than in the other GC algorithms.

The Concurrent Mark & Sweep GC is the smoothest. However, during the test I get the feeling that the overall framerate is slightly lower than the Parallel GC.

So there you have it. My recommendation for Jpcsp is to use either the Parallel GC or the Concurrent GC and see for yourself which one runs better on your system. They both are highly recommended on multi-core CPUs, but the Parallel GC one seems to work well even on single-core CPUs. For sure don't use the horrible default serial GC.

Please report your experiences here in your system and games if you do give one of the advanced GCs a try. If you want to try the tests yourself, you need to download and install the JDK instead of the JRE. In the bin folder of the installed JDK, you should find the jvisualvm.exe which is the Java VisualVM that I used for the tests.


Attached Files Thumbnail(s)
               
Reply
#2
Very nice. Have to test that on my rather slow hardware. Big Grin
JPCSP games tested with Athlon X2 4850e, 4 GB RAM, Radeon HD 3300 (onboard), OpenGL: 3.3.11653, Windows XP SP3 32-bit
PPSSPP games tested with Intel i3, 4 GB RAM, Intel HD Graphics 2000 (onboard), OpenGL: 3.1.0 Build 6.14.10.5421, Windows XP SP3 32-bit
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)