0 Votes

Performance Tuning

Last modified by Jeff McDonald on 2021/11/26 15:16

Here are a few tips and tricks for performance tuning WebLogic based applications...

Node Manager Server Start

Here are a few of my favorite server start arguments:

ArgumentDescription
-XX:+UnlockCommercialFeaturesUnlock commercial features. Only valid for JDK 8.
-Xms4g -Xmx4gMaximum & mimium memory size (4 Gb)
-Djava.net.preferIPv4Stack=trueIPV6 giving you grief?
-XX:+UseG1GCUse deterministic garbage collection
-Djava.security.egd=file:/dev/./urandomUse faster 'unsecure' random number generator
-Dwlss.maddr.enable=trueNeeded for OCCAS?
-Dweblogic.SocketReaders=10Define number of socket readers. Default is 2.
-XX:+FlightRecorderEnables Mission Control Flight Recorder
-Dwlss.replication=onNeeded for OCCAS?
-Dwlss.callstate.manager.classname=com.bea.wcp.sip.replicatedstore.server.CoherenceCallStateManagerrequired? probably not
-daDisable assertions.

Log Files

Use a shared file system for the domain, but change the logging directory to the local /var/log directory.

/var/log/oracle/AdminServer/AdminServer.log

This can be modified via the console in the Servers / General / Logging tab.

OS Level Optimizations

Oracle Database Pre-install

Here's a quick way to tune kernel parameters...

yum -y install oracle-database-preinstall-19c

Synchronize clocks

Make sure all servers are connected to NTP server and synchronized.

Threads

Thread allocation can cause latency in processing. Like with memory, It is better pre-allocate the threads in the thread pool on startup rather than at runtime.

In config.xml, increase the "self-tuning-thread-pool-size-min" size from 100 to a larger number, possibly 200.

What number should you use? Run the application at full load and look at the "Execute Thread Total Count" in "Server" > "Monitoring" > "Threads" to get an idea.

Disable On-Demand Deployment

Tired of the slow startup of the console?

You can disable the on-demand deployment of internal applications by clicking on the domain link and unchecking the "Enable on-demand deployment of internal applications" box.

Production Mode

The default installation of WebLogic is to deploy in "Development Mode". This has advantages during application development with relaxed security and easier deployment of applications, but if using the Sun HotSpot JDK, it causes WebLogic to start in "-client" mode. This can impact performance. Instead, switch to "-server" mode by checking the "Production Mode" checkbox in the domain configuration screen.

Enable Exalogic Optimizations

When running natively on high-performance machines, check the "Enable Exalogic Optimizations" box in the domain configuration screen.

Applications using WebLogic benefit from a number of optimizations for thread efficiency, faster interprocess communication and higher message throughput. An optimized work scheduler for Exalogic balances the number of threads per core available on Exalogic systems, providing better application processing efficiency. WebLogic Server has changed to use shared byte buffers instead of array copies when passing data, improving application interprocess communication performance and a 66% reduction in number of objects created. This reduces heap usage and results in fewer expensive garbage collections for Applications. WebLogic also optimizes socket calls to reduce lock contention on Exalogic, allowing fewer threads to process a larger number of message requests.

OCCAS Optimizations

Enable Local Dispatch

Have multiple applications running on OCCAS? Using an Application Router to orchestrate call flow?

You can reduce unnecessary network traffic by "enabling local dispatch".

Within the Admin Console, navigate to "SipServer" > "General" and click on the "enable local dispatch" check box.

Transport and Timer Capacity

Are you unable to consume full CPU utilization? Are you getting "SIP/2.0 503 Server Busy" errors?

Is OCCAS issuing these errors:

<Feb 18, 2013 4:26:32 PM CST> <Error> <WLSS.Transport> <BEA-330636> <Transport overload protection has started. The server will stop accepting new messages for approximately : 512 milliseconds. Transport queue size : 400. Timer queue size : 0>

You may want to increase your "Transport Capacity", the number of transactions queued up to be processed.

In "Environment" > "Work Managers" > "wlss.transport.capacity", change the count from the default value (400) to a larger number, like 4000.

Remember! The 503 is a form of overload protection. Don't set the value too high. (What's the correct value? That depends on the amount of latency acceptable for your application.)

Note: from customer:

WorkManager Settings, set wlss.transport.capacity to 5000000, set wlss.timer.capacity to 150000, set wlss.timer.maxthreads to 200 on engine servers.

Adminserver console: [Environment] > [Work Managers], set them one by one.

Native I/O

Confirmed: Native I/O is enabled by default on Linux servers. You do not need to specify "-d64".

Verify that the "Native I/O" drivers are installed. If not, you may have forgotten to install in 64-bit mode.

Re-install WebLogic with the "-d64" parameter if using the generic installer.

Native I/O libraries are only available on Linux (x86/64), Solaris (Sparc) and Windows.

Enable NIO Socket Muxer

Don't have Native I/O for your operating system? Try enabling the NIO Socket Muxer instead.

Under "Server" > "Configuration" > "Tuning", go to "Advanced" and set the "Muxer class" to:

weblogic.socket.NIOSocketMuxer

Disable Local Serialization

Running only a single instance of an Admin Server? You can improve performance by disabling serialization of session data.

-Dwlss.local.serialization=false

Coherence

Increase the partition size from 257 to 2039.

Increase the thread count from 20 to 40.