How to convince Java Garbage Collector to run when working set is small?

后端 未结 4 1204
北海茫月
北海茫月 2021-02-01 18:32

This is yet another \"please tell me how to force the Java garbage collector to run\" question. In our application, I believe we have good reasons for doing this.

This i

4条回答
  •  温柔的废话
    2021-02-01 18:58

    Your problem is that you're running two applications with entirely different requirements and memory profiles in the same JVM.

    Run the data analysis separately, in a non-user-facing process, so that the user-facing server remains constantly responsive. I assume the periodic analysis generates a summary or result data of some kind; make that available to end users by shipping it across to the user-facing server so it can be served from there, or else let your front end fetch it separately from the analysis server.

提交回复
热议问题