|
JSoarPerformance
jsoar/csoar performance comparisons
IntroductionFor the community to seriously consider switching from csoar to jsoar, there can't be too much of a hit for using jsoar. Specifically, the performance hit has to be offset by the various benefits of jsoar (maintainability, cross language support, etc.). For this reason, we are tracking how the performance of jsoar compares to that of csoar as they both develop. The results themselves are here: http://spreadsheets.google.com/pub?key=pvVGDfR2QzuxxVyXkh3TxUQ Instructions on how to test the performance of jsoar and csoar are below. Performance Testing ProceduresNOTE: To be a fair comparison, the soar code used for testing shouldn't use RHS writes. For example, to run TOH, you should remove the monitor rule. Testing jsoar
Testing csoar
Reporting ResultsCurrently, jsoar and csoar are both capable of reporting Total CPU and Kernel times. I've been recording Total CPU times in the spreadsheet above, but it shouldn't really matter what you report so long as it's the same between the two (do whatever comparison you like). Here are the tables that may need to be updated in the spreadsheet:
Fine Tuning JavaIt turns out that there are a lot of options that give you pretty fine control over how parts of Java work, especially the garbage collector. In particular, there are multiple garbage collectors with different properties. Java will attempt to select a collector automatically based on your application, machine, and other parameters (e.g., heap size), but you can force the selection of a particular collector using various -XX options (see the link below). In particular, the -XX:+UseConcMarkSweepGC sacrifices throughput for response time, and can significantly reduce "stuttering" (where the application appears to pause because garbage collection is going on in the background). Finally, the heap size is the most significant factor in Java's performance. In general, you should give Java as much memory as possible, as this will reduce the amount of time it has to spend doing garbage collection (indeed, Java will take significantly more memory if you let it). If performance is critical, you can even set the min and max heap sizes the same, and Java won't waste time trying to resize it as the application's needs change. There are a lot more details and options described here: http://java.sun.com/javase/technologies/hotspot/gc/gc_tuning_6.html |