Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (777)
Games in Android Showcase (231)
games submitted by our members
Games in WIP (856)
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 3124 times)
0 Members and 1 Guest are viewing this topic.
Offline Serethos

Junior Devvie

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 Devvie

Medals: 1


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

see 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  

hadezbladez (292 views)
2018-11-16 13:46:03

hadezbladez (162 views)
2018-11-16 13:41:33

hadezbladez (293 views)
2018-11-16 13:35:35

hadezbladez (73 views)
2018-11-16 13:32:03

EgonOlsen (2154 views)
2018-06-10 19:43:48

EgonOlsen (2181 views)
2018-06-10 19:43:44

EgonOlsen (1368 views)
2018-06-10 19:43:20

DesertCoockie (1985 views)
2018-05-13 18:23:11

nelsongames (1627 views)
2018-04-24 18:15:36

nelsongames (2275 views)
2018-04-24 18:14:32
Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08

Deployment and Packaging
by gouessej
2018-08-22 08:03:45

Deployment and Packaging
by philfrei
2018-08-20 02:33:38

Deployment and Packaging
by philfrei
2018-08-20 02:29:55

Deployment and Packaging
by philfrei
2018-08-19 23:56:20

Deployment and Packaging
by philfrei
2018-08-19 23:54:46 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‑
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!