Resource Consumption Management in WebLogic Server MultiTenant 12.2.1 to Control Resource U...

来源:转载

[This blog post is part of a series of posts that introduce you to new features in the recentlyannouncedOracle WebLogic Server 12.2.1, and introduces an exciting performance isolation feature that is part of it.]

With the increasing push to "doing more with less" in the enterprise, system administrators and deployers are constantly looking to increase density and improve hardware utilization for their enterprise deployments. The support for micro-containers/pluggableDomain Partitions in WebLogic Server Multitenant helps system administrators collocate their existing silo-ed business critical Java EE deployments into a single Mutitenant domain.

Say, a system administrator creates two Partitions " Red " and " Blue " in a shared JVM (a WebLogic Multitenant Server instance), and deploys Java EE applications and resources to them. A system administrator would like to avoid the situation where one partition's applications (say the " Blue " partition) "hogs" all shared resources in the Server instance's JVM (Heap)/the operating system (CPU, File descriptors), and negatively affecting the " Red " partition applications' access to these resources.

Runtime Isolation

Therefore, while consolidating existing enterprise workloads into a single Multitenant Server instance, system administrators would require better control (track, manage, monitor, control) over usage of shared resources by collocated Domain Partitions so that:

One Partition doesn't consume all available resources, and exhaust them from other collocated partitions. This helps a system administrator plan for, and support consistent performance to all collocated partitions. Fair and effecient allocation of available resources are provided to collocated partitions. This helps a system administrator confidently place complementary workloads in the same environment, while achieving enhanced density and great cost-savings. Control Resource Consumption Management Resources

In Fusion Middleware 12.2.1, Oracle WebLogic Server Multitenant supports establishing resource management policies on the following resources

Heap Retained : Track and control the amount of Heap retained by a Partition CPU Utilization : Track and control the amount of CPU utilization used by a Partition Open File Descriptors : Track and control the amount of open file descriptors (due to File I/O, Sockets etc) used by a Partition. Recourse Actions

When a trigger is breached, a system administrator may want to react to that by automatically taking certain recourse actions in response. The following actions are available out of the box with WebLogic.

Notify : inform administrator that a threshold has been surpassed Slow : reduce partition’s ability to consume resources, predominantly through manipulation of work manager settings – should cause system to self-correct in certain situations Fail : reject requests for the resource, i.e. throw an exception - only supported for file descriptors today Stop : As an extreme step, initiate the shut down sequence for the offending partition on the current server instance Policies

The Resource Consumption Management feature in Oracle WebLogic Server Multitenant, enables a system administrator to specify resource consumption management policies on resources, and direct WebLogic to automatically take specific recourse actions when the policies are violated. A policy could either be created as one of the following two types

Trigger : This is useful when resource usage by Partitions are predictable and takes the form "when a resource's usage by a Partition crosses a Threshold, take a recourse action".

For example, a sample resource consumption policy that a system administrator may establish on a " Blue " Partition to ensure that it doesn't run away with all the Heap looks like: When the “ Retained Heap ” (Resource) usage for the “ Blue ” (Partition) crosses “2 GB ” (Trigger), “ stop ” (Action) the partition.

Fair share : Similar to the Work Manager fair share policy in WebLogic, this policy allows a system administrator to specify "shares" of a bounded-size shared resource to a Partition. WebLogic then ensures that this resource is shared effectively (yet fairly) by competing consumers while honouring the "shares" allocated by the system administrator.

For example, a sample resource consumption policy that a system administrator who prefers " Red " partition over " Blue " may set the fair-share for the " CPU Utilization " resource in the ration 60:40 in favour of " Red ".

When complementary workloads are deployed to collocated partitions, fair-share policies also helps achieving maximal utilization of resources. For instance, when there are no or limited requests for the " Blue " partition, the " Red " partition would be allowed to "steal" and use all the available CPU time. When traffic resumes on the " Blue " partition and there is contention for CPU, WebLogic would allocate CPU time as per the fair-share ratio set by the system administrator. This helps system administrators reuse a single shared infrastructure and saving infrastructure costs in turn, while still retaining control over how those resources are allocated to Partitions.

Policy configurations could be defined at the domain level and reused across multiple pluggable Partitions, or they can be defined unique to a Partition. Policy configurations are flexible to support different combinations of trigger-based and fair-share policies for multiple resources to meet your unique business requirements. Policies can also be dynamically reconfigured without any restart of the Partition required.

The picture below shows how a system administrator could configure two resource consumption management policies (a stricter " trial " policy and a lax " approved " policy) and how they could be assigned to individual Domain Partitions. Heap and CPU resource by the two domain Partitions are then governed by the policies associated with each of them.

Enabling Resource Management

The Resource Consumption Management feature in WebLogic Server 12.2.1 is built on top of the resource management support in Oracle JDK 8u40. WebLogic RCM requires Oracle JDK 8u40 and the G1 Garbage Collector. In WebLogic Server Multitenant, you would need to pass the following additional JVM arguments to enable Resource Management:

“-XX:+UnlockCommercialFeatures -XX:+ResourceManagement -XX:+UseG1GC” Track Resource Consumption

Resource consumption metrics are also available on a per partition basis, and is provided through a Monitoring MBean, PartitionResourceMetricsRuntimeMBean. Detailed usage metrics on a per partition basis is available through this monitoring Mbean, and system administrators may use these metrics for the purposes of tracking, sizing, analysis, monitoring, and for configuring business-specific Watch and Harvester WLDF rules.

Conclusion

Resource Consumption Managers in WebLogic MultiTenant helps provide the runtime isolation and protection needed for applications running in your shared and consolidated environments.

For More Information

This blog post only scratches the surface of the possibilities with the Resource Consumption Management feature. For more details on this feature, and how you can configure resource consumption management policies in a consolidated Multitenant domain using Weblogic Scripting Tool (WLST) and Fusion Middleware Control, and best practices, please refer the detailed technical document at "Resource Consumption Management (RCM) in Oracle WebLogic Server Multitenant (MT) - Flexibility and Control Over Resource Usage in Consolidated Environments" .

The Weblogic MultiTenant documentation's chapter "Configuring Resource Consumption Management" also has more details on using the feature.

This feature is a result of deep integration between the Oracle JDK and WebLogic Server. If you are attending Oracle OpenWorld 2015 in San Francisco , head over to the session titled "Multitenancy in Java: Innovation in the JDK and Oracle WebLogic Server 12.2.1" [CON8633] (Wednesday, Oct 28, 1:45 p.m. | Moscone South—302) to hear us talk about this feature in more detail.

We are also planning a series of videos on using the feature and we will update this blog entry as they become available.



分享给朋友:
您可能感兴趣的文章:
随机阅读: