开发者

VPS server RAM question for JAVA

开发者 https://www.devze.com 2023-03-12 09:25 出处:网络
I am new to VPS hosting so my question could be a little stupid, but... For example, some hosting company offers vps plan with 256mb ram. Can I configure JAVA to use al开发者_Python百科l those 256mbs

I am new to VPS hosting so my question could be a little stupid, but...

For example, some hosting company offers vps plan with 256mb ram. Can I configure JAVA to use al开发者_Python百科l those 256mbs? Or some memory will be used to by linux?

thank you


You cannot assign the entire 256 mb to the JVM, the OS will still use a significant portion for its own use.


Definitely some memory will be used the OS and any other software you may run.

You can control how much memory Java uses by specifying the following VM parameters:

-Xms=64m for initial heap size -Xmx=256m for maximum heap size


First get Total memory being used by other processes on peak load [without this java process].

This may help you get started http://www.cyberciti.biz/faq/linux-check-memory-usage/

keep some extra buffer , think how much your program/server would require and based on that then decide on howmuch memory you need to dedicate to java.

I suggest refer to JVM tuning articles that relate to target JVM and OS before finalizing stats

0

精彩评论

暂无评论...
验证码 换一张
取 消