New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The Reference Stream is taking a long time to iterate through #3499
Comments
I think that part is expected... and would have occurred with batching in 1.10 using a JVM with less memory. In 2.1, batch sizes are determined explicitly through configuration. We found this to be much more reliable (and a substantially simpler implementation) than the auto-batching based on available memory, which did not always work well if the JVM was resizing or during some Java GC cycles. The configurable batch sizes should allow more control over the size of the batches you want to process, and you can tune your JVM memory accordingly. This issue and the user's requirement to choose their own batch size was specifically called out with its own paragraph in the 2.1.0 release notes. |
Yeah I would agree. I just wanted to be clear that our 3x slow down was not related to batching. |
I asked @dtspence to update https://github.com/dtspence/accumulo-jmh-test with the following:
|
That implementation may buffer all of the references in memory which we would like to avoid. |
The results below use an updated tests branch implementing 1) multiple metadata-splits, 2) parameterized splits/files, and 3) multiple table splits. The tests show a few different implementations (including the original 2.1.1 baseline and version 1.10.3). I had been using #3501 for benchmarking during the week and included below. The profiler comparision on the updated 2.1.2-SNAPSHOT (latest) suggested there is some overhead with The parameterized splits/files affected the per operation output and resulted in an overall execution time. The per-operation metric was relocated to the The logic is currently on two separate branches (kept separate to avoid any impact to testing late last week): Accumulo 1.10: The following details Accumulo 1.10.3 performance of Location of method extracted:
Accumulo 2.1.1: The following is a baseline test of 2.1.1.
PR 3501: The logic in #3501 resulted in the following times.
Accumulo 2.1.2-SNAPSHOT: The most recent GC changes from 2.1.2-SNAPSHOT. The removal of the
Accumulo 2.1.2-SNAPSHOT (with Path(URI) and validateFileName()): The following is based on the GC changes (from 2.1.2-SNAPSHOT) and makes a minor change to use the Reference: accumulo/core/src/main/java/org/apache/accumulo/core/metadata/StoredTabletFile.java Line 47 in 260fde4
Validate FileName: Created an additional benchmark to experiment with a non-regex version of the check. I looked through PR comments and could not find if it was specifically discussed.
public static void validateFileName(String fileName) {
Objects.requireNonNull(fileName);
for (int i = 0; i < fileName.length(); i++) {
final char ch = fileName.charAt(i);
if (!(Character.isLetterOrDigit(ch) || ch == '-' || ch == '.' || ch == '_')) {
throw new IllegalArgumentException(
"Provided filename (" + fileName + ") contains invalid characters.");
}
}
} |
* Creates TabletFile path with URI, which avoids a regex validation. * Updates validateFileName to check explicit characters. * Unit test for ValidationUtil. Fixes apache#3499
Creates TabletFile path with URI, which avoids a regex validation. Fixes #3499 --------- Co-authored-by: dtspence <dtspence@users.noreply.github.com> Co-authored-by: Christopher Tubbs <ctubbsii@apache.org>
Describe the bug
The Reference Stream created in GCRun.getReferences() appears to be taking longer to iterate through than the Reference iterator that was implemented in 1.10.
Our GC cycles are taking at least 3x longer on accumulo 2.1.1 than they did in 1.10. We performed a jstack on the gc cycle and virtually all the time was spent iterating through the stream.
Note: The GC cycles are taking 3x when candidate batching does not occur. When candidate batching occurs GC cycle times increase by X more times (where X is the number of batches) (For example: when we perform 4 batches, the GC cycles were about 12x longer than they were in 1.10)
Versions (OS, Maven, Java, and others, as appropriate):
To Reproduce
Run a Jstack on a GC cycle on a cluster
Expected behavior
The GC cycle times would not signifcantly increase between versions
The text was updated successfully, but these errors were encountered: