Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (480)
Games in Android Showcase (110)
games submitted by our members
Games in WIP (546)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Some sources about jvm memory allocation?  (Read 2398 times)
0 Members and 1 Guest are viewing this topic.
Offline Serethos

Junior Member




Java games rock!


« Posted 2008-07-24 13:45:03 »

I have recently ran into the problem to watch the memory behaviour of my application on a linux machine (more detailed a
vserver system with gentoo). I am really not too familiar with unix system, only having some good basics.
In difference to my experiences on windows machines the jvm on this linux machine seems to grab an enormous amount
of memory at startup even when it is only reserved but not used.

So even very small applications doing e.g. a Thread.sleep  are started from a jvm reserving some hundred mb of memory. A 'top'
ressource view of the machine shows that only a little part of that memory gets actually used. This leads to the problem that
memory is so fast wasted that there is no space for further jvms to be loaded.
I had some success limiting the memory with -xms/-xmx parameters. But nonetheless I never noticed such a behavour on
Windows machines.

So some links or ressources would be welcome, which describe the memory allocation behaviour of a freshly started jvm
and - if exists - the differences on the operating systems.
Offline jezek2
« Reply #1 - Posted 2008-07-24 13:57:42 »

It should not be that different. You're probably looking to virtual size, which is just how much virtual memory process can view, not about actual allocated memory (there can be mapped files, etc.). Look into RSS, which is better but also not accurate as it doesn't count swapped RAM (I think). Best is to measure real used memory by comparing listing of "free" command before and after you run your app. You must subtract/add buffers/caches to get real number (ie. mem used - buffers used = real used value, that you should compare).
Offline CommanderKeith
« Reply #2 - Posted 2008-07-25 06:35:43 »

It might be because the server VM is automatically used on linux, but not on windows which defaults to the client VM.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Mr_Light

Senior Member




shiny.


« Reply #3 - Posted 2008-08-18 16:44:50 »

see http://java.sun.com/docs/hotspot/gc5.0/ergo5.html for defaults.

It's harder to read code than to write it. - it's even harder to write readable code.

The gospel of brother Riven: "The guarantee that all bugs are in *your* code is worth gold." Amen brother a-m-e-n.
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

atombrot (21 views)
2014-08-19 09:29:53

Tekkerue (21 views)
2014-08-16 06:45:27

Tekkerue (21 views)
2014-08-16 06:22:17

Tekkerue (12 views)
2014-08-16 06:20:21

Tekkerue (19 views)
2014-08-16 06:12:11

Rayexar (56 views)
2014-08-11 02:49:23

BurntPizza (37 views)
2014-08-09 21:09:32

BurntPizza (29 views)
2014-08-08 02:01:56

Norakomi (35 views)
2014-08-06 19:49:38

BurntPizza (65 views)
2014-08-03 02:57:17
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!