Skip to content
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

[CELEBORN-1640] NettyMemoryMetrics supports numHeapArenas, numDirectArenas, tinyCacheSize, smallCacheSize, normalCacheSize, numThreadLocalCaches and chunkSize #2802

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

SteNicholas
Copy link
Member

@SteNicholas SteNicholas commented Oct 10, 2024

What changes were proposed in this pull request?

NettyMemoryMetrics supports numHeapArenas, numDirectArenas, tinyCacheSize, smallCacheSize, normalCacheSize, numThreadLocalCaches and chunkSize from PooledByteBufAllocatorMetric. Meanwhile, remove server_ prefix from metric name of netty memory metric in monitoring.md.

Why are the changes needed?

PooledByteBufAllocatorMetric provides the following API to support netty memory metrics:

public int numHeapArenas() {
  return this.allocator.numHeapArenas();
}

public int numDirectArenas() {
  return this.allocator.numDirectArenas();
}

public List<PoolArenaMetric> heapArenas() {
  return this.allocator.heapArenas();
}

public List<PoolArenaMetric> directArenas() {
  return this.allocator.directArenas();
}

public int numThreadLocalCaches() {
  return this.allocator.numThreadLocalCaches();
}

public int tinyCacheSize() {
  return this.allocator.tinyCacheSize();
}

public int smallCacheSize() {
  return this.allocator.smallCacheSize();
}

public int normalCacheSize() {
  return this.allocator.normalCacheSize();
}

public int chunkSize() {
  return this.allocator.chunkSize();
}

public long usedHeapMemory() {
  return this.allocator.usedHeapMemory();
}

public long usedDirectMemory() {
  return this.allocator.usedDirectMemory();
}

NettyMemoryMetrics only supports usedHeapMemory and usedDirectMemory, which could support numHeapArenas, numDirectArenas, tinyCacheSize, smallCacheSize, normalCacheSize, numThreadLocalCaches and chunkSize from PooledByteBufAllocatorMetric.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Celeborn Grafana Dashboard

…renas, tinyCacheSize, smallCacheSize, normalCacheSize, numThreadLocalCaches and chunkSize
@SteNicholas
Copy link
Member Author

SteNicholas commented Oct 10, 2024

Ping @FMX, @RexXiong.

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