. However, when the heap space is small, after a period of time, "fragmentation" occurs, if the concurrent collector does not find enough space, then the concurrent collector will stop, and then use the traditional token, purging method for recycling. If "Fragmentation" occurs, you may need to configure the following:
-xx:+usecmscompactatfullcollection: When using the concurrency collector, the compression of older generations is turned on.
-xx:cmsfullgcsbeforecompaction=0: Whe
K), 0.0072126 secs] 55264 K-> 6615 K (124928 K)Heap after GC invocations = 8:Def New Generation total 55296 K, used 3433 K [0x1ebd0000, 0x227d0000, 0x227d0000)Eden space 49152 K, 0% used[0x1ebd0000, 0x1ebd0000, 0x21bd0000)From space 6144 K, 55% used [0x21bd0000, 0x21f2a5e8, 0x221d0000)To space 6144 K, 0% used [0x221d0000, 0x221d0000, 0x227d0000)Tenured generation total 69632 K, used 3182 K [0x227d0000, 0x26bd0000, 0x26bd0000)The space 69632 K, 4% used[0x227d0000, 0x22aeb958, 0x22aeba00, 0x26bd0
large young generation and a smaller old generation. The reason for this is that the majority of short-term objects can be recovered as much as possible, reducing medium-term objects, while older generations store long-lived objects.
Fragmentation problems caused by smaller heapsThe heap is not compressed because the old generation of concurrent collectors uses tags and clears the algorithm. When the collector recycles, he merges the adjacent space so that it can be assigned to a larg
generations store long-lived objects.
Fragmentation problems caused by smaller heapsThe heap is not compressed because the old generation of concurrent collectors uses tags and clears the algorithm. When the collector recycles, he merges the adjacent space so that it can be assigned to a larger object. However, when the heap space is small, after a period of time, "fragmentation" occurs, if the concurrent collector does not find enough space, then the concurrent collector will stop, and t
priority applications have a very large young generation and a smaller old generation. The reason for this is that the majority of short-term objects can be recovered as much as possible, reducing medium-term objects, while older generations store long-lived objects.
Fragmentation problems caused by smaller heapsThe heap is not compressed because the old generation of concurrent collectors uses tags and clears the algorithm. When the collector recycles, he merges the adjacent space so
, "fragmentation" occurs, if the concurrent collector does not find enough space, then the concurrent collector will stop, and then use the traditional token, purging method for recycling. If "Fragmentation" occurs, you may need to configure the following:
-xx:+usecmscompactatfullcollection: When using the concurrency collector, the compression of older generations is turned on.
-xx:cmsfullgcsbeforecompaction=0: When the above configuration is on, how many times the full G
priority applications have a very large young generation and a smaller old generation. The reason for this is that the majority of short-term objects can be recovered as much as possible, reducing medium-term objects, while older generations store long-lived objects.
Fragmentation problems caused by smaller heapsThe heap is not compressed because the old generation of concurrent collectors uses tags and clears the algorithm. When the collector recycles, he merges the adjacent space so
Heap size settings The maximum heap size in JVM has three restrictions: the data model (32-BT or 64-bit) of the relevant operating system; the available virtual memory limit of the system; and the available physical memory limit of the system. Generally, 32-bit systems are limited to Gbps ~ 2 GB; 64 indicates that the operating system has unlimited memory. In Windows Server 2003, 1478 GB physical memory, and JDK, the maximum value is MB. Typical settings:
Java-Xmx3550m-xms3550m-xmn2g-Xss
-heap zones are code, constants, external access (e.g., resources for file access streams), etc.
Although Java's garbage collection mechanism can solve the problem of memory waste, this mechanism is only the recyclingHeap AreaResources, and the resources for non-heap areas are helpless, and for such resource recycling can only be solved by the developer's own constraints. Even if this is the case (the heap has a Java recycle mechanism, the non-heap developers can solve it well), when the ru
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.