Refer to EnvironmentStats ,for a run down of what all information gets dumped. StatsConfig has a setClear() method, which lets you get 'deltas' of values from last time instead of absolute values. I am going to cover fast stat metrics that relate to analysing issues in your "fast path"
Cache Usage & IO:
cacheTotalBytes/sharedCacheTotalBytes - gives you the how much each of your environments use out of your shared bdb cache. If you have a env, which has higher latency due to disk, then try tweaking the cache size.
nSequentialWriteBytes/nRandomWriteBytes & nSequentialReadBytes/nRandomReadBytes are very helpful in determining how much IO your app is actually throwing. Compare this to SAR/iostat output to see how much headroom you have. This is useful for SSDs as there is more headroom than spindle disks, where you run out of iops pretty soon and its all cache sizing after that.
nBINsFetchMiss/nBINsFetch - gives you an estimate of the proportion of your time the requested BIN node was not found in memory. Higher values are bad
since you will incur contention, due to latching of the parent IN node of the BIN, while the BIN is fetched into memory. Keep an eye on nAcquiresNoWaiters and nAcquireWithContention although btreeRelatchesRequired seems to be more directly related to the problem I described.
Increase cache size accordingly to keep this down to 10% or so.
nEvictPasses indicates evictor activity. From the code, every operation does CRITICAL eviction, i.e releases just enough to maintain budget. requiredEvictBytes will tell you how much it has to evict each time.
nNodesEvicted is usually proportional to nCacheMiss and directly affects GC. Make sure, your collection throughput can keep up with the evictionRate.
If nRootNodesEvicted has some reasonable value, then your cache is seriously small. Similarly keep an eye on nBINsEvicted[Critical] and nUpperINsEvicted[Critical], if their proportion is high w.r.t nNodesEvicted, once again you have small cache.
Use CacheMode.EVICT_LN , (as mentioned in the JE faq) to leverage the page cache for caching your data, while you use the JVM heap for index nodes alone. This would give the best average case performance.
These are useful in understanding the cleaner behaviour. If you overlay these, with the cache miss and the application latencies, in a chart, you can see how much impact these have. From the code, it seems like the cleaner will contend with application threads for cache eviction. Hence watch for contention during high cleaner activity.
Tuning them is basically a trade-off between how much disk you have. I am not doing to get into the details of this now. Later as I learn further.
More to come, as I understand what correlations make sense in a practical sense
Post a Comment