Results 1 to 6 of 6

Thread: Free memory on Webmin VPS200 (debian)

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Junior Member Newbie
    Join Date
    Apr 2006
    Posts
    3

    Default Free memory on Webmin VPS200 (debian)

    Hi,

    I have a VPS200 account, which according to the package agreement should guarantee me 256mb of ram. When I try to start a jvm, however, the machine reports it is out of memory. I have to start the jvm with the -Xmx/-Xms settings down at 16mb of ram to get it to run at all. When I execute "free" in a console, I get fluctuating reports of "free" ram between 10mb and 80mb. Needless to day, Java (and tomcat/jboss) won't run in that amount of headroom.

    What do I need to do to get my "gauranteed" 256mb? Is there a setting I have incorrectly configured that is leaving my VPS with the left-overs from other VPS's on this server?

    Any help would be greatly appreciated.

    Thanks,
    Warren Wessels

  2. #2
    Forum Administrator Power Poster Lyle@Spry's Avatar
    Join Date
    May 2005
    Posts
    455

    Default

    Quote Originally Posted by warren.wessels
    I have a VPS200 account, which according to the package agreement should guarantee me 256mb of ram. When I try to start a jvm, however, the machine reports it is out of memory.
    Java is a notorious hog of memory. When the virtual machine starts, it tries to grab as much memory as possible. Due to the way memory is allocated in a VPS, it uses up all available burstable memory, leaving none available for other processes. Yes, all those other processes running on your server use memory, hence you will never be able to give the jvm a full 256MB of memory if that is all your server is allocated.

    Quote Originally Posted by warren.wessels
    I have to start the jvm with the -Xmx/-Xms settings down at 16mb of ram to get it to run at all. When I execute "free" in a console, I get fluctuating reports of "free" ram between 10mb and 80mb. Needless to day, Java (and tomcat/jboss) won't run in that amount of headroom.
    free shows memory usage on the hardware node, not just your VPS. This thread discusses this.

    Quote Originally Posted by warren.wessels
    What do I need to do to get my "gauranteed" 256mb? Is there a setting I have incorrectly configured that is leaving my VPS with the left-overs from other VPS's on this server?
    If you want a full 256MB of memory for the JVM, you must upgrade the available RAM on your server to be above 256MB by at least as much as the other processes are using. From past experience, we've found that running Tomcat on a 200 level VPS without any memory upgrades leaves zero room for any other processes (i.e. shell, init, mail) and even then not enough room for Tomcat to load any java applications (jboss). A 300 is recommended, and even then we recommend memory upgrades.

  3. #3
    Junior Member Newbie
    Join Date
    Apr 2006
    Posts
    3

    Question

    Lyle,

    Having setup enterprise-grade Java servers, I have a pretty good understanding of how tomcat/jboss work, and how the Java heap allocation happens. I'm not attempting to run tomcat at the full system allocation (256mb). I have a good understanding of overhead. I would be happy to let it use half of my "gauranteed" memory, and am able to setup the start params (i.e. -Xmx/ms) to do so.

    Understanding all of that, and that VPS means that I can't run free/top to get an accurate picture of resources my VPS has available, how have your customers to date been able to run java-based websites when the JVM looks at the physical free memory?

    Thanks,
    Warren

  4. #4
    Forum Administrator Power Poster Lyle@Spry's Avatar
    Join Date
    May 2005
    Posts
    455

    Default

    Quote Originally Posted by warren.wessels
    ...how have your customers to date been able to run java-based websites when the JVM looks at the physical free memory?
    By upgrading to at least a 300 level VPS, turning off all other system services, upgrading memory, and using the -Xmx/ms flags to control the amount of RAM taken by the JVM.

    Others using java-based sites may have more to contribute, I'm personally not a java developer. So if anyone has any hints to share, please do!

  5. #5
    Junior Member Newbie
    Join Date
    Apr 2006
    Posts
    3

    Default Upgrading the virtualized memory limit?

    Lyle,

    If I am unable to execute a JVM with the virtualized memory available now, how on earth would getting an account upgrade with more virtual memory allocation help me?

    It seems the only option I have is to set my -Xmx/Xms flags to a reasonable amount and watch the real memory availability on my server for a window larger than my flag setting. I'm eager to hear from other customers running Java web applications on your VPS servers... there must be a better solution than this.

  6. #6
    Forum Administrator Power Poster Lyle@Spry's Avatar
    Join Date
    May 2005
    Posts
    455

    Default

    Quote Originally Posted by warren.wessels
    If I am unable to execute a JVM with the virtualized memory available now, how on earth would getting an account upgrade with more virtual memory allocation help me?
    Quote Originally Posted by warren.wessels
    I have to start the jvm with the -Xmx/-Xms settings down at 16mb of ram to get it to run at all.
    With an account upgrade, you would be able to up this 16mb limit to a higher, more reasonable number.

    Quote Originally Posted by warren.wessels
    It seems the only option I have is to set my -Xmx/Xms flags to a reasonable amount and watch the real memory availability on my server for a window larger than my flag setting.
    Correct.

    Quote Originally Posted by warren.wessels
    I'm eager to hear from other customers running Java web applications on your VPS servers... there must be a better solution than this.
    Yes, same here. Anyone using Java web applications willing to add their $0.02 here?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •