Open philipandag opened 3 weeks ago
I have tried to make the jobs time-bound and to get the core count dynamically:
$numCores = (Get-CimInstance Win32_ComputerSystem).NumberOfLogicalProcessors
foreach ($loopnumber in 1..$numCores){
$end_time = (Get-Date).AddMinutes(60) # Parametrize stress length
Start-Job -ScriptBlock{
$result = 7
while ((Get-Date) -lt ($end_time)){
# Is this really the best operation to stress the system?
$result = $result * $result
}
}
}
Wait-Job *
Clear-Host
Receive-Job *
Remove-Job *
This script does not work as well. The core count is ok but the jobs still stop after a couple seconds.
Device
V560TND
RTE version
--
OSFV version
v560tne-v0.9.1-rc3-testing-fixes
Affected component(s) or functionality
CPF cpu frequency tests under load on Windows
Brief summary
The script is not run automatically, when run manually only uses 4 cores and ends early which is hardcoded
How reproducible
100% on this device and branch
How to reproduce
Run a test like CPF-004.004, check the CPU usage, check che stress-test-windows.ps1 script code
Expected behavior
The cpu should run at ~100% during the whole test
Actual behavior
The clock measurements don't start until the load ends. Then the cpu is running at ~1% usage. Running the script manually does stress the 4 hard-coded cores which results in ~25% usage on this device for about a minute. Even after increasing the hardcoded core count the cpu usage in task manager rises to at most ~60%.
Link to screenshots or logs
Additional context
Maybe there is some reliable tool we could use instead of writing a stress script
Solutions you've tried
Increasing number of workers and iterations, running the script manually