|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ImportantThreadsMXBean
Monitoring the non-critical threads with the realtime garbage collector.
This class is still under development and may evolve for the future versions of the product.
For a complete description of the RTGC, look at the Garbage Collection Guide. This is a short summary relevant for this particular MBean.
Important threads are the non-critical real-time threads running above the default priority of the RTGC. Tuning mechanisms try to start the RTGC soon enough to complete at that priority. To ensure the determinism of the critical threads, the RTGC may have to be boosted if it did not complete on time. In that case, the important threads might be preempted as long as the RTGC runs. On a multi-processor machine, they can continue running on other processors. However, if memory goes below a minimum threshold reserved for critical threads, important threads block.
This interface allow you to change the parameters and to monitor the throughput and the determinism. getLongestTimeBoosted() returns the longest preemption time. If the RTGC can use all the processors, this defines the pause time for the important threads. When there are spare processors, getLongestTimeWithAllocationBlocked() returns the longest time during which the allocations were blocked. This defines the pause time on those machines.
The 'boosted' sliding value and the parameters that impact it can be ignored on uniprocessors. Users can focus on the 'normal' attributes in that case.
Note that parameter changes might be delayed up to the next GC cycle.
Method Summary | |
---|---|
void |
changeBoostedPriority(int priority)
Change the maximum priority of the RTGC. |
void |
changeNormalPriority(int priority)
Change the default priority of the RTGC. |
void |
changeNormalWorkers(int workers)
Change the default number of active RTGC worker threads. |
void |
changeSlidingBoostedModeAllocations(long value)
Change the evolving threshold boosting the RTGC over important threads. |
void |
changeSlidingNormalModeAllocations(long value)
Change the evolving threshold which defines when the RTGC starts. |
long |
getAllocatedBytes()
Total bytes allocated at priority higher than default priority. |
long |
getBoostedMinFreeBytes()
Minimum boosted memory threshold. |
int |
getBoostedPriority()
Maximum priority of the RTGC. |
long |
getBoostedSafetyMargin()
Margin to avoid bursty boosted allocations. |
long |
getBoostedSlideFactor()
Percentage lowering old worst case boosted allocation. |
int |
getBoostedWorkers()
Maximum number of active RTGC worker threads. |
java.lang.String |
getDescription()
Short description of the MBean. |
long |
getLongestTimeBoosted()
Worst time spent with the RTGC running at boosted priority. |
long |
getLongestTimeWithAllocationBlocked()
Worst time spent with the memory reserved for critical threads. |
long |
getNormalMinFreeBytes()
Minimum normal memory threshold. |
int |
getNormalPriority()
Default priority of the RTGC. |
long |
getNormalSafetyMargin()
Margin to avoid bursty allocations. |
long |
getNormalSlideFactor()
Percentage lowering old worst case allocation. |
int |
getNormalWorkers()
Default number of active RTGC worker threads. |
long |
getRecentAllocationRate()
Bytes per milliseconds allocated by important and critical threads since the last call to reset(). |
long |
getSlidingBoostedModeAllocations()
Evolving threshold boosting the RTGC over important threads. |
long |
getSlidingNormalModeAllocations()
Evolving threshold which defines when the RTGC starts. |
long |
getTotalTimeBoosted()
Total time spent with the RTGC running at boosted priority. |
long |
getTotalTimeWithAllocationBlocked()
Total time spent with the memory reserved for critical threads. |
void |
reset()
Resets the worst case numbers and long term usage computation. |
void |
setBoostedMinFreeBytes(long value)
Change the minimum boosted memory threshold. |
void |
setBoostedSafetyMargin(long value)
Change the margin to avoid bursty boosted allocations. |
void |
setBoostedSlideFactor(long value)
Change the percentage lowering old worst case boosted allocation. |
void |
setNormalMinFreeBytes(long value)
Change the minimum normal memory threshold. |
void |
setNormalSafetyMargin(long value)
Change the margin to avoid bursty allocations. |
void |
setNormalSlideFactor(long value)
Change the percentage lowering old worst case allocation. |
Method Detail |
---|
java.lang.String getDescription()
int getNormalPriority()
void changeNormalPriority(int priority)
By increasing this value, the number of important threads decreases. This improves the chances that these threads will not be preempted and will not block on allocation.
The change is asynchronous and might be delayed. In addition, the RTGC might apply a slightly different value to ensure the consistency of the parameters.
priority
- new default priority.int getNormalWorkers()
void changeNormalWorkers(int workers)
By decreasing this value, threads running at a priority lower than NormalPriority will get more CPU cycles when the RTGC need not be boosted. The trade-off is that the RTGC may have to be boosted more often, thus impacting the important threads.
The change is asynchronous and might be delayed. In addition, the RTGC might apply a slightly different value to ensure the consistency of the parameters.
workers
- new default number of active RTGC worker threads.int getBoostedWorkers()
int getBoostedPriority()
void changeBoostedPriority(int priority)
The change is asynchronous and might be delayed. In addition, the RTGC might apply a slightly different value to ensure the consistency of the parameters.
priority
- new maximum priority.long getSlidingBoostedModeAllocations()
The lower the value, the later the RTGC is boosted. This improves throughput but may impact determinism on a multi-processor machine. Boosting the RTGC earlier may allow it to complete while the important threads with the highest priority can still allocate memory on spare processors.
void changeSlidingBoostedModeAllocations(long value)
The user can increase it to speed up the auto-tuning or start with a safer margin and avoid the initial pauses. This temporarily impacts throughput.
value
- threshold for the next run.long getBoostedMinFreeBytes()
Auto-tuning will not go below this limit. The RTGC will always be boosted when the memory reaches this threshold.
void setBoostedMinFreeBytes(long value)
A higher value prevents the auto-tuning from reaching very high performance by lowering the threshold when the allocation rate drops. However, it improves determinism when the allocation rate starts going up.
value
- minimum boosted memory threshold.long getBoostedSlideFactor()
The RTGC Guide describes how it impacts the dynamic threshold.
void setBoostedSlideFactor(long value)
The RTGC Guide describes how it impacts the dynamic threshold.
value
- percentage lowering old worst case boosted allocation.long getBoostedSafetyMargin()
The RTGC Guide describes how it impacts the dynamic threshold.
void setBoostedSafetyMargin(long value)
The RTGC Guide describes how it impacts the dynamic threshold.
value
- margin to avoid bursty boosted allocations.long getSlidingNormalModeAllocations()
The lower the value, the later the RTGC starts. This improves the throughput but may impact determinism. The RTGC may have to be boosted to its maximum priority if it starts too late. It may even have to block the non-critical threads. The user can increase it to speed up the auto-tuning or start with a safer margin and avoid the initial pauses.
void changeSlidingNormalModeAllocations(long value)
The user can increase it to speed up the auto-tuning or start with a safer margin and avoid the initial pauses. This temporarily impacts throughput.
value
- threshold for the next run.long getNormalMinFreeBytes()
Auto-tuning will not go below this limit. The RTGC will always start when the memory reaches this threshold.
void setNormalMinFreeBytes(long value)
A higher value prevents the auto-tuning from reaching very high performance by lowering the threshold when the allocation rate drops. However, it improves determinism when the allocation rate starts going up.
value
- minimum normal memory threshold.long getNormalSlideFactor()
The RTGC Guide describes how it impacts the dynamic threshold.
void setNormalSlideFactor(long value)
The RTGC Guide describes how it impacts the dynamic threshold.
value
- percentage lowering old worst case allocation.long getNormalSafetyMargin()
The RTGC Guide describes how it impacts the dynamic threshold.
void setNormalSafetyMargin(long value)
The RTGC Guide describes how it impacts the dynamic threshold.
value
- margin to avoid bursty allocations.long getAllocatedBytes()
This includes the bytes allocated by critical threads.
long getRecentAllocationRate()
long getTotalTimeBoosted()
This defines the total pause time for important threads.
long getLongestTimeBoosted()
This defines the worst pause time for important threads when there is no spare processors.
long getLongestTimeWithAllocationBlocked()
This defines the worst pause time for important threads when the RTGC does not use all the processors.
long getTotalTimeWithAllocationBlocked()
This defines the total pause time for important threads when the RTGC does not use all the processors.
void reset()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |