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

v1.7.3.0 is extremely slow #116

Closed
codykonior opened this issue Nov 11, 2016 · 7 comments
Closed

v1.7.3.0 is extremely slow #116

codykonior opened this issue Nov 11, 2016 · 7 comments

Comments

@codykonior
Copy link
Contributor

codykonior commented Nov 11, 2016

I hate to say it but although it has fixed the runspace issues, I've noticed some extremely odd slowdowns using 1.7.3.0 vs the previous 1.7.2.7.

$batch = [Guid]::NewGuid()

Measure-Command {
    1..100 | %{
        Write-Verbose "Starting $_"
        Start-RSJob -Batch $batch -ScriptBlock { "Hi $_" }
    }
}

On 1.7.2.7:

Days : 0
Hours : 0
Minutes : 0
Seconds : 1
Milliseconds : 179
Ticks : 11798296
TotalDays : 1.36554351851852E-05
TotalHours : 0.000327730444444444
TotalMinutes : 0.0196638266666667
TotalSeconds : 1.1798296
TotalMilliseconds : 1179.8296

On 1.7.3.0:

Days : 0
Hours : 0
Minutes : 0
Seconds : 16
Milliseconds : 547
Ticks : 165471210
TotalDays : 0.000191517604166667
TotalHours : 0.0045964225
TotalMinutes : 0.27578535
TotalSeconds : 16.547121
TotalMilliseconds : 16547.121

This doesn't seem like much at 1s vs 16s but on proper workloads (400 jobs, where the script blocks are doing real processing) a 2 minute overall run for all jobs to complete was reaching 20-30 minutes before I stopped it.

@codykonior
Copy link
Contributor Author

I've gone through back-porting differences between versions to try to find the cause. It's not caused by any of the other changes (like the Get-Variable change, etc). It solely resides in Start-RSJob.

@codykonior
Copy link
Contributor Author

Oh no, you've commented out the section which passes in Batch numbers.

@proxb
Copy link
Owner

proxb commented Nov 13, 2016

I do see a slow down between versions. I commented out the batch a while ago until I can solve the issue with using Modules/Functions while using the same runspacepool. If I can get that working properly, then I will put the use of Batch runspacepools back in.

@proxb proxb closed this as completed in b80bc8e Nov 13, 2016
@proxb proxb reopened this Nov 13, 2016
@proxb
Copy link
Owner

proxb commented Nov 13, 2016

@codykonior Try this version (1.7.3.1) and let me know how it works.

@codykonior
Copy link
Contributor Author

I really depend on the -Batch functionality so I can't upgrade at this point.

@proxb
Copy link
Owner

proxb commented Nov 15, 2016

@codykonior Batch functionality was restored in this version.

@codykonior
Copy link
Contributor Author

codykonior commented Nov 16, 2016

Thumbs up, the current version you have checked in seems to be working (no random runspace errors, and the usual great performance with batches).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants