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

[WIP] Estimate system requirement by using Intel perfspect for CI/CD and Documents #1492

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

Conversation

louie-tsai
Copy link
Collaborator

@louie-tsai louie-tsai commented Feb 4, 2025

Description

Integrate system requirement check with Intel PerfSpect Tool in CI/CD test scripts to get minimum system requirement for ChatQnA and then other samples as next step
https://github.com/intel/PerfSpect

Issues

n/a.

Type of change

List the type of change like below. Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds new functionality)
  • Breaking change (fix or feature that would break existing design and interface)
  • Others (enhancement, documentation, validation, etc.)

Dependencies

Intel PerfSpect

Tests

Copy link

github-actions bot commented Feb 4, 2025

Dependency Review

✅ No vulnerabilities or license issues found.

Scanned Files

@louie-tsai louie-tsai requested review from chensuyue and removed request for lvliang-intel and letonghan February 4, 2025 07:44
@louie-tsai louie-tsai changed the title Estimate system requirement by using Intel perfspect [WIP] Estimate system requirement by using Intel perfspect Feb 4, 2025
@louie-tsai louie-tsai marked this pull request as draft February 4, 2025 15:02
@louie-tsai louie-tsai changed the title [WIP] Estimate system requirement by using Intel perfspect [WIP] Estimate system requirement by using Intel perfspect for CI/CD and Documents Feb 4, 2025
@chensuyue
Copy link
Collaborator

Some comments for this feature:

  1. Max used memory trace after start_services collect the service up memory, but it's not including the service execution memory. I mean when the service run a real case more memory is required. And it's based on the inputs. To get the real memory usage, maybe we should start a parallel process to monitor the memory usage while execute a stress test.
  2. Both memory and disk trace in this way required a premise, the CI machine runs single case once at a time. But now CI use the same machine for several projects (GenAIExamples/GenAIComps/...). Some test may trigger parallel in one machine, I think in this case the data is not correct anymore. So I don't suggest to open this test directly in the CI. Maybe we can have an option to open this feature, and by default it's closed. When we open it, we should make sure the machine is exclusive, so we can get the correct data.

# get used disk
list="$(./perfspect/perfspect report --filesystem 2>&1)"
list=$( for i in ` echo $list `; do [[ $i =~ json ]] && echo $i ; done )
used_disk_before="$(python parse_perfspect.py $list 2>&1)"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Line 181 to line 186 could be part of parse_perfspect.py, since it's common used for all examples.

if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
start_time=$(date +%s)
start_services
end_time=$(date +%s)
duration=$((end_time-start_time))
echo "Mega service start duration is $duration s" && sleep 1s

# trace max used memory
list="$(./perfspect/perfspect telemetry --duration 10 2>&1)"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Line 196 to line 198 could be part of parse_perfspect.py, since it's common used for all examples.

# get used disk
list="$(./perfspect/perfspect report --filesystem 2>&1)"
list=$( for i in ` echo $list `; do [[ $i =~ json ]] && echo $i ; done )
used_disk_after="$(python parse_perfspect.py $list 2>&1)"
Copy link
Collaborator

Choose a reason for hiding this comment

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

The same here.

@@ -0,0 +1,47 @@
# Copyright (C) 2025 Intel Corporation
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 common used scripts, it's better to be in the first project level.

@@ -193,6 +206,16 @@ function main() {
# validate_frontend
Copy link
Collaborator

Choose a reason for hiding this comment

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

We can use another megaservice_stress test to record the memory usage, which can cover the max running memory I mentioned. We can have a mode=perfspect for this condition.

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.

2 participants