You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "Michael Blow (Code Review)" <do...@asterixdb.incubator.apache.org> on 2016/10/13 22:36:51 UTC
Change in asterixdb[master]: ASTERIXDB-1570 Debugging
Michael Blow has uploaded a new change for review.
https://asterix-gerrit.ics.uci.edu/1282
Change subject: ASTERIXDB-1570 Debugging
......................................................................
ASTERIXDB-1570 Debugging
Report how many pins took place on extended pin cycles, in case the
failures are due to unfair queueing
Change-Id: I16a3316d9f6f1d436873c051bd0f260126483ceb
---
M hyracks-fullstack/hyracks/hyracks-storage-common/src/main/java/org/apache/hyracks/storage/common/buffercache/BufferCache.java
1 file changed, 8 insertions(+), 2 deletions(-)
git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/82/1282/1
diff --git a/hyracks-fullstack/hyracks/hyracks-storage-common/src/main/java/org/apache/hyracks/storage/common/buffercache/BufferCache.java b/hyracks-fullstack/hyracks/hyracks-storage-common/src/main/java/org/apache/hyracks/storage/common/buffercache/BufferCache.java
index 28ba981..3be1c46 100644
--- a/hyracks-fullstack/hyracks/hyracks-storage-common/src/main/java/org/apache/hyracks/storage/common/buffercache/BufferCache.java
+++ b/hyracks-fullstack/hyracks/hyracks-storage-common/src/main/java/org/apache/hyracks/storage/common/buffercache/BufferCache.java
@@ -35,6 +35,7 @@
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadFactory;
+import java.util.concurrent.atomic.AtomicLong;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
import java.util.logging.Level;
@@ -82,6 +83,7 @@
//!DEBUG
private IIOReplicationManager ioReplicationManager;
private final List<ICachedPageInternal> cachedPages = new ArrayList<>();
+ private final AtomicLong masterPinCount = new AtomicLong();
private boolean closed;
@@ -1245,6 +1247,7 @@
private ICachedPage getPageLoop(long dpid, int multiplier, boolean confiscate)
throws HyracksDataException {
+ final long startingPinCount = masterPinCount.get();
int cycleCount = 0;
try {
while (true) {
@@ -1252,6 +1255,7 @@
int startCleanedCount = cleanerThread.cleanedCount;
ICachedPage page = confiscate ? confiscateInner(dpid, multiplier) : findPageInner(dpid);
if (page != null) {
+ masterPinCount.incrementAndGet();
return page;
}
// no page available to confiscate. try kicking the cleaner thread.
@@ -1286,13 +1290,15 @@
if (cycleCount > MAX_PIN_ATTEMPT_CYCLES) {
cycleCount = 0; // suppress warning below
throw new HyracksDataException("Unable to find free page in buffer cache after "
- + MAX_PIN_ATTEMPT_CYCLES + " cycles (buffer cache undersized?)");
+ + MAX_PIN_ATTEMPT_CYCLES + " cycles (buffer cache undersized?); "
+ + (masterPinCount.get() - startingPinCount) + " successful pins since start of cycle");
}
}
} finally {
if (cycleCount > PIN_ATTEMPT_CYCLES_WARNING_THRESHOLD && LOGGER.isLoggable(Level.WARNING)) {
LOGGER.warning("Took " + cycleCount + " cycles to find free page in buffer cache. (buffer cache " +
- "undersized?)");
+ "undersized?); " + (masterPinCount.get() - startingPinCount) +
+ " successful pins since start of cycle");
}
}
}
--
To view, visit https://asterix-gerrit.ics.uci.edu/1282
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I16a3316d9f6f1d436873c051bd0f260126483ceb
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Michael Blow <mb...@apache.org>
Change in asterixdb[master]: ASTERIXDB-1570 Debugging
Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.
Change subject: ASTERIXDB-1570 Debugging
......................................................................
Patch Set 1:
Integration Tests Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-integration-tests/918/
--
To view, visit https://asterix-gerrit.ics.uci.edu/1282
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I16a3316d9f6f1d436873c051bd0f260126483ceb
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Michael Blow <mb...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-HasComments: No
Change in asterixdb[master]: ASTERIXDB-1570 Debugging
Posted by "Till Westmann (Code Review)" <do...@asterixdb.incubator.apache.org>.
Till Westmann has posted comments on this change.
Change subject: ASTERIXDB-1570 Debugging
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://asterix-gerrit.ics.uci.edu/1282
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I16a3316d9f6f1d436873c051bd0f260126483ceb
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Michael Blow <mb...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-HasComments: No
Change in asterixdb[master]: ASTERIXDB-1570 Debugging
Posted by "Michael Blow (Code Review)" <do...@asterixdb.incubator.apache.org>.
Michael Blow has submitted this change and it was merged.
Change subject: ASTERIXDB-1570 Debugging
......................................................................
ASTERIXDB-1570 Debugging
Report how many pins took place on extended pin cycles, in case the
failures are due to unfair queueing
Change-Id: I16a3316d9f6f1d436873c051bd0f260126483ceb
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1282
Sonar-Qube: Jenkins <je...@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <je...@fulliautomatix.ics.uci.edu>
Reviewed-by: Till Westmann <ti...@apache.org>
Reviewed-by: Yingyi Bu <bu...@gmail.com>
---
M hyracks-fullstack/hyracks/hyracks-storage-common/src/main/java/org/apache/hyracks/storage/common/buffercache/BufferCache.java
1 file changed, 8 insertions(+), 2 deletions(-)
Approvals:
Yingyi Bu: Looks good to me, approved
Till Westmann: Looks good to me, approved
Jenkins: Verified; No violations found; Verified
diff --git a/hyracks-fullstack/hyracks/hyracks-storage-common/src/main/java/org/apache/hyracks/storage/common/buffercache/BufferCache.java b/hyracks-fullstack/hyracks/hyracks-storage-common/src/main/java/org/apache/hyracks/storage/common/buffercache/BufferCache.java
index 28ba981..3be1c46 100644
--- a/hyracks-fullstack/hyracks/hyracks-storage-common/src/main/java/org/apache/hyracks/storage/common/buffercache/BufferCache.java
+++ b/hyracks-fullstack/hyracks/hyracks-storage-common/src/main/java/org/apache/hyracks/storage/common/buffercache/BufferCache.java
@@ -35,6 +35,7 @@
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadFactory;
+import java.util.concurrent.atomic.AtomicLong;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
import java.util.logging.Level;
@@ -82,6 +83,7 @@
//!DEBUG
private IIOReplicationManager ioReplicationManager;
private final List<ICachedPageInternal> cachedPages = new ArrayList<>();
+ private final AtomicLong masterPinCount = new AtomicLong();
private boolean closed;
@@ -1245,6 +1247,7 @@
private ICachedPage getPageLoop(long dpid, int multiplier, boolean confiscate)
throws HyracksDataException {
+ final long startingPinCount = masterPinCount.get();
int cycleCount = 0;
try {
while (true) {
@@ -1252,6 +1255,7 @@
int startCleanedCount = cleanerThread.cleanedCount;
ICachedPage page = confiscate ? confiscateInner(dpid, multiplier) : findPageInner(dpid);
if (page != null) {
+ masterPinCount.incrementAndGet();
return page;
}
// no page available to confiscate. try kicking the cleaner thread.
@@ -1286,13 +1290,15 @@
if (cycleCount > MAX_PIN_ATTEMPT_CYCLES) {
cycleCount = 0; // suppress warning below
throw new HyracksDataException("Unable to find free page in buffer cache after "
- + MAX_PIN_ATTEMPT_CYCLES + " cycles (buffer cache undersized?)");
+ + MAX_PIN_ATTEMPT_CYCLES + " cycles (buffer cache undersized?); "
+ + (masterPinCount.get() - startingPinCount) + " successful pins since start of cycle");
}
}
} finally {
if (cycleCount > PIN_ATTEMPT_CYCLES_WARNING_THRESHOLD && LOGGER.isLoggable(Level.WARNING)) {
LOGGER.warning("Took " + cycleCount + " cycles to find free page in buffer cache. (buffer cache " +
- "undersized?)");
+ "undersized?); " + (masterPinCount.get() - startingPinCount) +
+ " successful pins since start of cycle");
}
}
}
--
To view, visit https://asterix-gerrit.ics.uci.edu/1282
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I16a3316d9f6f1d436873c051bd0f260126483ceb
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Michael Blow <mb...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Michael Blow <mb...@apache.org>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-Reviewer: Yingyi Bu <bu...@gmail.com>
Change in asterixdb[master]: ASTERIXDB-1570 Debugging
Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.
Change subject: ASTERIXDB-1570 Debugging
......................................................................
Patch Set 1: Integration-Tests+1
Integration Tests Successful
https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-integration-tests/918/ : SUCCESS
--
To view, visit https://asterix-gerrit.ics.uci.edu/1282
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I16a3316d9f6f1d436873c051bd0f260126483ceb
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Michael Blow <mb...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-HasComments: No
Change in asterixdb[master]: ASTERIXDB-1570 Debugging
Posted by "Michael Blow (Code Review)" <do...@asterixdb.incubator.apache.org>.
Michael Blow has posted comments on this change.
Change subject: ASTERIXDB-1570 Debugging
......................................................................
Patch Set 1:
I have never reproduced this locally- the information is helpful for reports by others in the future.
The atomic increment should not be expensive given it is only once per pin.
--
To view, visit https://asterix-gerrit.ics.uci.edu/1282
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I16a3316d9f6f1d436873c051bd0f260126483ceb
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Michael Blow <mb...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Michael Blow <mb...@apache.org>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-Reviewer: Yingyi Bu <bu...@gmail.com>
Gerrit-HasComments: No
Change in asterixdb[master]: ASTERIXDB-1570 Debugging
Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.
Change subject: ASTERIXDB-1570 Debugging
......................................................................
Patch Set 1:
Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-notopic/3012/
--
To view, visit https://asterix-gerrit.ics.uci.edu/1282
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I16a3316d9f6f1d436873c051bd0f260126483ceb
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Michael Blow <mb...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-HasComments: No
Change in asterixdb[master]: ASTERIXDB-1570 Debugging
Posted by "Yingyi Bu (Code Review)" <do...@asterixdb.incubator.apache.org>.
Yingyi Bu has posted comments on this change.
Change subject: ASTERIXDB-1570 Debugging
......................................................................
Patch Set 1:
Why this change should be merged as it's only for debugging purpose?
Is there a debug flag that we can check instead of mutating a atomic value every time?
--
To view, visit https://asterix-gerrit.ics.uci.edu/1282
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I16a3316d9f6f1d436873c051bd0f260126483ceb
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Michael Blow <mb...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-Reviewer: Yingyi Bu <bu...@gmail.com>
Gerrit-HasComments: No
Change in asterixdb[master]: ASTERIXDB-1570 Debugging
Posted by "Yingyi Bu (Code Review)" <do...@asterixdb.incubator.apache.org>.
Yingyi Bu has posted comments on this change.
Change subject: ASTERIXDB-1570 Debugging
......................................................................
Patch Set 1: Code-Review+2
All right.
We probably should remove that after 1570 is fixed.
--
To view, visit https://asterix-gerrit.ics.uci.edu/1282
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I16a3316d9f6f1d436873c051bd0f260126483ceb
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Michael Blow <mb...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Michael Blow <mb...@apache.org>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-Reviewer: Yingyi Bu <bu...@gmail.com>
Gerrit-HasComments: No