This is an automated email from the ASF dual-hosted git repository. dpavlov pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/ignite.git
The following commit(s) were added to refs/heads/master by this push: new bd6bc43 IGNITE-10639 Improve doc for page memory (#5702) bd6bc43 is described below commit bd6bc433bc33d500254c799f9c4f502c42b6accd Author: Dmitriy Pavlov <dpav...@apache.org> AuthorDate: Thu Jan 3 16:53:55 2019 +0300 IGNITE-10639 Improve doc for page memory (#5702) IGNITE-10639 Proof of concept for an internal description for packages --- .../pagemem/PagesWriteSpeedBasedThrottle.java | 4 ++- .../processors/cache/persistence/pagemem/README.md | 30 ++++++++++++++++++++-- 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PagesWriteSpeedBasedThrottle.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PagesWriteSpeedBasedThrottle.java index 2dd8127..9e4975c 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PagesWriteSpeedBasedThrottle.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PagesWriteSpeedBasedThrottle.java @@ -29,7 +29,9 @@ import org.apache.ignite.internal.util.typedef.internal.U; /** * Throttles threads that generate dirty pages during ongoing checkpoint. * Designed to avoid zero dropdowns that can happen if checkpoint buffer is overflowed. - * Uses average checkpoint write speed and moment speed of marking pages as dirty. + * Uses average checkpoint write speed and moment speed of marking pages as dirty.<br> + * + * See also: <a href="https://github.com/apache/ignite/tree/master/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem#speed-based-throttling">Speed-based throttling description</a>. */ public class PagesWriteSpeedBasedThrottle implements PagesWriteThrottlePolicy { /** Maximum dirty pages in region. */ diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/README.md b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/README.md index 57e623d..0244d45 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/README.md +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/README.md @@ -2,11 +2,37 @@ Apache Ignite Native Peristence Page Memory ------------------------------------------- This package contains page memory implementation for case persitence is enabled. -Speed Based Throttling ----------------------- +## Loaded Pages Table + +An implementation of [LoadedPagesMap.java](LoadedPagesMap.java) +(PageIdTable) manages mapping from Page ID to relative pointer map (rowAddr). + +See introduction in wiki [Region Structure](https://cwiki.apache.org/confluence/display/IGNITE/Ignite+Durable+Memory+-+under+the+hood#IgniteDurableMemory-underthehood-Regionandsegmentstructure). + +<img src="https://cwiki.apache.org/confluence/rest/gliffy/1.0/embeddedDiagrams/e9df3b17-1a57-487c-a842-dbb6b1062709.png"> + +Current implementation is [RobinHoodBackwardShiftHashMap.java](RobinHoodBackwardShiftHashMap.java) + +## Throttling +Throttling is an intentional slowdown of operation in the grid to equate throughput of the storage and speed of user operations. + +Throttling is implemented at physical level of operations, so it operates not with user entries, but with page memory pages. + For an introduction, please see [wiki PagesWriteThrottling](https://cwiki.apache.org/confluence/display/IGNITE/Ignite+Persistent+Store+-+under+the+hood#IgnitePersistentStore-underthehood-PagesWriteThrottling) +There are two types of throttling implemented in Apache Ignite: +* Checkpoint buffer overflow protection. + +This CP Buffer throttling is enabled by default. It is activated if CP buffer is close to being filled. +In this case, there is an exponential backoff at 2/3 when filling reached. +Since the CP buffer is being cleaned as the checkpoint progresses, this more or less behaves like trotting. + +* the whole region marked dirty protection. +This type of throttling protects region segments from being completely filled by dirty pages when checkpoint progress is far from completion. + +### Speed Based Throttling + If throttling is enabled in User configuration, then Speed based throttling is applied. Speed based throttling is implemented by