17 Configuring Partition Work Managers
Partition Work Managers set thread usage policy among partitions. You can configure them to limit the number of Work Manager threads in each partition, as well as to manage thread usage allocation based on thread usage time for each partition. The importance of regulating the relative thread usage is to provide proper quality of service (QoS) and fairness among various partitions that share the same WebLogic Server instance. Without it, an application from one partition could starve thread resources from other partitions preventing them from functioning properly.
Note:
WebLogic Server Multitenant domain partitions, resource groups, resource group templates, virtual targets, and Resource Consumption Management are deprecated in WebLogic Server 12.2.1.4.0 and will be removed in the next release.This chapter includes the following sections:
Partition Work Managers: Overview
Partition Work Managers provide resource management within partitions.
Administrators know about the runtime environment and how it will be shared. They configure Partition Work Managers at the domain level and assign them to partitions as they are created. These predefined Partition Work Managers let administrators standardize Work Manager configuration; for example, all partitions with business-critical applications can reference the business-critical Partition Work Manager.
Administrators might also want to customize the Partition Work Manager for a specific partition, or maybe for every partition. In this scenario, they configure the Partition Work Manager within (embedded in) the partition configuration. There is no need to predefine Partition Work Manager configurations for this use case.
You can define a Partition Work Manager in the domain to use with multiple domain partitions, or you can define Partition Work Manager attributes in the domain partition itself for use in that partition only. If no Partition Work Managers are defined, then default values for Partition Work Manager settings are applied.
Partition Work Managers can be used in more than one domain partition. However, a domain partition can be associated with only one Partition Work Manager.
A partition configuration can include one of the following:
-
<partition-work-manager-ref>
to refer to a Partition Work Manager that is configured at the domain level -
<partition-work-manager>
to embed the Partition Work Manager settings within the partition configuration -
Neither
<partition-work-mananger>
nor<partition-work-manager-ref>
to apply the default values for Partition Work Manager settings
Configuring Partition Work Managers: Main Steps
Partition Work Managers define a set of policies that limits the usage of threads by Work Managers in partitions only. They do not apply to the domain. Follow these main steps for configuring a Partition Work Manager.
Defining Partition Work Managers: WLST Example
These sample scripts show how to define Partition Work Managers using WLST.
You can define Partition Work Managers by either configuring a domain-level Partition Work Manager and then associating it with a partition, or defining Partition Work Manager attributes in a domain partition, for use in that partition only.
Configuring Domain-Level Partition Work Managers: WLST Example
The following example creates and configures the domain-level Partition Work Manager, myPartitionWorkManager
.
# Creates a Partition Work Manager at the domain level edit() startEdit() cd('/') cmo.createPartitionWorkManager('myPartitionWorkManager') activate() # Configures the Partition Work Manager startEdit() cd('/PartitionWorkManagers/myPartitionWorkManager') cmo.setSharedCapacityPercent(50) cmo.setFairShare(50) cmo.setMinThreadsConstraintCap(0) cmo.setMaxThreadsConstraint(-1) activate()
Associating Partition Work Managers with Partitions: WLST Example
Partition Work Managers can be used in more than one domain partition. However, a domain partition can be associated with only one Partition Work Manager. The following example associates the domain-level Partition Work Manager, myPartitionWorkManager
with the partition, Partition-0
:
# Associate a domain-level Partition Work Manager with a partition. edit() startEdit() cd('/Partitions/Partition-0') cmo.destroyPartitionWorkManager(None) cmo.setPartitionWorkManagerRef(getMBean('/PartitionWorkManagers/myPartitionWorkManager')) activate()
Defining Partition Work Manager Attributes in a Partition: WLST Example
The following example defines Partition Work Manager attributes in the domain partition, Partition-1
, for use in that partition only:
# Defines Partition Work Manager attributes within the partition edit() startEdit() cd('/Partitions/Partition-1') cmo.createPartitionWorkManager('Partition-1-PartitionWorkManager') cd('/Partitions/Partition-1/PartitionWorkManager/Partition-1-PartitionWorkManager') cmo.setSharedCapacityPercent(50) cmo.setFairShare(50) cmo.setMinThreadsConstraintCap(0) cmo.setMaxThreadsConstraint(-1) activate()
In the config.xml
file, notice the Partition Work Manager element defined in Partition-0
and Partition-1
:
<partition> <name>Partition-0</name> <resource-group> <name>default</name> </resource-group> <default-target>VirtualTarget-0</default-target> <available-target>VirtualTarget-0</available-target> <realm>myrealm</realm> <partition-id>318e0d69-a71a-4fa6-bd7e-3d64b85ec2ed</partition-id> <system-file-system> <root>C:\Oracle\Middleware\Oracle_Home\user_projects\domains\base_domain/partitions/Partition-0/system</root> <create-on-demand>true</create-on-demand> <preserved>true</preserved> </system-file-system> <partition-work-manager-ref>myPartitionWorkManager</partition-work-manager-ref> </partition> <partition> <name>Partition-1</name> <resource-group> <name>default</name> </resource-group> <default-target>VirtualTarget-1</default-target> <available-target>VirtualTarget-1</available-target> <realm>myrealm</realm> <partition-id>8b7f6bf7-5440-4edf-819f-3674c630e3f1</partition-id> <system-file-system> <root>C:\Oracle\Middleware\Oracle_Home\user_projects\domains\base_domain/partitions/Partition-1/system</root> <create-on-demand>true</create-on-demand> <preserved>true</preserved> </system-file-system> <partition-work-manager> <name>Partition-1-PartitionWorkManager</name> <shared-capacity-percent>50</shared-capacity-percent> <fair-share>50</fair-share> <min-threads-constraint-cap>0</min-threads-constraint-cap> <max-threads-constraint>-1</max-threads-constraint> </partition-work-manager> </partition> <partition-work-manager> <name>myPartitionWorkManager</name> <shared-capacity-percent>50</shared-capacity-percent> <fair-share>50</fair-share> <min-threads-constraint-cap>0</min-threads-constraint-cap> <max-threads-constraint>-1</max-threads-constraint> </partition-work-manager> </domain>
Configuring Partition Work Managers: Related Tasks and Links
The referenced information provides steps for configuring Partition Work Managers using Oracle Enterprise Manager Fusion Middleware Control (FMWC) and the Oracle WebLogic Server Administration Console.
-
WebLogic Server Partition Work Managers in Administering Oracle WebLogic Server with Fusion Middleware Control
-
Partition Work Managers in Oracle WebLogic Server Administration Console Online Help