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

2.1 prefetch metrics #892

Merged
merged 3 commits into from
Nov 30, 2022

Conversation

changweige
Copy link
Contributor

Record prefetch request average latency.
Calculate prefetch average bandwidth.

{
  "buffered_backend_size": 0,
  "data_all_ready": false,
  "entries_count": 0,
  "partial_hits": 2657,
  "prefetch_begin_time_millis": 892,
  "prefetch_begin_time_secs": 1669262928,
  "prefetch_cumulative_time_millis": 391525,
  "prefetch_data_amount": 350224384,
  "prefetch_end_time_millis": 601,
  "prefetch_end_time_secs": 1669262933,
  "prefetch_mr_count": 167,
  "prefetch_unmerged_chunks": 0,
  "prefetch_workers": 8,
  "store_path": "/var/lib/containerd-nydus/cache",
  "total": 2682,
  "underlying_files": [
    "18798c2c51ee3c0cb84f4e8dbfa3ac5b9116cfac315e3af08405363ea97a2ef7",
    "d6a08dd25b46d4701c0f3221f20160563fb4b5866b6f4c915a982914adfc00de",
    "3355a6911228a3502a61b1a53ce9265be17fb07934e6511fbcfdb83438e42de9",
    "948f80e95f4ab83ae5a202f987fee81f0c860f2e42d82689a758b57887678601",
    "9957fc0906f7b4b2b1e1fc4a7a6049380bb06d72ac6919e0c06e4134ae70941e",
    "004656def9b233af509fc65aa91b824071a2ed3c2ee7b1361866b9c06a403949"
  ],
  "whole_hits": 0
}

Signed-off-by: Changwei Ge <gechangwei@bytedance.com>
@@ -25,6 +25,8 @@ use crate::cache::{BlobCache, BlobIoRange};
use crate::factory::ASYNC_RUNTIME;
use crate::RAFS_MAX_CHUNK_SIZE;

static PREFETCH_BEGIN_TIMING: Once = Once::new();
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is a global variable, so it will only be executed once.
How about the case when prefetching multiple images?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for your review, it's a good catch. Already fixed it.

In addition, added some comments telling the meaning of the newly added metrics and how to leverage them to estimate prefetch performance.

Record prefech request average latency.
Calculate prefetch average bandwidth.

Signed-off-by: Changwei Ge <gechangwei@bytedance.com>
Signed-off-by: Changwei Ge <gechangwei@bytedance.com>
@changweige
Copy link
Contributor Author

/retest

@anolis-bot
Copy link
Collaborator

@changweige , the test job has been submitted. Please wait in patience. The test job url: https://tone.openanolis.cn/ws/nrh4nnio/test_result/35563

@anolis-bot
Copy link
Collaborator

@changweige , The CI test is completed, please check result:

Test CaseTest Result
nydus_ci❌ FAIL

Sorry, your test job failed. Please get the details in the link.

@jiangliu
Copy link
Collaborator

/retest

@anolis-bot
Copy link
Collaborator

@jiangliu , the test job has been submitted. Please wait in patience. The test job url: https://tone.openanolis.cn/ws/nrh4nnio/test_result/35685

@anolis-bot
Copy link
Collaborator

@jiangliu , The CI test is completed, please check result:

Test CaseTest Result
nydus_ci❌ FAIL

Sorry, your test job failed. Please get the details in the link.

@yqleng1987
Copy link
Contributor

/retest

@anolis-bot
Copy link
Collaborator

@yqleng1987 , the test job has been submitted. Please wait in patience. The test job url: https://tone.openanolis.cn/ws/nrh4nnio/test_result/35726

@anolis-bot
Copy link
Collaborator

@yqleng1987 , The CI test is completed, please check result:

Test CaseTest Result
merge-target-branch✅ SUCCESS
build-docker-image✅ SUCCESS
compile-nydus✅ SUCCESS
compile-ctr-remote✅ SUCCESS
compile-nydus-snapshotter✅ SUCCESS
start-nydus-snapshotter-config-containerd✅ SUCCESS
run-container-with-nydus-image✅ SUCCESS

Congratulations, your test job passed!

@jiangliu
Copy link
Collaborator

Please also open a PR for master

@jiangliu jiangliu merged commit 2eb90d9 into dragonflyoss:stable/v2.1 Nov 30, 2022
@changweige
Copy link
Contributor Author

Please also open a PR for master

Sure. :-)

@changweige changweige deleted the 2.1-prefetch-metrcis branch December 10, 2022 05:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants