Questions tagged [java-heap]

When a program started Java Virtual Machine gets some memory from Operating System. Java Virtual Machine(JVM) uses this memory for all its need and part of this memory is call java heap memory.

Heap in Java generally located at bottom of address space and move upwards.

20 questions
9
votes
2 answers

Java Heap Dump : How to find the objects/class that is taking memory by 1. io.netty.buffer.ByteBufUtil 2. byte[] array

I found that one of my spring boot project's memory (RAM consumption) is increasing day by day. When I uploaded the jar file to the AWS server, it was taking 582 MB of RAM (Max Allocated RAM is 1500 MB), but each day, the RAM is increasing by 50MB…
Kishan Solanki
  • 13,761
  • 4
  • 85
  • 82
7
votes
2 answers

How much headroom to leave between Java Xmx and Docker container RAM size?

I'm 100% aware of the pitfalls of the JVM and advances/strides that have been done in the JVM world for it to understand the ergonomics/resources of a container. Also, yes I know that Java by default tries to allocate 1/4 the RAM available in the…
user432024
  • 4,392
  • 8
  • 49
  • 85
4
votes
1 answer

Memory size feasible via Virtual Memory vs RAM

I am trying to instantiate a huge ArrayList List list = new ArrayList(Integer.MAX_VALUE); Running it in eclipse I get: java.lang.OutOfMemoryError: Requested array size exceeds VM limit If I do: List list = new…
Jim
  • 3,845
  • 3
  • 22
  • 47
2
votes
2 answers

G1 GC allocated memory is more than heap size

I change GC for application server. Now I use G1 GC. I have 30 GB RAM. For initial testing I set only Xms and Xmx values to be the same 23040 mb. Settings I use: -Xms23040m -Xmx23040m -XX:+UseG1GC -XX:MetaspaceSize=512M…
grep
  • 5,465
  • 12
  • 60
  • 112
2
votes
1 answer

How much memory takes TreeMap collection granularly?

How much memory takes TreeMap collection filled with 1000 (all unique) key-value pairs? Yes I can just watch memory dump, but need to know granularly why exactly: Long = n bytes Entry = 2n bytes, so 1000 entries = 2000n…
J.J. Beam
  • 2,612
  • 2
  • 26
  • 55
1
vote
1 answer

Recommended Java Heap Size for Commercial JMeter Project

Depending on the nature of the automated workflow and the number of active threads at any given time the Heap size requirement for JMeter can vary and in the testing I am doing there is some ambiguity with respect to the affect of Heap size on the…
1
vote
1 answer

Getting "java.lang.OutOfMemoryError" exception while running a cucumber test using java-selenium

While running a cucumber test using java-selenium getting error at following line: PageFactory.initElements(driver,LandingPage.class); Below is the complete code of Page Object Class: public class LandingPage { WebDriver driver; …
Sourabh
  • 39
  • 4
0
votes
1 answer

Java heap space : pros/cons of size in performance terms

What are the limitations on Java heap space? What are the advantages/disadvantages of not increasing the size to a large value? This question stems from a program that I am running sometimes running out of space. I am aware that we can change the…
0
votes
1 answer

heap memory overflow master nodes (continuous GC) - Elastic Search

Recently, encountered increases in the heap memory usage in the master nodes (heap memory overflow master nodes continuous garbage collection ). I try to debug the root cause using the heap dump saved in the storage ( sample file name for reference:…
0
votes
0 answers

java.lang.OutOfMemoryError: Java heap space thrown from java.net.http.HttpClient

My Java application sends HTTP requests through java.net.http.HttpClient. The class that holds the HttpClient is a singleton that initializes the client in the constructor, which means only one HttpClient was created. The HttpClient is used from…
Oded
  • 336
  • 1
  • 3
  • 17
0
votes
0 answers

java heap error while reading a file line by line inside a while loop

i'm using weblogic and java ee. when i try to read a text file (about 100mb) and create an array out of it, java heap size exceeds and weblogic goes down. i use scanner to avoid reading file in memory and also try not to create any new variable…
reza
  • 27
  • 7
0
votes
2 answers

How to fix the below Cassandara error in docker container

Picked up _JAVA_OPTIONS: -Xms128m -Xmx256m [0.013s][warning][gc,ergo] NewSize was set larger than initial heap size, will use initial heap size. [0.013s][warning][gc,ergo] MaxNewSize (409600k) is equal to or greater than the entire heap…
0
votes
1 answer

JVM committed heap memory is more than Xmx

I have these jvm param set -Xms24g -Xmx24g -XX:+UseG1GC -XX:+AggressiveOpts -XX:+UnlockCommercialFeatures -XX:+UnlockExperimentalVMOptions -XX:InitiatingHeapOccupancyPercent=17 -XX:G1MaxNewSizePercent=75 -XX:+FlightRecorder…
best wishes
  • 5,789
  • 1
  • 34
  • 59
0
votes
1 answer

manage assigned memory size in Anylogic

for increasing the heap size for Anylogic I have followed the method explained here but it just work for 1.5G of ram. my operating system is Windows 10 (64bit) and JVM is 1.8.0_281 (64bit). when I change the AnyLogic.ini file manually (for example…
0
votes
1 answer

pyspark java heap space error when just retrieving data frame columns

Is spark's lazy evaluation really executing anything for the following simple example of pointing to a partition of a hive table and getting columns but nothing really heavy: >>> spark.sql('select * from default.test_table where…
zhh210
  • 388
  • 4
  • 12
1
2