|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CriticalThreadsMXBean
Monitoring the critical threads with the realtime garbage collector.
This class is still under development and may evolve in 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.
Critical threads are those running above a given boundary, called CriticalBoundary. Their determinism is ensured by reserving some memory for them. If memory goes below that limit, the other threads block.
This interface allows you to change the parameters and to monitor the determinism. WorstRemainingMemory is 0 when a critical thread blocked on allocation. WorstNonFragmentedMemory is 0 when a critical thread had to use a slower allocation mechanism.
Note that parameter changes might be delayed up to the next GC cycle.
Method Summary | |
---|---|
void |
changeCriticalBoundary(int priority)
Change the critical boundary. |
long |
getAllocatedBytes()
Total bytes allocated by threads running in the critical range. |
int |
getCriticalBoundary()
Get the critical boundary. |
java.lang.String |
getDescription()
Short description of the MBean. |
long |
getRecentAllocationRate()
Bytes per milliseconds allocated by critical threads since the last call to reset(). |
long |
getRTGCCriticalReservedBytes()
Threshold under which non-critical threads block. |
long |
getWorstNonFragmentedMemory()
Worst number of bytes usable for thread allocation buffers since the last reset(). |
long |
getWorstRemainingMemory()
Worst number of bytes remaining since the last reset() call. |
void |
reset()
Resets the worst case numbers and long term usage computation. |
void |
setRTGCCriticalReservedBytes(long value)
Changed the threshold under which non-critical threads block. |
Method Detail |
---|
java.lang.String getDescription()
int getCriticalBoundary()
The critical boundary is the priority which defines the boundary between the cricital and the non-critical part of the application.
void changeCriticalBoundary(int priority)
Warning: if the boundary is too low, the worst case memory consumption of the critical threads increases. The amount of reserved bytes must be increased.
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 boundary for the critical threadslong getRTGCCriticalReservedBytes()
void setRTGCCriticalReservedBytes(long value)
If the new limit is too low, critical threads may block when the memory is exhausted. If too high, the other threads will block more often.
value
- new threshold.long getAllocatedBytes()
long getRecentAllocationRate()
long getWorstRemainingMemory()
This includes the free memory chunks that are to small to be used unless the heaps gets heavily fragmented.
If a non-critical thread has blocked, this value will be less or equal to the number of reserved bytes.
If a critical thread has blocked, this value will be 0.
long getWorstNonFragmentedMemory()
This is the free memory that is considered by the RTGC scheduling policies. It ignores the free memory chunks that are too small to be used when the heap is not fragmented.
If a non-critical thread has failed to allocate, this will be less or equal to the number of reserved bytes. Depending on the GC policy, the thread might have blocked at that time.
If a critical thread has failed to allocate, this value will be 0. Critical threads do not block in that case but use a slower allocation mechanism.
void reset()
This impacts getRecentAllocationRate, getWorstRemainingMemory, and getWorstNonFragmentedMemory.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |