Skip to content

HBASE-28840: Optimise memory utilization bucketcache retrieval from persistence. - #6253

Merged
wchevreuil merged 1 commit into
apache:masterfrom
janardhanrh:HBASE-28840
Sep 18, 2024
Merged

HBASE-28840: Optimise memory utilization bucketcache retrieval from persistence.#6253
wchevreuil merged 1 commit into
apache:masterfrom
janardhanrh:HBASE-28840

Conversation

@jhungund

Copy link
Copy Markdown
Contributor

During the persistence of bucket-cache backing map to a file, the backing map is divided into multiple smaller chunks and persisted to the file. This chunking avoids the high memory utilisation of during persistence, since only a small subset of backing map entries need to persisted in one chunk.

However, during the retrieval of the backing map during the server startup, we accumulate all these chunks into a list and then process each chunk to recreate the in-memory backing map. Since, all the chunks are fetched from the persistence file and then processed, the memory requirement is higher.

With this change, the retrieval of bucket-cache from persistence file is optimised to enable the processing of one chunk at a time to avoid high memory utilisation.

Change-Id: I12ed252d543be120183cbe5a3e769e5cda7998c1

…ersistence.
During the persistence of bucket-cache backing map to a file, the backing map
is divided into multiple smaller chunks and persisted to the file. This chunking
avoids the high memory utilisation of during persistence, since only a small
subset of backing map entries need to persisted in one chunk.
However, during the retrieval of the backing map during the server startup,
we accumulate all these chunks into a list and then process each chunk to
recreate the in-memory backing map. Since, all the chunks are fetched from
the persistence file and then processed, the memory requirement is higher.
With this change, the retrieval of bucket-cache from persistence file is
optimised to enable the processing of one chunk at a time to avoid high
memory utilisation.
Change-Id: I12ed252d543be120183cbe5a3e769e5cda7998c1
@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeLogfileComment
+0 🆗reexec0m 45sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+0 🆗codespell0m 0scodespell was not available.
+0 🆗detsecrets0m 0sdetect-secrets was not available.
+1 💚@author0m 0sThe patch does not contain any @author tags.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
_ master Compile Tests _
+1 💚mvninstall4m 27smaster passed
+1 💚compile3m 43smaster passed
+1 💚checkstyle0m 43smaster passed
+1 💚spotbugs2m 0smaster passed
+1 💚spotless0m 59sbranch has no errors when running spotless:check.
_ Patch Compile Tests _
+1 💚mvninstall4m 8sthe patch passed
+1 💚compile3m 25sthe patch passed
+1 💚javac3m 25sthe patch passed
+1 💚blanks0m 0sThe patch has no blanks issues.
+1 💚checkstyle0m 43sthe patch passed
+1 💚spotbugs2m 7sthe patch passed
+1 💚hadoopcheck12m 7sPatch does not cause any errors with Hadoop 3.3.6 3.4.0.
+1 💚spotless0m 53spatch has no errors when running spotless:check.
_ Other Tests _
+1 💚asflicense0m 12sThe patch does not generate ASF License warnings.
43m 46s
SubsystemReport/Notes
DockerClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6253/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#6253
JIRA IssueHBASE-28840
Optional Testsdupname asflicense javac spotbugs checkstyle codespell detsecrets compile hadoopcheck hbaseanti spotless
unameLinux 1d1b16e1b374 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 391fa44
Default JavaEclipse Adoptium-17.0.11+9
Max. process+thread count90 (vs. ulimit of 30000)
modulesC: hbase-server U: hbase-server
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6253/1/console
versionsgit=2.34.1 maven=3.9.8 spotbugs=4.7.3
Powered byApache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeLogfileComment
+0 🆗reexec0m 40sDocker mode activated.
-0 ⚠️yetus0m 2sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --author-ignore-list --blanks-eol-ignore-file --blanks-tabs-ignore-file --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+1 💚mvninstall3m 59smaster passed
+1 💚compile1m 11smaster passed
+1 💚javadoc0m 35smaster passed
+1 💚shadedjars6m 37sbranch has no errors when building our shaded downstream artifacts.
_ Patch Compile Tests _
+1 💚mvninstall3m 46sthe patch passed
+1 💚compile1m 9sthe patch passed
+1 💚javac1m 9sthe patch passed
+1 💚javadoc0m 30sthe patch passed
+1 💚shadedjars6m 41spatch has no errors when building our shaded downstream artifacts.
_ Other Tests _
-1 ❌unit259m 50s/patch-unit-hbase-server.txthbase-server in the patch failed.
289m 55s
SubsystemReport/Notes
DockerClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6253/1/artifact/yetus-jdk17-hadoop3-check/output/Dockerfile
GITHUB PR#6253
JIRA IssueHBASE-28840
Optional Testsjavac javadoc unit compile shadedjars
unameLinux dd1990fea445 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 391fa44
Default JavaEclipse Adoptium-17.0.11+9
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6253/1/testReport/
Max. process+thread count4526 (vs. ulimit of 30000)
modulesC: hbase-server U: hbase-server
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6253/1/console
versionsgit=2.34.1 maven=3.9.8
Powered byApache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

@jhungund

Copy link
Copy Markdown
ContributorAuthor

The failing test passes, when executed locally. The failure seems not related to the change.

[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.apache.hadoop.hbase.replication.TestReplicationSmallTestsSync
[INFO] Running org.apache.hadoop.hbase.replication.TestNamespaceReplication
WARNING: A terminally deprecated method in java.lang.System has been called
WARNING: System::setSecurityManager has been called by org.apache.hadoop.hbase.SystemExitRule (file:/Users/janardhan.hungund/hbase-down/hbase/hbase-common/target/hbase-common-4.0.0-alpha-1-SNAPSHOT-tests.jar)
WARNING: Please consider reporting this to the maintainers of org.apache.hadoop.hbase.SystemExitRule
WARNING: System::setSecurityManager will be removed in a future release
WARNING: A terminally deprecated method in java.lang.System has been called
WARNING: System::setSecurityManager has been called by org.apache.hadoop.hbase.SystemExitRule (file:/Users/janardhan.hungund/hbase-down/hbase/hbase-common/target/hbase-common-4.0.0-alpha-1-SNAPSHOT-tests.jar)
WARNING: Please consider reporting this to the maintainers of org.apache.hadoop.hbase.SystemExitRule
WARNING: System::setSecurityManager will be removed in a future release
WARNING: A terminally deprecated method in java.lang.System has been called
WARNING: System::setSecurityManager has been called by org.apache.hadoop.hbase.SystemExitRule$1 (file:/Users/janardhan.hungund/hbase-down/hbase/hbase-common/target/hbase-common-4.0.0-alpha-1-SNAPSHOT-tests.jar)
WARNING: Please consider reporting this to the maintainers of org.apache.hadoop.hbase.SystemExitRule$1
WARNING: System::setSecurityManager will be removed in a future release
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 95.073 s - in org.apache.hadoop.hbase.replication.TestNamespaceReplication
WARNING: A terminally deprecated method in java.lang.System has been called
WARNING: System::setSecurityManager has been called by org.apache.hadoop.hbase.SystemExitRule$1 (file:/Users/janardhan.hungund/hbase-down/hbase/hbase-common/target/hbase-common-4.0.0-alpha-1-SNAPSHOT-tests.jar)
WARNING: Please consider reporting this to the maintainers of org.apache.hadoop.hbase.SystemExitRule$1
WARNING: System::setSecurityManager will be removed in a future release
[INFO] Tests run: 18, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 250.167 s - in org.apache.hadoop.hbase.replication.TestReplicationSmallTestsSync
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 20, Failures: 0, Errors: 0, Skipped: 0

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeLogfileComment
+0 🆗reexec0m 43sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+0 🆗codespell0m 0scodespell was not available.
+0 🆗detsecrets0m 0sdetect-secrets was not available.
+1 💚@author0m 0sThe patch does not contain any @author tags.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
_ master Compile Tests _
+1 💚mvninstall3m 0smaster passed
+1 💚compile3m 0smaster passed
+1 💚checkstyle0m 38smaster passed
+1 💚spotbugs1m 34smaster passed
+1 💚spotless0m 45sbranch has no errors when running spotless:check.
_ Patch Compile Tests _
+1 💚mvninstall2m 53sthe patch passed
+1 💚compile2m 59sthe patch passed
+1 💚javac2m 59sthe patch passed
+1 💚blanks0m 0sThe patch has no blanks issues.
+1 💚checkstyle0m 37sthe patch passed
+1 💚spotbugs1m 40sthe patch passed
+1 💚hadoopcheck10m 43sPatch does not cause any errors with Hadoop 3.3.6 3.4.0.
+1 💚spotless0m 44spatch has no errors when running spotless:check.
_ Other Tests _
+1 💚asflicense0m 11sThe patch does not generate ASF License warnings.
35m 51s
SubsystemReport/Notes
DockerClientAPI=1.47 ServerAPI=1.47 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6253/2/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#6253
JIRA IssueHBASE-28840
Optional Testsdupname asflicense javac spotbugs checkstyle codespell detsecrets compile hadoopcheck hbaseanti spotless
unameLinux e26b7dd53084 5.4.0-195-generic #215-Ubuntu SMP Fri Aug 2 18:28:05 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 391fa44
Default JavaEclipse Adoptium-17.0.11+9
Max. process+thread count84 (vs. ulimit of 30000)
modulesC: hbase-server U: hbase-server
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6253/2/console
versionsgit=2.34.1 maven=3.9.8 spotbugs=4.7.3
Powered byApache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeLogfileComment
+0 🆗reexec0m 15sDocker mode activated.
-0 ⚠️yetus0m 3sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --author-ignore-list --blanks-eol-ignore-file --blanks-tabs-ignore-file --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+1 💚mvninstall3m 6smaster passed
+1 💚compile0m 59smaster passed
+1 💚javadoc0m 31smaster passed
+1 💚shadedjars5m 23sbranch has no errors when building our shaded downstream artifacts.
_ Patch Compile Tests _
+1 💚mvninstall2m 57sthe patch passed
+1 💚compile0m 58sthe patch passed
+1 💚javac0m 58sthe patch passed
+1 💚javadoc0m 29sthe patch passed
+1 💚shadedjars5m 15spatch has no errors when building our shaded downstream artifacts.
_ Other Tests _
+1 💚unit218m 11shbase-server in the patch passed.
242m 28s
SubsystemReport/Notes
DockerClientAPI=1.47 ServerAPI=1.47 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6253/2/artifact/yetus-jdk17-hadoop3-check/output/Dockerfile
GITHUB PR#6253
JIRA IssueHBASE-28840
Optional Testsjavac javadoc unit compile shadedjars
unameLinux feb4ea1f2c38 5.4.0-192-generic #212-Ubuntu SMP Fri Jul 5 09:47:39 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 391fa44
Default JavaEclipse Adoptium-17.0.11+9
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6253/2/testReport/
Max. process+thread count5131 (vs. ulimit of 30000)
modulesC: hbase-server U: hbase-server
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6253/2/console
versionsgit=2.34.1 maven=3.9.8
Powered byApache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

@wchevreuil
wchevreuil merged commit 21381ba into apache:masterSep 18, 2024
wchevreuil pushed a commit that referenced this pull request Sep 18, 2024
…ersistence. (#6253)
Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@jhungund@Apache-HBase@wchevreuil