[英]What is the best practice I utilize large memory size in java?
I have an application server server and 64 GB memory on it. 我有一个应用程序服务器服务器和64 GB内存。 And a java web application on it. 还有一个Java Web应用程序。 What is a best practice to utilize all these 64 GB? 利用所有这64 GB的最佳实践是什么? I need store a large set of objects (HashSet) Is it a best solution to use -Xms -Xmx ? 我需要存储大量对象(HashSet),这是使用-Xms -Xmx的最佳解决方案吗? But will GC working well? 但是GC会运作良好吗? Should I use 3rd party solutions like cache libraries (memcache and etc.) ? 我应该使用第三方解决方案,例如缓存库(memcache等)吗?
A pretty generic question, so a broad answer. 一个相当普通的问题,所以答案很广泛。
In other words: sure, if you have one large monolithic application that can only be "scaled" by adding more RAM, well, then you have to live with that. 换句话说:当然,如果您有一个大型的单片应用程序,只能通过添加更多的RAM来“扩展”,那么您必须忍受这一点。 But if you are wondering about smarter ways to spend your money, then look into micro services , and how you can use them in order to break up that monolith into many small parts ( and where scaling happens by instantiating more of these small parts ). 但是,如果您想了解更明智的支出方式,请研究微服务 ,以及如何使用它们将整体拆分成许多小部分(以及通过实例化更多这些小部分进行扩展的地方)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.