更改服务器配置设置

 

发布日期: 2016年7月

<_caps3a_sxs _xmlns3a_caps="https://schemas.microsoft.com/build/caps/2013/11"><_caps3a_sxstarget locale="zh-CN">执行以下步骤可使用 PowerShell 更改服务器配置设置。使用 Windows PowerShell 更改服务器配置设置打开 Workflow PowerShell 命令窗口。有关打开 Workflow PowerShell 窗口的说明,请参阅Configuring Workflow Manager 1.0 using PowerShell。结合以下参数执行 T:Microsoft.Workflow.Commands.Set-WFServiceConfiguration cmdlet:对于 P:Microsoft.Workflow.Commands.Set-WFServiceConfiguration.ServiceUri,请指定 Workflow Server 的 URI。 例如,https://myserver.mydomain.mycompany.com:12290。对于 P:Microsoft.Workflow.Commands.Set-WFServiceConfiguration.Name,请指定配置设置的名称(请参阅下面的有效设置列表)。对于 P:Microsoft.Workflow.Commands.Set-WFServiceConfiguration.Value,请指定新的配置值。如果更改任何配置设置的默认值,可能会影响在共享宿主环境中(或使用作为托管服务提供的产品的将来版本)运行解决方案的能力。有效服务器配置设置配置设置名称預設值说明ServiceBusMaxTopicSizeInMegabytes6144Workflow Manager 1.0 创建的 Service Bus 主题的大小。如果要限制每个Scope所使用的数据库存储,可能需要减此设置。如果要使用的范围包含数量非常多的工作流实例且/或包含非常大的工作流实例,可能需要增加此设置。此值应远远大于 ServiceBusTopicSizeQuotaInBytes 的值除以 1,048,576 所得出的值。ServiceBusTopicSizeQuotaInBytes5368709120如果基础 Service Bus 主题中没有留下足够的空间,则任何给定Scope内的工作流都可能无法取得进展。 为避免出现这种情况,Workflow Manager 1.0 使用由 ServiceBusTopicSizeQuotaInBytes 定义的阈值。 给定主题大小超过此阈值时,尝试对相应范围执行 PublishNotification 可能会引发异常。ServiceBusTopicSizeQuotaInBytes 的值应远远小于 ServiceBusTopicSizeQuotaInBytes 的值乘以 1,048,576 所得出的值才能提供足够的缓冲区。WorkflowServiceAllowUnsafeTypesFalse请参见Defining and using custom code activities and types in a Workflow Manager 1.0 workflow。WorkflowServiceMaxActivityXamlSizeInBytes5242880单个声明性活动的大小限制。要发布大于 5MB 的活动,你可能需要增加此限制。如果不希望用户发布大型活动,则可能需要减少此限制。 这可以减少内存占用量和数据库磁盘使用量。WorkflowServiceMaxAllocationsPerBatchKB102400工作流实例分配的内存的限制。 每次保留工作流时(例如,如果它等待消息或等待计时器超时),将重置该配额。如果工作流实例尝试分配的内存量大于此限制,将引发 InsufficentMemoryException。如果要允许任何活动分配更多内存,你可能需要增加此限制。 但是,这将影响可用于同时执行的其他工作流实例的内存。如果希望进一步限制工作流实例可以分配的内存量,可能需要减少此限制。 这可以减轻服务器上的内存压力。WorkflowServiceMaxHttpResponseTime0:01:00以 hours:minutes:seconds 形式表示的时间量,用于定义当工作流发出 Http 请求时的响应超时。如果工作流要将请求发送到在经过 1 分钟以上的时间后响应的终结点,你可能需要增加此限制。Workflow Manager 1.0 可以在每个服务器节点上并行处理固定数量的工作流实例(请参阅 WorkflowServiceMaxLoadedInstances)。 你可以将此视为每个服务器都有固定数量的工作流执行管道。 内存中加载的任何工作流实例(包括在配置的超时内等待 HTTP 响应的工作流实例)均使用这些管道之一。 因此,增加 WorkflowServiceMaxHttpResponseTime 可能会减少累积吞吐量,尤其是在许多工作流实例花费大量时间等待 HTTP 响应的情况下。WorkflowServiceMaxHttpRetryDelay5.00:00:00重新尝试从工作流实例发出的 Http 请求时,Workflow Manager 1.0 使用指数回退策略。 例如,第一次重试可能会额外延迟 2 秒(在默认延迟的基础之上),第二次重试可能会额外延迟 4 秒;第三次延迟可能会额外延迟 8 秒等等。 如果此算法不受限制,则最终将导致重试尝试之间的延迟很长。 使用 Workflow Manager 1.0 可以控制重试尝试之间的最长附加延迟。 这由 WorkflowServiceMaxHttpRetryDelay 配置设置表示。WorkflowServiceMaxHttpRetryTotalTime10.00:00:00此设置定义重试从工作流实例发出的不成功 HTTP 请求所花费的总时间量。WorkflowServiceMaxInstanceSizeKB5120保留的工作流实例允许的最大大小。如果要限制工作流实例使用的数据库存储,可能需要减少此设置。如果要支持非常大的工作流实例,可能需要增加此设置。WorkflowServiceMaxLoadedInstances50单个服务器节点上可以同时处理的并行工作流实例数。可以根据可用内存和计算能力以及所需吞吐量和工作流特征来调整此设置。WorkflowServiceMaxPendingIOPerInstance5在每个实例被冻结以使其他挂起的工作流实例有机会执行之前,该实例所获得的 I/O 操作配额。可以根据工作流的特征调整此设置。 例如,如果工作流实例往往很大并且发出许多简单 HTTP 请求,则加载这些实例以及随后再次加载它们的开销可能大于为其他工作流实例提供更多公平性的优点。 在这种情况下,可以增加此设置。WorkflowServiceMaxWorkflowXamlSizeInBytes52428800完整活动结束的合计大小限制,其中包括工作流使用的所有声明性活动。要启用很大的工作流,你可能需要增加此设置,但这可能影响内存使用量和性能。如果不希望用户发布超大型工作流,可能需要减少此限制。 减少此限制可以帮助减少内存占用量和数据库磁盘使用量。<_caps3a_sxssource locale="en-US">Follow these steps to change a server configuration setting using PowerShell.Changing Server Configuration Settings using Windows PowerShellOpen the Workflow PowerShell command window.For instructions on opening the Workflow PowerShell window, see Configuring Workflow Manager 1.0 using PowerShell.Execute the T:Microsoft.Workflow.Commands.Set-WFServiceConfiguration cmdlet with the following parameters:For P:Microsoft.Workflow.Commands.Set-WFServiceConfiguration.ServiceUri, specify the URI of the workflow server. For example, https://myserver.mydomain.mycompany.com:12290.For P:Microsoft.Workflow.Commands.Set-WFServiceConfiguration.Name, specify a name of the configuration setting (See below for the list of valid settings.)For P:Microsoft.Workflow.Commands.Set-WFServiceConfiguration.Value, specify the new configuration value.Changing the default value of any configuration setting may impact the ability to run your solution in a shared hosting environment, or with a future version of the product delivered as a managed service.Valid Server Configuration SettingsConfiguration Setting NameDefault ValueDescriptionServiceBusMaxTopicSizeInMegabytes6144The size of Service Bus topics created by Workflow Manager 1.0.You may want to reduce this setting if you want to limit the database storage used by each Scope.You may want to increase this setting if you want to have Scopes that contain very large number of workflow instances and/or very large workflow instances.This value should be significantly larger than the value of ServiceBusTopicSizeQuotaInBytes divided by 1,048,576.ServiceBusTopicSizeQuotaInBytes5368709120Workflows in any given Scope may be unable to make progress if there is not enough space left in the underlying Service Bus topic. To help prevent this, Workflow Manager 1.0 uses a threshold defined by ServiceBusTopicSizeQuotaInBytes. When a given topic size exceeds this threshold, attempts to PublishNotification to the corresponding Scope may throw an exception.The value of ServiceBusTopicSizeQuotaInBytes should be significantly smaller than the value of ServiceBusTopicSizeQuotaInBytes multiplied by 1,048,576 to provide sufficient buffer.WorkflowServiceAllowUnsafeTypesFalseSee Defining and using custom code activities and types in a Workflow Manager 1.0 workflow.WorkflowServiceMaxActivityXamlSizeInBytes5242880The size limit of a single declarative activity.You may want to increase this limit in order to publish an activity that is larger than 5MB.You may want to reduce this limit if you don’t want your users to publish large activities. This may reduce memory consumption and database disk usage.WorkflowServiceMaxAllocationsPerBatchKB102400The limit of the memory allocated by a workflow instance. The quota resets each time the workflow is persisted, for example, if it waits for a message or waits on a timer.An InsufficentMemoryException will be thrown if a workflow instance attempts to allocate more memory than this limit.You may want to increase this limit if you want to allow any activity to allocate more memory. However, this will impact the memory available to other workflow instances executing at the same time.You may want to reduce this limit if you want to further limit the amount of memory that workflow instances can allocate. This may reduce memory pressure on the server.WorkflowServiceMaxHttpResponseTime0:01:00The amount of time represented as hours:minutes:seconds that defines the response timeout when workflows make Http requests.You may want to increase this limit if workflows send requests to an endpoint that responds after more than 1 minute.Workflow Manager 1.0 can concurrently process a fixed number of workflow instances (see WorkflowServiceMaxLoadedInstances) on each server node. You can think about this as each server having a fixed number of workflow execution pipelines. Any workflow instance loaded in memory, including a workflow instance waiting for HTTP response within the configured timeout, uses one of these pipelines. Therefore, increasing WorkflowServiceMaxHttpResponseTime may reduce the cumulative throughput, especially if many workflow instances spend a lot of time waiting on HTTP response.WorkflowServiceMaxHttpRetryDelay5.00:00:00Workflow Manager 1.0 uses an exponential back-off policy when retrying Http requests made from workflows instances. For example, the first retry may be delayed by additional 2 seconds (on top of the default delay), the second retry may be delayed by an additional 4 seconds; the third retry may be delayed by additional 8 seconds and so on. If this algorithm were unbound it would eventually lead to very long delays between retry attempts.Workflow Manager 1.0 allows you to control the maximum additional delay between retry attempts. This is represented by the WorkflowServiceMaxHttpRetryDelay configuration setting.WorkflowServiceMaxHttpRetryTotalTime10.00:00:00This setting defines the total amount of time spent on retrying an unsuccessful HTTP request made from a workflow instance.WorkflowServiceMaxInstanceSizeKB5120The maximum allowed size for a persisted workflow instance.You may want to reduce this setting if you want to limit the database storage used by workflow instances.You may want to increase this setting if you want to support very large workflow instances.WorkflowServiceMaxLoadedInstances50The number of concurrent workflow instances that can be processed at the same time on a single server node.This setting may be adjusted depending on the available memory and computing power, as well as desired throughput and the characteristics of the workflows.WorkflowServiceMaxPendingIOPerInstance5The quota of I/O operations that each instance gets before it is hydrated to give a chance for other pending workflow instances to execute.This setting may be adjusted depending on the characteristics of the workflows. For example, if workflow instances tend to be large and make many simple HTTP requests, then the overhead of loading the instances and then reloading them may be larger than the benefit of providing more fairness to other workflow instances. In such a case, this setting can be increased.WorkflowServiceMaxWorkflowXamlSizeInBytes52428800The aggregate size limit of a full activity closure that includes all declarative activities used by a workflow.You may want to increase this limit in order to enable huge workflows, but this may have memory usage and performance implications.You may want to reduce this limit if you don’t want your users to publish huge workflows. Reducing this limit may help with reducing memory consumption and database disk usage.