From these timestamps, you can also calculate the percent of time that the system spends in garbage collection, which you can use to compare various JVM Settings.
根据这些时间戳,还可以计算出系统在垃圾收集方面花费的时间百分比,可以用这个指标比较各种JVM设置。
You should, however, fix the nursery size at a large value to minimise time spent in garbage collection, and enable the tenured heap to resize itself according to occupancy to build in resilience.
但是,您应该将托儿所堆大小固定为一个较大的值,以最小化垃圾收集花费的时间,增强保留区堆,使其根据占用率重置自身大小,从而提高弹性。
Even better, you can run your program for a long, long time, ensuring that you trigger many garbage collections, more accurately amortizing the allocation and garbage collection cost.
更好一些的话,您可以长时间运行您的程序,这可以保证触发许多垃圾收集,从而更精确地分摊垃圾收集的成本。
These statistics dispense data on the basic JVM features, such as Just-In-Time (JIT) compilation, class loading, memory allocation, and most interestingly, garbage collection.
这些统计信息涉及诸如即时 (JIT)编译、类加载、内存分配以及最有趣的垃圾收集之类基本的JVM特性。
There are several costs to card marking - additional space for the card map, additional work to be done on each pointer store, and additional work to be done at garbage collection time.
卡片标记有几项开销——卡片映射所需的额外空间、对每一个指针存储所做的额外工作,以及在垃圾收集时做的额外工作。
You can confirm this by looking at the summary, which shows 6.2% of the application's time is spent in garbage collection.
您可以通过查看摘要确认这一点,摘要显示6.2%的应用程序时间花费在垃圾收集上。
Knowing how much time your system spends in GC is all well and good, but how does more time spent doing garbage collection actually affect the performance of your system?
了解您的系统将多少时间花费在垃圾收集上,这是很有必要的,但是将过多的时间花费在垃圾收集上将会对系统的性能产生怎样的影响呢?
As the nursery size is expanded and the time between nursery collects increases, you do less copying on average, and the overhead of garbage collection drops.
随着托儿所空间大小和托儿所收集之间的时间间隔增加,需要复制的数据量通常会随之减少,垃圾收集的开销也会随之降低。
From the first graph, you see the application had been running for about 100 seconds, so 0.3% of that time had been spent doing garbage collection.
从第一个图形中,您可以看到应用程序运行了大约100秒,所以进行垃圾收集花费了该时间的0.3%。
In effect, as the nursery is made larger, the overall time spent in garbage collection drops.
事实上,随着托儿所空间增大,垃圾收集所需的总时间会随之降低。
This naturally enables the application to run for a longer period of time between garbage collection (GC) cycles.
这通常可以让应用程序增加各垃圾收集(GC)周期之间的间隔时间。
At garbage collection time, the mark bits associated with CARDS in the old generation are examined, and dirty CARDS are scanned for objects containing references into the younger generation.
在垃圾收集时,就对与老一代中卡片相关联的标记位进行检查,对脏的卡片扫描以寻找对年轻代有引用的对象。
This provides a good balance of higher garbage collection intervals and lower pause times, which results in a small amount of time spent in garbage collection.
这在较长垃圾收集间隔时间与较短暂停时间之间达到了平衡,从而减少了垃圾收集所花费的时间。
Finally, it indicates how much time the garbage collection took — also the amount of time your application was halted.
最后,指出垃圾收集花费的时间,也即应用程序中止的时间量。
The garbage collection logs also indicate the time at which the collection appears and the length of time the garbage collection takes.
垃圾收集日志还会指出发生垃圾收集的时间以及垃圾收集花费的时间。
Depending on your response time requirements, you might not be able to tolerate a JVM running at 12% garbage collection overhead.
根据您的响应时间需求,可能无法容忍JVM的垃圾收集开销达到12%。
The time spent in GC pauses for the mark and sweep phases of a garbage collection are based on the number of live objects on the heap.
用于垃圾收集的标记和清扫阶段的GC暂停时间基于堆上的活动对象的数量。
This can get rid of the sawtooth pattern often seen for the managed heap size in.net-based applications, and reduces the time an application spends performing garbage collection.
这可以消除基于.NET的应用程序中托管堆大小常见的锯齿模式,并且减少了应用程序为执行垃圾回收而花费的时间。
The pause time is the amount of time that a garbage collection cycle took to complete.
暂停时间是垃圾收集周期完成所需的时间。
Aside from adding RAM, or at least ensuring that you have sufficient RAM for a 64-bit JVM, you'll also need to spend time tuning the garbage collection (GC) algorithm for the JDK in use.
除了添加RAM(或至少确保拥有64位JVM所需的足够RAM)外,还将需要花时间调整所使用的JDK的垃圾回收(GC)算法。
If you run your benchmarks with -verbose: gc, you can see how much time was spent in garbage collection and adjust your timing data accordingly.
如果用-verbose:gc开关运行评测,您可以看到在垃圾收集上耗费了多少时间,并相应地调整您的计时数据。
Object caching and pooling: the application server automatically pools stateless session beans at the server level, reducing the amount of time spent in object creation and garbage collection.
对象高速缓存和合用:应用程序服务器自动在服务器级合用无状态会话bean,这减少了花在对象创建和垃圾收集上的时间。
The very last element of each collection element is a element, which records how much time was taken by the garbage collection
每个收集元素的最后一个元素是 元素,该元素记录垃圾收集所用的时间
Garbage collection does indeed obviate the need for explicit resource deallocation, most of the time. (I'll discuss some exceptions in a future column.)
大多数情况下,垃圾收集确实消除了显式资源存储单元分配(explicit resourcedeallocation)的必要(在以后的专栏中我将讨论一些例外)。
In any system where work is queuing up, the response time of the system is likely to be dominated by the queueing time, rather than any garbage collection pauses.
如果系统中存在正在排队等候的任务,那么系统的响应时间可能会受到排队时间的控制,而不是垃圾收集停顿时间。
We also do not take for granted the optimization of code by design and we take it with a grain of salt every time somebody tells us how good JVMs are now at optimization and garbage collection.
我们并不认为仅仅通过设计就能得到优化的代码,每当有人说起现在的JVM在优化和垃圾收集方面有多么棒时,我们都对其持保留态度。
The garbage collector then assesses whether soft references need to be cleared at this time, based on the amount of memory reclaimed by the current collection and other policy considerations.
垃圾收集器然后根据当前收集所回收的内存总量和其他策略考虑因素,判断软引用此时是否需要被清除。
This is a useful metric because some garbage collection is (for the time being) an inevitable fact of life for most applications.
这是一个有用的指标,因为一些垃圾收集器(当前)是大多数应用程序必须要面对的问题。
You should expect better run time performance using this XML-centric approach, since you do not create extra objects, which requires garbage collection.
使用以xml为中心的方法时应该能得到更好的运行时性能,因为并不会创建额外的对象,因而不需要进行垃圾回收。
Since garbage collection causes non-deterministic pauses all hard real-time threads must use memory that is not subject to garbage collection.
由于垃圾回收会引发不确定的暂停,因此所有硬实时线程都必须使用不会受垃圾回收器影响的内存。
应用推荐