Oracle WebLogic Server 12c – Comprehensive Tuning & Capacity Planning Notes

Preface & Scope

  • Document targets administrators responsible for monitoring and tuning Oracle WebLogic Server (WLS) 12.2.1.4.0
  • Assumes knowledge of server admin, hardware tuning, XML, Java
  • Focus: JVMs, EJBs, DB, Persistent Store, Data Sources, JMS, Diagnostics, OS, clustering, capacity planning, etc.
  • WLS use-cases: production vs development; security, diversity & inclusion commitments

1 Top Tuning Recommendations (Quick Start)

  • Tune pool sizes
    • Size JDBC, Stateless EJB, MDB pools to expected concurrency
    • Monitor pool grow/shrink/wait counts
  • Enable Prepared-Statement Cache → avoids DB round-trips
  • Prefer Logging Last Resource (LLR) over XA for DB work → cuts 2-PC overhead
  • Tune connection backlog: AcceptBacklog\text{AcceptBacklog} on each listen port
  • Use optimistic or read-only concurrency with cache-between-transactions / query-caching for CMP EJBs
  • Use local interfaces / call-by-reference (serialization-free) for in-JVM calls
  • Eager-relationship-caching: one SQL join loads parent + related beans
  • HTTP Session tuning: minimize stored data, right persistence strategy
  • Messaging: always configure quotas + paging; tune server/store

2 Performance-Tuning Roadmap

  • 1 Understand objectives (users, TPS, latency, CPU targets – 70-80 % latency-sensitive, ≈90 % non-sensitive)
  • 2 Measure metrics
    • Disk, CPU, network, GC, JDBC wait
  • 3 Locate bottlenecks (profile; WLDF, JFR, JMC)
  • 4 Minimize impact
    • Tune Application ➔ DB ➔ WLS params ➔ JVM ➔ OS (descending importance)
  • 5 Iterate until objectives met
General Tips
  • Performance ≠ silver bullet; design + objectives + tuning
  • Schedule regular tuning before failure
  • Always leave at least one finite bottleneck (resource finite)

3 JVM Tuning

  • Use certified JVMs only; HotSpot 1.8 u* for 12c
  • Key flags
    • Heap −Xms-Xms −Xmx-Xmx (set equal in prod)
    • Young gen :-XX:NewSize / MaxNewSize
    • Ratio :-XX:SurvivorRatio
    • GC choice: G1, CMS, Parallel, ZGC (11+)
  • VerboseGC to size heap: look at frequency < 5 % CPU
  • Target: full GC < 3-5 s, infrequent
  • Tune for 80 % RAM utilisation (avoid OS swap)
  • For multi-server box: increase per-instance heap; stay within physical
  • Detect OOM: configure −XX:+HeapDumpOnOutOfMemoryError-XX:+HeapDumpOnOutOfMemoryError

4 WLDF & Java Flight Recorder (JFR)

  • JFR not enabled by default on HotSpot; enable via −XX:+FlightRecorder-XX:+FlightRecorder
  • WLDF captures JFR data in diagnostic images when enabled
  • Diagnostic Volume Low → minimal overhead; High → detailed + higher cost

5 Tuning WebLogic Server Core

Startup Java Opts

  • Set JAVAHOME, MEMARGS; use start scripts or Node Manager overrides

Development vs Production Mode

  • Prod disables auto-deploy, enables SSL, stuck thread detection, smaller default debugging, etc.

Deployment Speed

  • On-demand internal apps; use FastSwap for dev, generic-file-overrides

Thread Management

  • Prefer Work Managers over legacy execute queues
  • Self-tuning pool size default 400; can raise to 65534 when provider & consumer share same JVM
  • Stuck-thread parameters: MaxStuckTime, StuckThreadTimerInterval

Network I/O

  • Default NIO muxer (weblogic.socket.NIOSocketMuxer). Native muxers only for edge cases
  • Tune AcceptBacklog; file descriptors; Complete Message Timeout; message size caps
  • Channels: use multiple custom channels/IPs to parallelise sockets

Multitenancy (deprecated 12.2.1.4)

  • Increase muxer threads (~20 % of cores)
  • Tune self-tuning pool min/max (≈80 % cores); property weblogic.work.rcm.perPartitionPoolSize

Work Manager Queue

  • For cluster-messaging set queue-size > 8192 (e.g., 65536)

Class & Resource Loading

  • Filtering loader: to skip system classpath
  • Class caching enabled for dev (startup faster); disabled in prod

SSL perf

  • JDK 7 stronger ciphers; tune JSSE provider or disable slow suites

6 Persistent Store

  • Default file store per server: ORACLEHOME/userprojects/…/data/store/default
  • Prefer shared custom store when multiple subsystems on same server (batch I/O)
  • File store policies:
    • Direct-Write-With-Cache (best safe perf)
    • Direct-Write
    • Cache-Flush
    • Disabled (unsafe, fastest)
  • Tune BlockSize to FS block (4 KB usually); AvoidDirectIO flag if advised
  • JDBC store: enable I/O multithreading; tune BLOB 3-step threshold; locate WLStore table in fast tablespace
  • Paging store: place on local flash; adjust MessageBufferSize
  • On NFS: ensure sync writes; consider NFS v4, or disable locks (with caution)

7 Database Tuning

  • Spread I/O across disks; larger DB block size; checkpoints tuned
  • Oracle specifics: processes, buffer pool (dbcachesize), shared pool, cursors, sort area
  • SQL Server: tempdb on fast I/O, recovery interval, >2 KB blocks
  • Sybase: recovery interval, >2 KB blocks, engines = CPU-1

8 EJB Tuning

  • General: avoid RequiresNew, use local-interfaces, prefer stateless
Caches
  • Stateful session: max-beans-in-cache ≈ concurrent users
  • Entity: cache-between-transactions=true for read-mostly + optimistic; use ready bean caching; query-cache; eager relationship
Pools
  • Stateless/MDB: max-beans-in-free-pool ≥ concurrent threads; adjust initial size
CMP tweaks
  • JDBC batching on; tuned updates; field groups; include-updates; call-by-reference; inner joins; bean-level pessimistic locking when needed
  • Monitor ratios: cache miss, lock waiter/timeout, pool miss, transaction rollback/timeouts

9 Message-Driven Beans

  • Transaction batching: batch-size * messages to one TX → 5× throughput
  • Concurrency = min(threads, max-beans, WM constraints) ; for token-based polling adjust
  • Topic MDB default single thread if Tx batching; set max-beans=1 for foreign topics

10 Data Sources

  • Set Initial = Max capacity to pre-create connections
  • Enable prepared-statement cache; size = (beans * SQL variants)
  • Test-on-reserve only with overrun wait; new skip-test window (10 s)
  • Pinned-to-Thread=true for low-latency repeat calls
  • Disable wrapping of type objects; use LLR for XA; tune listener timeout

11 Transactions

  • Enable XA Transaction Cluster Affinity for intra-cluster routing reduction
  • Logging Last Resource:
    • Use LLR JDBC pools → halves 2PC cost
    • Set table pctfree 5 / pctused 95; coalesce extents
  • Read-only 1-PC optimisation with Oracle RAC/AQ
  • XA w/o TLog: Determiner resources

12 JMS Performance

Checklist
  • Always configure quotas + paging; tune MessageBufferSize
  • Cache JMS resources in clients; use custom connection factories
  • MessagesMaximum per session: 2×ack_batch+1
  • Distributed queues: disable server affinity or ProducerLB=Per-JVM; ensure consumers balanced; consider MDBs
  • Large messages: compress (GZIP/LZF); tune MaxMessageSize; store compression
  • Handle backlogs: tune flow control, sender blocking, quotas, consumer pools
  • UOO & UOO PathService/Hash; MDB batching
  • JMS 2.0 async send prefer over one-way; CompletionListener; pool producers
  • SAF: set WindowSize (100 small msgs), separate agents, same store sharing
  • Message Bridge: batch size/interval, Exactly-once vs At-least-once, thread pools, colocate with dests

13 Resource Adapters

  • Explode nested JARs or deploy exploded RAR to speed classloading
  • Implement connection optimisation interfaces (LazyAssoc, LazyEnlist)
  • Use WorkManager for threads; InteractionSpec outside RAR for client access

14 Web Applications

  • Disable page checks (pageCheckSeconds = -1) in prod
  • Pre-compile JSPs (weblogic.appc) & store in WEB-INF/classes
  • Use custom JSP tags (cache, repeat, process)
  • Enable HTML template compression; GZIP compression
Sessions
  • Minimise size, aggregate related data, choose correct persistence: replicated, async-replicated-(DB), JDBC
  • For clusters tune async replication: SessionFlushThreshold, FlushInterval
Pub-Sub
  • Tune JVM, file descriptors; max-message-size; dedicated thread pools

15 Web Services

  • Design coarse-grained services; MTOM/FI for payloads; cache schemas
  • Enable async, WS-RM; tune WorkManager min threads; SAF WindowSize; cleaner interval 60 s
  • Use LLR transactions for SOA

16 Tuxedo Connector

  • Prefer ONSTARTUP/INCOMINGONLY policies; avoid ON_DEMAND
  • Use failover + load balancing; cluster each node has identical WTC config
  • Monitor threads; one physical connection per session; no pooling

17 Capacity Planning Highlights

  • Factors: client types, SSL %, RMI traffic, DB capacity, network bandwidth, clustering, sessions, JVM heap
  • Target CPU: 80-90 %; ensure DB 3-4× server HW if DB heavy
  • Each 56 kb/s can serve ~8 HTTP requests concurrent
  • Monitor netstat – retransmits; use perfmon/top/iostat
  • Benchmarks: SPEC; supported platforms list (MOS)

18 Key Equations & Defaults

  • Cache Miss Ratio=Cache Total MissCache Access×100\text{Cache Miss Ratio}=\frac{\text{Cache Total Miss}}{\text{Cache Access}}\times100
  • Lock Waiter Ratio=Current WaiterCurrent Lock Entry×100\text{Lock Waiter Ratio}=\frac{\text{Current Waiter}}{\text{Current Lock Entry}}\times100
  • Pool Timeout Ratio=Pool TimeoutPool Access×100\text{Pool Timeout Ratio}=\frac{\text{Pool Timeout}}{\text{Pool Access}}\times100
  • Async send window: default 1; raise ~300
  • Message Buffer Size default ≈ 1/3 heap (max 512 MB)