-
Notifications
You must be signed in to change notification settings - Fork 131
Test to verify numa balancing by verifying numa_pte_updates and numa_hint_faults #3061
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
base: master
Are you sure you want to change the base?
Test to verify numa balancing by verifying numa_pte_updates and numa_hint_faults #3061
Conversation
…hint_faults Test enables and disables numa_balancing by writing to /proc/sys/kernel/numa_balancing and verifies numa_pte_updates and numa_hint_faults Signed-off-by: Pavithra <[email protected]>
memory/autonuma.py
Outdated
| """ | ||
| cmd = 'cat /proc/vmstat | grep numa_pte_updates' | ||
| output = process.system_output(cmd, shell=True) | ||
| return(int(str(output).split()[1].strip('\''))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Pavithra1602 I think better to use [-1] and why strip(''')? we have only space character i feel
# cat /proc/vmstat | grep numa_pte_updates
numa_pte_updates 94736
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am getting an extra ' if we are not using strip()
[stdout] b'numa_pte_updates 3978'
[stdout]
[stdout] 3978'
memory/autonuma.py
Outdated
| """ | ||
| cmd = 'cat /proc/vmstat | grep numa_hint_faults | head -1' | ||
| output = process.system_output(cmd, shell=True) | ||
| return(int(str(output).split()[1].strip('\''))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here, better use split()[-1]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here getting an extra ' if strip is not used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you give a try if .decode() or .stdout_text can help here?
like below
output = process.run(cmd, ignore_status=True, sudo=True, shell=True).stdout_text
or
out = process.run(cmd, ignore_status=True, sudo=True, shell=True).decode()
memory/autonuma.py
Outdated
| if not smm.check_installed(packages) and not smm.install(packages): | ||
| self.cancel('%s is needed for the test to be run' % packages) | ||
|
|
||
| self.url = 'https://sourceforge.net/projects/ebizzy/files/ebizzy/0.3/ebizzy-0.3.tar.gz' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Pavithra1602 can you please move this as yaml parameter?
memory/autonuma.py
Outdated
| This test case runs downloading, extracting, and running the autonuma-benchmark tests, | ||
| Test results need to be verified manually. | ||
| """ | ||
| url_autonuma = 'https://github.com/pholasek/autonuma-benchmark/archive/refs/heads/master.zip' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Pavithra1602 move this to yaml please
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure sending an updated patch
| self.sourcedir = os.path.join(self.workdir, "autonuma-benchmark-master") | ||
| os.chdir(self.sourcedir) | ||
| process.system_output('./start_bench.sh -A', shell=True, ignore_status=True) | ||
| self.log.warn("Have run the tests please review the results in debug.log") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why log.warn?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test just runs the bench mark test, need to analyse the values manually, so adding warn else we may miss analyzing the output values.
…hint_faults v2 Test enables and disables numa_balancing by writing to /proc/sys/kernel/numa_balancing and verifies numa_pte_updates and numa_hint_faults Signed-off-by: Pavithra <[email protected]>
Test enables and disables numa_balancing by writing to /proc/sys/kernel/numa_balancing and verifies numa_pte_updates and numa_hint_faults