# Optimizing Apache HBase availability on Amazon EMR, Part 2: Diagnose and tune compaction

DevFeed: [Optimizing Apache HBase availability on Amazon EMR, Part 2: Diagnose and tune compaction](<https://devfeed.tech/articles/optimizing-apache-hbase-availability-on-amazon-emr-part-2-diagnose-and-tune-compaction-129563.md>)

Original publisher: [Read original article](<https://aws.amazon.com/blogs/big-data/optimizing-apache-hbase-availability-on-amazon-emr-part-2-diagnose-and-tune-compaction/>)

Author: Reekunj Parmar

Published: 2026-11-11T22:06:59Z

Content type: tutorial

Language: en

Sources: [AWS Big Data Blog](<https://devfeed.tech/sources/aws-big-data-blog.md>)

Topics: [performance-engineering](<https://devfeed.tech/topics/performance-engineering.md>), [Amazon Web Services](<https://devfeed.tech/topics/aws.md>), [Amazon S3](<https://devfeed.tech/topics/amazon-s3.md>)

Tags: [amazon-emr](<https://devfeed.tech/tags/amazon-emr.md>), [amazon-s3](<https://devfeed.tech/tags/amazon-s3.md>), [apache](<https://devfeed.tech/tags/apache.md>), [apache-spark](<https://devfeed.tech/tags/apache-spark.md>), [availability](<https://devfeed.tech/tags/availability.md>), [aws-support](<https://devfeed.tech/tags/aws-support.md>), [compaction](<https://devfeed.tech/tags/compaction.md>), [diagnose](<https://devfeed.tech/tags/diagnose.md>), [hbase](<https://devfeed.tech/tags/hbase.md>), [intermediate-200](<https://devfeed.tech/tags/intermediate-200.md>), [latency](<https://devfeed.tech/tags/latency.md>), [learn-how-to](<https://devfeed.tech/tags/learn-how-to.md>), [optimizing](<https://devfeed.tech/tags/optimizing.md>), [performance](<https://devfeed.tech/tags/performance.md>), [series](<https://devfeed.tech/tags/series.md>), [spikes](<https://devfeed.tech/tags/spikes.md>), [support](<https://devfeed.tech/tags/support.md>), [technical-how-to](<https://devfeed.tech/tags/technical-how-to.md>)

## AI overview

The article recommends confirming compaction pressure before changing settings: check the affected RegionServer's compaction queue and store files in the HBase UI, rule out GC and host resource issues, and compare region read latency with a canary baseline. For HBase on S3 with EMR 7.10-7.13, first set `fs.s3a.experimental.input.fadvise` to `sequential`; then lower compaction throughput bounds, tune frequency, define off-peak hours, or disable automatic major compaction and schedule it manually. Change one parameter at a time and restart HBase as required. Manual scheduling means deleted cells and markers remain until major compaction, so monitor store file counts and avoid running manual compactions on read replicas. To reduce compaction work, limit region size, address write hotspotting, reduce small flushes, and size BucketCache appropriately; increasing MemStore settings can increase read-replica lag and requires sufficient heap. Contact AWS Support if two rounds of tuning do not improve latency or before risky metadata repairs.

## Source excerpt

Compaction keeps HBase read performance healthy, but when it runs during peak hours it drives latency spikes, write stalls, and RegionTooBusyException errors. In Part 2 of this series, you learn how to confirm compaction is the cause on Amazon EMR, tune the right parameters in the least-invasive order, and know when to stop and contact AWS Support.