AppFabric コマンドレットを使用したスロットルの構成
このトピックでは、AppFabric コマンドレットを使用してスロットル パラメーターの値を取得または設定する方法について説明します。
ヒント
AppFabric コマンドレットを対話形式で実行するには、Microsoft AppFabric 1.1 for Windows Server 用の Windows PowerShell コンソールを使用し、コマンドレットを入力して Enter キーを押します。AppFabric コマンドレットの実行に関する全般的な情報については、「AppFabric コマンドレットの実行」を参照してください。
コマンドレットを使用してスロットル設定を取得するには
AppFabric Windows PowerShell コンソールで、Get-ASAppServiceThrottling コマンドレットを実行して、スロットル パラメーターの値を取得します。このコマンドレットは、スコープ パラメーターによって指定されたスコープに関連付けられた構成ファイルから、serviceThrottling 要素の maxConcurrentCalls、maxConcurrentSessions、および maxConcurrentInstances 属性の値を取得します。
以下に、このコマンドレットで使用できる各種構文の一覧を示します。スコープ パラメーター (-SiteName、-VirtualPath、-Uri など) の詳細については、「コマンドレットのスコープ」を参照してください。パイプ パラメーター (ApplicationInfo および ServiceInfo) の詳細については「コマンドレット パイプ」を参照してください。
Get-ASAppServiceThrottling コマンドレットの構文オプション
// to get throttling settings at the root level
Get-ASAppServiceThrottling -Root
//sample output from the command
MaxConcurrentCalls : 16
MaxConcurrentInstances : 26
MaxConcurrentSessions : 10
IsLocal : True
BehaviorName :
// to get throttling settings at the site level
Get-ASAppServiceThrottling [-SiteName] <String>
// to get throttling settings at an application or a service level that the virtual path points to
Get-ASAppServiceThrottling [-SiteName] <String> [-VirtualPath] <String>]
// to get throttling settings at a site, application, or service level that an URI points to
Get-ASAppServiceThrottling [-Uri] <Uri>
// to get throttling settings at an application level specified by the ApplicationObject; used mainly in piping scenarios
Get-ASAppServiceThrottling -ApplicationObject
Ex: Get-Application <use scope parameters SiteName or Uri to resolve to a Web site> | Get-ASAppServiceThrottling
// to get throttling settings at a service level specified by the ServiceObject; used mainly in piping scenarios
Get-ASAppServiceThrottling -ServiceObject
Ex: Get-ApplicationService <use scope parameters VirtualPath or Uri to resolve to an application> | Get-ASAppServiceThrottling
コマンドレットを使用してスロットル設定を設定するには
AppFabric Windows PowerShell コンソールで、Set-ASAppServiceThrottling コマンドレットを実行して、スロットル パラメーターの値を設定します。このコマンドレットは、スコープ パラメーターによって指定されたスコープに関連付けられた構成ファイル内の serviceThrottling 要素の maxConcurrentCalls、maxConcurrentSessions、および maxConcurrentInstances 属性の値を設定します。serviceThrottling 要素が存在しない場合は、このコマンドレットにより要素が作成され、値が設定されます。
このトピックの最後に定義されているスコープ パラメーターおよびパイプ パラメーターを使用することができます。また、このコマンドレットで以下のスロットル パラメーターを使用することにより、指定したスコープに関連付けられた構成ファイル内の serviceThrottling 要素の maxConcurrentCalls、maxConcurrentSessions、および maxConcurrentInstances 属性の値を設定できます。渡す必要があるのは、変更したいパラメーターだけです。たとえば、同時呼び出しの最大数パラメーターの値を変更したい場合は、適切な値を設定した MaxConcurrentCalls パラメーターを渡します。
スロットル パラメーター
項目 |
[説明] |
MaxConcurrentCalls |
サービス ホストが一度に処理できるメッセージ数の上限を指定します。処理中の呼び出し数がこの値に達した場合、アクティブな呼び出しの 1 つが完了するまで、新しい呼び出しはキューに格納されます。このパラメーターに許容される値の範囲は、0 ~ Int32.MaxValue です。このパラメーターを 0 に設定することと、Int32.MaxValue に設定することは同じです。 |
MaxConcurrentInstances |
サービス ホストが一度に実行できるインスタンス数の上限を指定します。実行中のインスタンス数がこの値に達した場合、追加インスタンスの作成要求はキューに格納され、実行中のインスタンスの 1 つが完了したときに、この要求が実行されます。このパラメーターに許容される値の範囲は、1 ~ Int32.MaxValue です。 |
MaxConcurrentSessions |
サービス ホストが受け入れ可能なセッション数の上限を指定します。サービス ホストはこの上限を超えた接続を受け入れますが、アクティブなチャネル (メッセージが読み取られるチャネル) 数は上限以下です。このパラメーターに許容される値の範囲は、0 ~ Int32.MaxValue です。この値を 0 に設定することと、Int32.MaxValue に設定することは同じです。 |
スコープ パラメーター (-SiteName、-VirtualPath、-Uri など) の詳細については、「コマンドレットのスコープ」を参照してください。パイプ パラメーター (ApplicationInfo および ServiceInfo) の詳細については「コマンドレット パイプ」を参照してください。
Set-ASAppServiceThrottling コマンドレットの構文オプション
// to set throttling settings at the root level
Set-ASAppServiceThrottling -Root -MaxConcurrentCalls <Int32> -MaxConcurrentInstances <Int32> -MaxConcurrentSessions <Int32>
// to set throttling settings at the Web site level
Set-ASAppServiceThrottling -SiteName <String> -MaxConcurrentCalls <Int32> -MaxConcurrentInstances <Int32> -MaxConcurrentSessions <Int32>
// to set throttling settings at application or service level that the virtual path points to
Set-ASAppServiceThrottling -SiteName <String> -VirtualPath <String> -MaxConcurrentCalls <Int32> -MaxConcurrentInstances <Int32> -MaxConcurrentSessions <Int32>
// to set throttling settings at a site, application, or service level that an URI points to
Set-ASAppServiceThrottling -Uri <Uri> -MaxConcurrentCalls <Int32> -MaxConcurrentInstances <Int32> -MaxConcurrentSessions <Int32>
// to get throttling settings at an application level specified by the ApplicationObject; used mainly in piping scenarios
Set-ASAppServiceThrottling -ApplicationObject <ApplicationInfo> -MaxConcurrentCalls <Int32> -MaxConcurrentInstances <Int32> -MaxConcurrentSessions <Int32>
// Ex: Get-ASApplication <use scope parameters SiteName or Uri to resolve to a Web site> | Set-ASAppServiceThrottling -MaxConcurrentCalls 20 -MaxConcurrentInstances 30 -MaxConcurrentSessions 15
// to set throttling settings at a service level specified by the ServiceObject; used mainly in piping scenarios
Set-ASAppServiceThrottling -ServiceObject <ServiceInfo> -MaxConcurrentCalls <Int32> -MaxConcurrentInstances <Int32> -MaxConcurrentSessions <Int32>
// Ex: Get-ASApplicationService <use scope parameters SiteName or Uri to resolve to an application> | Set-ASAppServiceThrottling -MaxConcurrentCalls 20 -MaxConcurrentInstances 30 -MaxConcurrentSessions 15
2012-03-05