Skip to content

[ADH-8124] Add S3 Gateway ozone objects cache#10

Open
tigrulya-exe wants to merge 1 commit into2.2.0-developfrom
feature/ADH-8124-2.2.0
Open

[ADH-8124] Add S3 Gateway ozone objects cache#10
tigrulya-exe wants to merge 1 commit into2.2.0-developfrom
feature/ADH-8124-2.2.0

Conversation

@tigrulya-exe
Copy link
Copy Markdown
Member

Added caching OM client for S3 gateway component. Currently, it caches metadata for S3 volume, buckets, keys (both regular and extended versions) in local per-user Caffeine caches. Cache entries are evicted on corresponding write operations (delete, rename) or by TTL.

Related options:

Key Description Default Value
ozone.s3g.object.cache.enabled Enable or disable the S3Gateway object cache. false
ozone.s3g.object.cache.metrics.enabled Enable or disable metrics for the S3Gateway object cache. true
ozone.s3g.object.cache.volume.size Maximum number of entries in the S3Gateway volume cache. 10
ozone.s3g.object.cache.volume.ttl.ms TTL in milliseconds for entries in the S3Gateway volume cache. 3000
ozone.s3g.object.cache.bucket.size Maximum number of entries in the S3Gateway bucket cache. 100
ozone.s3g.object.cache.bucket.ttl.ms TTL in milliseconds for entries in the S3Gateway bucket cache. 3000
ozone.s3g.object.cache.key.size Maximum number of entries in the S3Gateway key cache. 1000
ozone.s3g.object.cache.key.ttl.ms TTL in milliseconds for entries in the S3Gateway key cache. 3000

Also a Hadoop Metrics2 source is added to collect and publish the following statistics for all S3 object caches (s3VolumeCache, s3BucketCache, s3HeadKeyCache, s3KeyInfoCache):

Name Description
hitCount Cache hit count
hitRate Cache hit rate
missCount Cache miss count
loadSuccessCount Successful cache loads
loadFailureCount Failed cache loads
loadFailureRate Failed cache loads rate
evictionCount Cache eviction count
averageLoadPenalty Average load penalty (ns)

Example of metrics if Prometheus MetricsSink is used:

# TYPE s3_object_cache_metrics_miss_count gauge
s3_object_cache_metrics_miss_count{cachename="s3BucketCache",hostname="0dfbab4b336f"} 27
s3_object_cache_metrics_miss_count{cachename="s3HeadKeyCache",hostname="0dfbab4b336f"} 10
s3_object_cache_metrics_miss_count{cachename="s3KeyInfoCache",hostname="0dfbab4b336f"} 5
s3_object_cache_metrics_miss_count{cachename="s3VolumeCache",hostname="0dfbab4b336f"} 30

@tigrulya-exe tigrulya-exe force-pushed the feature/ADH-8124-2.2.0 branch from f306dde to f844ae5 Compare April 30, 2026 21:16
Sign up for free to 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.

1 participant