IBM Support

Setting the WebSphere Application Server WebContainer to synchronous mode

Troubleshooting


Problem

The WebContainers use of asynchronous data transfer may use a large number of buffers in native memory to write an application response. This predominately occurs when large application responses are being transferred (for example a PDF, large images, the dmgr updating the nodeagents, ,etc) but may also occur with normal size application responses. If the amount of native memory used by this is too large, we can enable synchronous mode which will reduce the amount of memory used to store responses.

Cause

A new feature was added to the WebContainer to allow the sending of response data asynchronously as a performance enhancement. Unfortunately, this can require the allocation of enough native memory buffers to hold the entire response data being transferred (java.nio.DirectByteBuffer's).
Depending on the size of the applications responses and the user load, this may require a large amount of memory (large native memory footprint). If the connection to the users is slow, then the data will take longer to transfer and the response needs to be kept in native memory until the transfer has been completed, compounding the problem.
This feature is in WebSphere Application Server 6.0.2.19 and above, 6.1.0.7 and above and all levels of 7.0.

Environment

WebSphere Application Server 6.0.2.21 and higher, 6.1.0.11 and higher, all 7.0, 8.0, 8.5, 8.5.5, 9.0 and 9.0.5

Diagnosing The Problem

IBM Support will be able to tell you if you are seeing an issue with native memory, and may recommend setting the WebContainer thread pool to use synchronous writes for response data to reduce the native memory footprint.

Resolving The Problem

A Java property can be set which will force the data transfer to be synchronous rather than asynchronous. Since the asynchronous transfer is generally faster, at least for small files, the use of synchronous transfer may result in a performance impact. This performance impact will be different for each application and user load, but would be far outweighed by the performance impact of the extra memory used by all of the buffers allocated by the asynchronous transfer algorithm.

This property was added in later 6.0.2 and 6.1 Application Server Fix Packs, so you may need to upgrade your Application Server installation before setting the property.
 
  1. Check if your Application Server installation is at least at 6.0.2.21 or 6.1.0.11 or any level of 7.0 and higher, depending on which version of WebSphere Application Server you are on. If not, please install one of the Fix Packs to get your installation up to that level or more recent.
     
  2. Set the channelwritetype property to use synchronous data transfer (sync):

    For an application server
    In the Admin Console:
  • Servers -> Application Servers -> serverName -> Web Container Settings -> Web Container -> Custom Properties:
    Press New:
    Add the following pair:
    • Name: com.ibm.ws.webcontainer.channelwritetype
      Value: sync
    Press OK, and then save the configuration.

    The application server must be recycled to pick up the property.

    For a deployment manager
    Start an interactive wsadmin session:
    <dmgr-profile-root>\bin>wsadmin -lang jacl

    Copy the following block of lines, then paste them all at once at the wsadmin> prompt:
    set dmgr [$AdminConfig getid /Server:dmgr/]
    set webcontainer [$AdminConfig list WebContainer $dmgr]
    $AdminConfig create Property $webcontainer {{name com.ibm.ws.webcontainer.channelwritetype} {value sync}} properties
    $AdminConfig show $webcontainer
    $AdminConfig save

    The deployment manager must be recycled to pick up the property.


    To remove the setting from the deployment manager
    Start an interactive wsadmin session:
    <dmgr-profile-root>\bin>wsadmin -lang jacl

    Copy the following block of lines, then paste them all at once at the wsadmin> prompt:
    set dmgr [$AdminConfig getid /Server:dmgr/]
    set allproperty [$AdminConfig list Property $dmgr]
    foreach prop $allproperty {
    • set propName [$AdminConfig showAttribute $prop name]
      if {$propName == "com.ibm.ws.webcontainer.channelwritetype"} {
      • $AdminConfig remove $prop
        $AdminConfig save
      }
    }

    The deployment manager must be recycled to pick up the removed property.










  •  

[{"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Out of Memory","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"9.0;8.5.5;8.5;8.0;7.0;6.1.0.11;6.0.2.21","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
18 July 2022

UID

swg21317658