Ram overusage
When launching Minecraft from the launcher Minecraft assigns 1GB when out_of_game.
When I load a world the assigned ram goes up to 2GB and after playing a while up to 3GB. When this happens the Ram is completely full and freeze the OS.
Even though ingame debug overlay only shows only up to 40% usage of assigned Ram.
I have attached a diagram of Ram usage while playing. Notice how the Ram usage increases even after world has loaded. This goes on until Ram is full. (The image depicts about 30 seconds)
Sincerely, Pixdigit.
Environment
Linux: Ubuntustudio 14.04 LTS (3.13.0-92-lowlatency)
Java: 6 and 7 (1.7.0_101)
Ram: 4GB total 2GB assigned (-Xmx2048M -Xms2048M)
CPU: Phenom II x2 (amd 64, Dualcore @3.1GHz)
Created Issue:
Ram overusage
When launching Minecraft from the launcher Minecraft assigns 1GB when out_of_game.
When I load a world the assigned ram goes up to 2GB and after playing a while up to 3GB. When this happens the Ram is completely full and freeze the OS.
Even though ingame debug overlay only shows only up to 40% usage of assigned Ram.I have attached a diagram of Ram and CPU usage while playing. Notice how the Ram usage increases even after world has loaded. This goes on until Ram is full. (The image depicts about 30 seconds)
Sincerely, Pixdigit.
Environment
Linux: Ubuntustudio 14.04 LTS (3.13.0-92-lowlatency)
Java: 6 and 7 (1.7.0_101)
Ram: 4GB total 2GB assigned (-Xmx2048M -Xms2048M)
CPU: Phenom II x2 (amd 64, Dualcore @3.1GHz)
When launching Minecraft from the launcher Minecraft assigns 1GB when out_of_game.
When I load a world the assigned ram goes up to 2GB and after playing a while up to 3GB. When this happens the Ram is completely full and freeze the OS.
Even though ingame debug overlay only shows only up to 40% usage of assigned Ram.I have attached a diagram of Ram
and CPUusage while playing. Notice how the Ram usage increases even after world has loaded. This goes on until Ram is full. (The image depicts about 30 seconds)Sincerely, Pixdigit.

The overhead you're seeing being used is handled by the JVM, so while the memory the game is actually using shows free space, much of this memory may have already been pre-allocated for future use. I'd recommend you try using java 8 and see if that makes a difference, but this isn't something controlled by the game itself.
The problem persists even with Java 8. And I know that Java handles garbage collection by itself. However since this should affect almost any Java program on Linux I do not think that this is a problem of Java ((At least not all by itself)). And I know Minecraft running happily with 512 MB and completely smoothly with 2 GB allocated Ram space ((At this point I should mention that the internal server lags even with 3 GB assigned Ram)). Since it should not allocate 3 GB:
1. Because I said it should only use 2048MB
2: Because there is not more ramspace available and therefore completely halt the machine.
3. It can run using 2GB so why allocate another GB?
And 4. Why allocate more than current usage for future usage?