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

Add call points of the new metrics #18351

Merged
merged 7 commits into from
Nov 13, 2023
Merged

Conversation

Kai-Zhang
Copy link
Contributor

What changes are proposed in this pull request?

Add call points of the new metrics

Why are the changes needed?

The new metrics are already defined in the previous pr, and need to be called in this pr.

Does this PR introduce any user facing changes?

no

@Kai-Zhang Kai-Zhang added the type-feature This issue is a feature request label Nov 1, 2023
Comment on lines 153 to 141
public static void setCacheStorageSupplier(DoubleSupplier supplier) {
sCacheStorageSupplier = supplier;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

allow clearing this static reference when the page meta store is closed. Otherwise, it cannot be GCed because the metrics system is holding a strong reference to it. Typically the meta store can hold up to several million PageInfo objects which consumes a considerable amount of memory.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds good. where do you suggest adding the clearing?

@@ -130,6 +131,7 @@ public static CacheManager create(AlluxioConfiguration conf,
if (isNettyDataTransmissionEnable) {
options.setIsAsyncWriteEnabled(false);
}
MultiDimensionalMetricsSystem.setCacheStorageSupplier(pageMetaStore::bytes);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the reference to page meta store is captured here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes. and i tracked the call stack, the PageMetaStore will be put in a LocalCacheFileSystem, which is kept in the FileSystem.Factory.FILESYSTEM_CACHE as a singleton. so i'm not sure if it's necessary to release the reference. after all the singleton will live until the process exits.

@@ -107,6 +108,7 @@ public long append(ByteBuf buf) throws IOException {
bytesWritten += bytesLeftInPage;
}

MultiDimensionalMetricsSystem.UFS_DATA_ACCESS.labelValues("write").observe(bytesWritten);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not UFS_DATA_ACCESS since PagedFileWriter only writes into the worker's storage. Should be CACHED_DATA_WRITE.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my bad. i tracked the ufs parameter and lost in the wrong place.

Copy link
Contributor

@dbw9580 dbw9580 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@Kai-Zhang
Copy link
Contributor Author

alluxio-bot, merge this please

@alluxio-bot alluxio-bot merged commit 08547a5 into Alluxio:main Nov 13, 2023
14 checks passed
ssz1997 pushed a commit to ssz1997/alluxio that referenced this pull request Dec 15, 2023
### What changes are proposed in this pull request?
Add call points of the new metrics

### Why are the changes needed?
The new metrics are already defined in the previous pr, and need to be called in this pr.

### Does this PR introduce any user facing changes?
no

			pr-link: Alluxio#18351
			change-id: cid-1b35a87f41a1f836005c368881378329f4c77b25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-feature This issue is a feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants