|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sleepycat.je.dbi.MemoryBudget
public class MemoryBudget
MemoryBudget calculates the available memory for JE and how to apportion it between cache and log buffers. It is meant to centralize all memory calculations. Objects that ask for memory budgets should get settings from this class, rather than using the configuration parameter values directly.
Field Summary | |
---|---|
static int |
ARRAY_ITEM_OVERHEAD
|
static int |
BIN_FIXED_OVERHEAD
|
static int |
BYTE_ARRAY_OVERHEAD
|
static int |
CHECKPOINT_REFERENCE_SIZE
|
static int |
DBIN_FIXED_OVERHEAD
|
static int |
DIN_FIXED_OVERHEAD
|
static int |
DUPCOUNTLN_OVERHEAD
|
static int |
HASHMAP_ENTRY_OVERHEAD
|
static int |
HASHMAP_OVERHEAD
|
static int |
HASHSET_ENTRY_OVERHEAD
|
static int |
HASHSET_OVERHEAD
|
static int |
IN_FIXED_OVERHEAD
|
static int |
KEY_OVERHEAD
|
static int |
LN_OVERHEAD
|
static int |
LOCK_OVERHEAD
|
static int |
LOCKINFO_OVERHEAD
|
static int |
LONG_LIST_PER_ITEM_OVERHEAD
|
static int |
LONG_OVERHEAD
|
static int |
LSN_ARRAY_BYTE_BASED_FIXED_OVERHEAD
|
static int |
LSN_ARRAY_LONG_BASED_FIXED_OVERHEAD
|
static int |
LSN_SIZE
|
static long |
MIN_MAX_MEMORY_SIZE
|
static String |
MIN_MAX_MEMORY_SIZE_STRING
|
static int |
OBJECT_OVERHEAD
|
static int |
TFS_LIST_INITIAL_OVERHEAD
|
static int |
TFS_LIST_SEGMENT_OVERHEAD
|
static int |
TWOHASHMAPS_OVERHEAD
|
static int |
TXN_OVERHEAD
|
static int |
UTILIZATION_PROFILE_ENTRY
|
Constructor Summary | |
---|---|
MemoryBudget(EnvironmentImpl envImpl,
DbConfigManager configManager)
|
Method Summary | |
---|---|
long |
accumulateNewUsage(IN in,
long newSize)
|
static int |
byteArraySize(int arrayLen)
Returns the memory size occupied by a byte array of a given length. |
long |
calcTreeCacheUsage()
Public for testing. |
void |
envConfigUpdate(DbConfigManager configManager)
Respond to config updates. |
long |
getBINOverhead()
|
long |
getCacheBudget()
|
long |
getCacheMemoryUsage()
|
long |
getCriticalThreshold()
|
long |
getDBINOverhead()
|
long |
getDINOverhead()
|
long |
getINOverhead()
|
long |
getLogBufferBudget()
|
long |
getMaxMemory()
|
static long |
getRuntimeMaxMemory()
Returns Runtime.maxMemory(), accounting for a MacOS bug. |
long |
getTrackerBudget()
|
long |
getTreeMemoryUsage()
Used for unit testing. |
(package private) void |
initCacheMemoryUsage()
Initialize the starting environment memory state |
(package private) void |
loadStats(StatsConfig config,
EnvironmentStats stats)
|
void |
refreshTreeMemoryUsage(long newSize)
|
void |
updateLockMemoryUsage(long increment)
|
void |
updateMiscMemoryUsage(long increment)
Update the environment wide misc memory count, wake up the evictor if necessary. |
void |
updateTreeMemoryUsage(long increment)
Update the environment wide tree memory count, wake up the evictor if necessary. |
void |
updateTxnMemoryUsage(long increment)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int LONG_OVERHEAD
public static final int BYTE_ARRAY_OVERHEAD
public static final int OBJECT_OVERHEAD
public static final int ARRAY_ITEM_OVERHEAD
public static final int HASHMAP_OVERHEAD
public static final int HASHMAP_ENTRY_OVERHEAD
public static final int HASHSET_OVERHEAD
public static final int HASHSET_ENTRY_OVERHEAD
public static final int TWOHASHMAPS_OVERHEAD
public static final int LN_OVERHEAD
public static final int DUPCOUNTLN_OVERHEAD
public static final int BIN_FIXED_OVERHEAD
public static final int DIN_FIXED_OVERHEAD
public static final int DBIN_FIXED_OVERHEAD
public static final int IN_FIXED_OVERHEAD
public static final int KEY_OVERHEAD
public static final int LSN_SIZE
public static final int LSN_ARRAY_BYTE_BASED_FIXED_OVERHEAD
public static final int LSN_ARRAY_LONG_BASED_FIXED_OVERHEAD
public static final int LOCK_OVERHEAD
public static final int LOCKINFO_OVERHEAD
public static final int TXN_OVERHEAD
public static final int CHECKPOINT_REFERENCE_SIZE
public static final int UTILIZATION_PROFILE_ENTRY
public static final int TFS_LIST_INITIAL_OVERHEAD
public static final int TFS_LIST_SEGMENT_OVERHEAD
public static final int LONG_LIST_PER_ITEM_OVERHEAD
public static final long MIN_MAX_MEMORY_SIZE
public static final String MIN_MAX_MEMORY_SIZE_STRING
Constructor Detail |
---|
MemoryBudget(EnvironmentImpl envImpl, DbConfigManager configManager) throws DatabaseException
DatabaseException
Method Detail |
---|
public void envConfigUpdate(DbConfigManager configManager) throws DatabaseException
envConfigUpdate
in interface EnvConfigObserver
DatabaseException
public static long getRuntimeMaxMemory()
void initCacheMemoryUsage() throws DatabaseException
DatabaseException
public long calcTreeCacheUsage() throws DatabaseException
DatabaseException
public void updateTreeMemoryUsage(long increment)
increment
- note that increment may be negative.public void updateMiscMemoryUsage(long increment)
increment
- note that increment may be negative.public void updateLockMemoryUsage(long increment)
public void updateTxnMemoryUsage(long increment)
public long accumulateNewUsage(IN in, long newSize)
public void refreshTreeMemoryUsage(long newSize)
public long getCacheMemoryUsage()
public long getTreeMemoryUsage()
public long getLogBufferBudget()
public long getTrackerBudget()
public long getMaxMemory()
public long getCriticalThreshold()
public long getCacheBudget()
public long getINOverhead()
public long getBINOverhead()
public long getDINOverhead()
public long getDBINOverhead()
public static int byteArraySize(int arrayLen)
void loadStats(StatsConfig config, EnvironmentStats stats)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |