Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

SQL Server Agent Powershell Subsystem with only 2 worker threads Expand / Collapse
Author
Message
Posted Wednesday, February 1, 2012 6:56 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Tuesday, March 18, 2014 4:41 AM
Points: 288, Visits: 301
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?
Post #1245048
Posted Wednesday, February 1, 2012 8:09 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Monday, August 18, 2014 3:04 AM
Points: 1,331, Visits: 15,269
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.
Post #1245086
Posted Wednesday, November 7, 2012 4:56 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, September 4, 2014 11:01 AM
Points: 8, Visits: 314
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?
Post #1382217
Posted Monday, November 19, 2012 3:01 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, September 18, 2014 2:52 PM
Points: 2, Visits: 229
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.
Post #1386591
Posted Saturday, May 3, 2014 4:46 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: 2 days ago @ 11:52 PM
Points: 26, Visits: 161
Hi Thanks for your feedback. On this i am having similar issue and i am trying change the CmdExec Worker thread value , but after restarting the SQL Agent the value is rolling back. As you said this CmdExec is multiplies of CPU. Can you please let me know what is digit we need multiply for this subsystem? do we have any documentation on this from MS?

Thanks for your reply in advance.

Regards,
Thulasi.
Post #1567251
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse