Wer hat den größten? *g*

Status
Nicht offen für weitere Antworten.

nollario

Bekanntes Mitglied
... den größten Heap?.... :)

Also, hab zuletzt schon mal was über Heap Probleme gepostet... Mal so ne Frage: wer hat denn schon nen größeren Heap hier mal benutzt (also alles größer als 1G)... und welches OS benutzt ihr auf welcher Hardware?

Wir haben ne Sun hier laufen mit 4G RAM und SunOs 5.9.... Ich will unbedingt mal die 4G austesten, aber bekomm dauernd die Meldung:

Code:
Error occurred during initialization of VM
Could not reserve enough space for object heap

Egal, ob für 2,3 oder 4 GB.....

Hinweis: Gleiche vorgehensweise funktioniert auf einer anderen Sun, mit 3G, obwohl die über weit weniger Speicher verfügt.... :(
 
B

bygones

Gast
damit kann ich net dienen - mein "Rekord" liegt bei 512 MB sichern.....
 

Angel

Aktives Mitglied
bei mir ebenfalls mit 512 MB, wozu ich sagen muss, das Windows dannach auch am Ende war :bloed:
 

nollario

Bekanntes Mitglied
hm...
weiss nun, dass unter 32 bit linux und windows maximal 3g möglich sind standardmässig, da quasi 3G für prozess speicher (also z.B. java vm) und 1G für kernel memory zur verfügung steht....

warum ich unter solaris da auf eine bremse trete, weiss ich nicht. :(
 

meez

Top Contributor
nollario hat gesagt.:
hm...
weiss nun, dass unter 32 bit linux und windows maximal 3g möglich sind standardmässig, da quasi 3G für prozess speicher (also z.B. java vm) und 1G für kernel memory zur verfügung steht....

warum ich unter solaris da auf eine bremse trete, weiss ich nicht. :(


Das Problem ist aber, dass du nicht den Head festgelegt hast, sondern das Memory für die VM...
Da du nur 4 GB hast und alles als Memory definierst, hat er keinen Platz mehr fürs den Heap ...(der Teil, wo er die Refernzen der Objekte abspeichert)....

Versuchs mal so: java -server -Xms3900m -Xmx3900m -XX:NewSize=100m -XX:MaxNewSize=100m <klasse>

Ich dachte mal gelesen zu haben, dass die VM nur 2 GB wirklich verwalten kann....???:L
 

nollario

Bekanntes Mitglied
nö nö...

wenn ich der vm 4g per Xmx als Speicher übergebe, bezieht zich das auf den Stack als auch auf den Heap...

Da liegt nicht das Problem....

VMs können bis zu 16g verwalten (habe ich schon gesehen, allerdings war es keine SUN VM und auch eine andere Architektur... an einem Forschungsinstitut)...

Es ist aber doch seltsam, dass 2G im Moment ein Problem darstellen? Und das in diesen Tagen, wo Speicher einem nachgeworfen wird...

Hm... Haben übrigens mit Debian Linux, den Kernel neu kompiliert (also der Admin hat - fragt mich njetzt bitte nicht wie :) ) und es gehen auf einmal auch 3G...
 

nollario

Bekanntes Mitglied
hab da einen textauszug, der macht das doch ziemlich deutlich... denke ich... jetzt macht ihr mich ja noch richtig unsicher... :)

http://java.sun.com/docs/hotspot/ism.html


Using a Large Heap
Heaps larger than 2GB are available starting with J2SE 1.3.1. These are options that can be useed to tune the use of memory by the JVM. The values given should not be taken as suggestions; best values for your application will vary and should be set by measurement.

-Xms3g -Xmx3g

This example sets the minimum and maximum total heap size to 3GB. The default maximum size is 64MB, but for many server applications it makes sense to be much larger. The g suffix may be replaced by m to measure in megabytes.

Ordinarily the JVM consumes as little memory as possible, starting with a heap of the minimum size specified by the -Xms flag, and adaptively growing as required up to the maximum specified by -Xmx. Setting these to the same value avoids being conservative, and will often improve startup time.

-XX:+AggressiveHeap

This option instructs the JVM to push memory use to the limit: the overall heap is more than 3850MB, the allocation area of each thread is 256K, the memory management policy defers collection as long as possible, and (beginning with J2SE 1.3.1_02) some GC activity is done in parallel.

Because this option sets heap size, do not use the -Xms or -Xmx options in conjunction with -XX:+AggressiveHeap. Doing so will cause the options to override each other's settings for heap size.

This option should be used with caution. Because it makes the JVM greedy with memory resources, it is not appropriate for many programs and makes it easier to run out of memory. For example, by using most of the 4GB address space for heap, some programs will run out of space for stack memory. In such cases -Xss may sometimes help by reducing stack requirements.
 
Status
Nicht offen für weitere Antworten.

Ähnliche Java Themen

Neue Themen


Oben