|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Wednesday, January 23, 2013 8:57 AM
Points: 287,
Visits: 286
|
|
My Sql Server Agent can only run two powershell jobsteps at one time which apparently is caused by the max_worker_threads setting:
SELECT subsystem, max_worker_threads FROM msdb.dbo.syssubsystems
subsystem max_worker_threads TSQL 240 ActiveScripting 120 CmdExec 120 Snapshot 1200 LogReader 300 Distribution 1200 Merge 1200 QueueReader 1200 ANALYSISQUERY 1200 ANALYSISCOMMAND 1200 SSIS 1200 PowerShell 2
Why are so little PowerShell threads allowed compared to other subsystems? Is it save to set the value to say 10?
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Yesterday @ 6:28 AM
Points: 1,125,
Visits: 14,511
|
|
No reason why you cant increase it.
I've got it increased to 1/4 of my available cores on all servers. I dont expect to ever use that many but it allows more flexibility.
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Monday, May 13, 2013 3:18 PM
Points: 8,
Visits: 254
|
|
| I have been trying to change this in SQL 2012. Every time I change the value for PowerShell in the syssubsystems table when I restart the SQL agent it is set back to 2. SQL 2008R2 persisted this change. Anyone been able to change it in 2012?
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: 2 days ago @ 10:59 AM
Points: 2,
Visits: 153
|
|
I just noticed this 2008-2012 difference myself when looking at the max_worker_threads for the TSQL subsystem.
I think sp_verify_subsystems must run whenever SQL agent starts. In 2008, it only inserts into the syssubsystems table if there are entries missing, so your modifications persist across restarts. In 2012, it truncates the table and re-inserts every time!
All of the subsystems except Powershell are set to be multiples of the server's CPU count. The Powershell subsystem is hardcoded to 2, go figure.
|
|
|
|