WebLogic Server Work Managers and Overload Protection
Upcoming SlideShare
Loading in...5

Like this? Share it with your network


WebLogic Server Work Managers and Overload Protection



A tour of the WebLogic Server work manager and self-tuning thread pool features that automatically adjust to changing workloads and protect the server from overload conditions.

A tour of the WebLogic Server work manager and self-tuning thread pool features that automatically adjust to changing workloads and protect the server from overload conditions.



Total Views
Views on SlideShare
Embed Views



21 Embeds 2,515

http://www-ig-opensocial.googleusercontent.com 1216
http://www.iamjambay.com 493
http://blogs.oracle.com 476
http://orablogs-jp.blogspot.com 116
http://orablogs-jp.blogspot.jp 61
http://feeds.feedburner.com 54
url_unknown 49
http://paper.li 15
http://www.slideshare.net 8
http://prsync.com 7
http://webcache.googleusercontent.com 4
http://twitter.com 3
http://jmmiddleware.wordpress.com 3
http://www.docshut.com 2
http://rscat.com 2
http://www.hanrss.com 1
http://orablogs-jp.blogspot.com.au 1
http://translate.googleusercontent.com 1
http://translate.google.com 1
http://orablogs-jp.blogspot.co.uk 1
http://www.javaoracleblog.com 1



Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment
  • So in this example, if another fair share was assigned a value of 20, the ration would be 80:20 or 4:1. This means that if each application has the same amount of requests coming in and there are not enough threads to server all requests immediately, then high-fair share work manager will get 4x as many requests serviced as the low-priority work manager.

WebLogic Server Work Managers and Overload Protection Presentation Transcript

  • 1.
  • 2. WebLogic Server Work Managers
    James Bayer
    WebLogic Server Product Management
  • 3. Agenda
    WebLogic Server Work Manager Overview
    Feature Demonstration
  • 4. <Insert Picture Here>
    WLS Work Manager
  • 5. Real World Overload Protection
  • 6. WebLogic Server Overload Protection
    Examples where this is applicable
    • Protect against cascading failures
    • 7. If maximum number of Database connections are in use, do not allocate new threads to service web requests that need a database connection
    • 8. Protect against hogging applications
    • 9. If multiple applications are deployed to the same server, ensure badly behaving applications do not consume all resources
  • Work Management ConcernsOptimally tuning servers is hard!
    Thread pool size for optimum performance?
    Workload can vary (time of day, event driven, etc.)
    Handle overloadconditions gracefully
    Prioritization of work
    Across modules within single application
    Across multiple applications
    Across multiple classes of users
    Ordered processing of requests (one request at a time)
  • 10. Typical SolutionsWork Management Concerns
    Overprovision resources
    Size thread pools for maximum load factor, usually requiring many load-test runs to optimize
    WLS 8.1 - configure multiple execute queues
    Deploy applications into different server instances
    Build additional machinery to detect overload condition and react
    => Sub-optimal ROI and increased Complexity
  • 11. WebLogic Server Work Managers
    • Indicate your intent
    • 12. WebLogic is on autopilot adjusting to meet your goals
  • WebLogic Server Work ManagersCore Principles
    Work Prioritization
    Applications define resource requirements via meta-data they can relate to, rather than low-level technical constructs (thread counts)
    User-specific SLAs can be defined
    Thread Pool Management
    Applications should not have to configure and maintain thread pools
    WLS manages this internally and automatically
    Without necessarily requiring Administrator configuration and sizing input
    Overload Protection
    Standardized mechanism to respond to overload conditions
  • 13. WLS Work ManagementKey Components
    New Thread Pool Implementation
    Single internally managed thread pool and priority-based request queue service all application requests
    Request “Priority” dynamic and internally computed to meet application-defined goals
    Thread Count Self-Tuning
    Self-tuning thread pool monitors overall throughput every two seconds
    Present thread count, measured throughput, and past history determines if thread count needs to change
    New threads automatically added/removed as needed
    Benefits Administrators and Operators - no need to conduct tedious performance testing or guesswork just to pick a static thread pool size that does not adapt to changing workloads
  • 14. WLS Work ManagementKey Components
    Work Managers
    Runtime abstraction used by applications to define resource requirements
    Work Manager Components
    Request Class
    Fair-Share – desired share of server resources for app
    Response Time –desired app response time
    Context Based – user-specific SLAs
    Minimum Thread Constraint
    Maximum Thread Constraint
    Specified in application descriptor (weblogic.xml, weblogic-ejb.xml, weblogic-application.xml)
    Can be accessed programmatically via CommonJ API – JSR-237
  • 15. Work Manager Examples
    Fair Share
    Desired share of server resources
    Thread usage become higher as fair share number increases
    Fair shares are relative to other fair shares defined in the system
  • 16. Work Manager Examples
    Response Time Goal
    Desired response-time goal in milliseconds
    Response-time goals relative to other response goals and fair shares
  • 17. Work Manager Examples
    Currently look at security name and group of user submitting the request
    <work-manager> <name>context_workmanager</name>
    <request-class-name>high_fairshare</request-class-name> </context-case>
    <request-class-name>low_fairshare</request-class-name> </context-case>
  • 18. How to use Work Managers
    • Coarse Grained
    • 19. Target at the entire server (“default” Work Manager)
    • 20. Target entire applications or modules - e.g. weblogic.xml
    • Fine Grained
    • 21. Target individual JSPs, Servlets, EJBs, MDBs
    <servlet> ...
    <param-value>myCustomWorkManager</param-value> ...
    • Programmatically via JNDI lookup
    InitialContextic = new InitialContext();
    commonj.work.WorkManager wm = (commonj.work.WorkManager)ic.lookup("java:comp/env/wm/myWM");
  • 22. Stuck Threads
    • A Label given to threads not returned to thread pool after a configured period of time (defaults to 600 secs)
    • 23. Does not mean threads are literally stuck or locked (although possible) – they might be performing a long-running task
    • 24. This is an informational label – Administrators cannot stop the threads directly due to Java Threading design
    • 25. The Server or the Work Managers can be configured to shutdown or go to an Admin State once a certain number of threads become stuck
  • <Insert Picture Here>
    WLS Work Managers Demonstration
  • 26. Demonstration Application
    Web Application
    veryslow.jsp – 30 second sleep
    Work Manager targeted at veryslow.jsp
    Max Thread Constraint = 5
    Capacity Constraint = 7
    Test Scenario
    10 concurrent clients access veryslow.jsp (using JMeter)
    Work Manager controls how clients get serviced
    7 clients – OK
    3 clients – HTTP 503 (“Server Busy”)
  • 27. WLS behavior under test scenario
  • 28. Test Results
  • 29. Image Attribution
    • Photo of Circuit Breaker courtesy of Alan Hochberg
    • 30. http://www.flickr.com/people/nicestalan/