Hello, I have some questions relating to the new m...
# eap
l
Hello, I have some questions relating to the new memory manager From the blog post (emphasis mine):
If you have already switched to our new memory manager, which was announced in Kotlin 1.6, you might notice a huge execution time improvement: our benchmarks show 35% improvement on average. Since this EAP release, there is also a concurrent implementation for the sweep phase available for the new memory manager. This should also improve the performance and decrease the duration of garbage collector pauses. Use the 
-Xgc=cms
 flag to enable it
for the new Kotlin/Native memory manager.
It looks like we have two memory manager implementations for this release: 1. The block-the-world one, with 35% performance improvement on average 2. The concurrent mark sweep one, not enabled by default, supposed to improve performance, but with no benchmark info What are the reasons that the concurrent mark sweep memory manager, isn't enabled by default? Are there any known issues or remaining drawbacks that motivated the decision for this Kotlin milestone release? Also, are there any reasons you didn't share benchmark results for it?
a
cc @Artyom Degtyarev [JB]
loading 2
p
Hi! This is not two different memory managers, but more like tuning one existing.
-Xgc=cms
is not stable yet. It’s a work in progress. Also, it is stop-the-world-mark + sweep running concurrently for now, not a fully concurrent one. Throughput is more or less the same for them, as they use the same mechanisms for stopping threads. Pauses are smaller for cms, but exact values heavily depend on workload and GC scheduling algorithm, which is subject to change too. Also, it was ready very close to release dates, so we decided to postpone making it default to have time for better testing. We are considering making it default in 1.7 for now, but this is subject to change. Feedback on comparing different implementations on your project, confirming it works for you, or reporting bugs would be very useful for us!
❤️ 3
l
Hi! Thanks for the information, makes a lot of sense now :)