SAP Netweaver has been around for many, many years now. In fact we have had very nearly 20 years of Netweaver. Back in March 2001, SAP acquired TopTier and went on to use TopTier’s application as the underpinning to the SAP Netweaver application server (WebAS). Now this would not have been the Netweaver Java stack, that was to come later in the form of WebAS 6.30. My point is, you would imagine by now that Netweaver is known inside and out by most BASIS professionals, but this is just not the case. It’s a complex and very capable application server and there are things that we know and things that we know in detail. One of the things that seems to be little known is the FCA and it’s role within the ICM of the Netweaver Java stack.
In this post I want to explain the function of the SAP Netweaver Internet Communication Manager (ICM) Fast Channel Architecture (FCA) and how this is responsible for routing the HTTP communications to your Netweaver Java stack.
As usual, a little context will help set the scene.
A History of Netweaver Java
Before Netweaver 7.1, the Java stack did not have an Internet Communication Manager (ICM). This was reserved only for the Netweaver ABAP stack. Instead, these old Netweaver Java versions had additional Java nodes (JVMs) called dispatcher nodes (in addition to the server0 node).
The dispatcher node was responsible for receiving and dispatching the inbound HTTP requests to the server nodes of the instance.
The ICM Was Added
Since Netweaver 7.1, the Java stack was given the ICM, which runs from the Kernel binaries, instead of a JVM.
The benefits of this change were:
Faster startup and response time (Kernel is C++ compiled binary code). Smaller memory requirements. Same ICM in Netweaver ABAP and Netweaver Java (same Kernel DB independent part). Use of profile files for configuration (for SSL, security, memory params) instead of ConfigTool.
Identifying the FCA
We know the ICM is visible as a separate binary executable process at the operating system level. In Windows we see “icman.exe” and in Unix/Linux we see “icman”. At execution, the icman program reads the instance profile to determine it’s configuration.
The Fast Channel Architecture (FCA) is a specific, dedicated set of memory pipes (MPIs) in the shared memory region, accessible by both the ICM and the Java server nodes and used as a method of super fast inter-process communication between the ICM and the Java server nodes. In Linux, shared memory segments are visible using the “ipcs -m” command, in Windows these are memory mapped files and you cannot see them so easily, you would need a 3rd party tool.
By using shared memory and the concept of memory pipes, it avoids the need for the data in a HTTP request/response to be sent from the ICM to the Java Server node. Instead of sending the actual data, a simple memory pointer can be sent (smaller and consistent in size), telling the Java Server node where to look in memory, for the data. Effectively what this means is that the shared memory area for the MPIs, sits logically between the ICM and the Java Server nodes.
According to the Netweaver AS Java documentation, the FCA is itself just another MPI, that acts as a FIFO queue. The HTTP requests coming into the ICM via a TCP port, travel through a regular (anonymous) MPI, before the ICM dispatches the request into a specific FCA queue. If you have two server nodes on your Java stack (server0 and server1), then the ICM will query the server node to determine the back-end load, then push the request to the specific FCA queue of the target server node that has capacity to handle the request. Therefore, if you have two server nodes, you will have a dedicated FCA queue for each. It is the responsibility of the Java server node, to create the FCA queue in the ICM shared memory during start-up.
Once the HTTP request (or rather, the memory pointer to the request) hits the FCA, it becomes the responsibility of the Java server node to pull the request off the queue into a thread for processing. Inside the Java Server node, these threads are known as the FCA threads or HTTP Worker Threads. If you run a SAP PI/PO system, then you may already be familiar with these threads and their configuration. You may have seen these threads when running thread dumps for SAP support incidents.
There are two methods to actually see the FCA Queues:
Within the SAP ICM Web Administration page. Using the “icmon” command line tool.
We can call the icmon tool as follows:
icmon pf=<path-to-instance-profile>
then from the menu select "m"
then from the menu select "y"
Once the MPI list is dumped (option “y”), the the FCA queues are visible at the end of the output:
...
MPI<174>: 4d50494d 'ANON' 11 50 0 0 0 0(4996) 1(30001) 1(30001)
MPI<173>: 4d50494d 'ANON' 10 50 0 0 0 0(4996) 1(30001) 1(30001)
MPI<60>: 4d50494d 'TS1_00_1234650_HTTP_WAIT' 5 -1 20 0 0 0(4996) 1(10002) 0(-1)
MPI<5f>: 4d50494d 'TS1_00_1234650_HTTP' 4 -1 20 0 0 0(4996) 1(10002) 1(30001)
MPI<58>: 4d50494d 'TS1_00_1234651_HTTP_WAIT' 2 -1 20 0 4406 0(4996) 1(10003) 0(-1)
MPI<57>: 4d50494d 'TS1_00_1234651_HTTP' 7 -1 20 0 0 0(4996) 1(10003) 1(30001)
MPI<52>: 4d50494d 'TS1_00_1234650_P4' 6 -1 20 0 0 0(4996) 1(10002) 1(30001)
MPI<4d>: 4d50494d 'TS1_00_1234651_P4' 3 -1 20 0 0 0(4996) 1(10003) 1(30001)
MPI<4>: 4d50494d 'ANON' 1 1 0 0 0 0(4996) 1(30001) 1(30001)
MPI<2>: 4d50494d 'ANON' 0 1 0 0 0 0(4996) 1(30001) 1(30001)
q - quit
m - menue
NOTE : For those interested, the 4d 50 49 4d at the beginning of each line, translates from HEX to ASCII as “MPIM”.
In my example, you can see I have 2 Java server nodes registered at this ICM: 1234650 and 1234651. You will notice that there are 3 queues for each Java server node. The P4 queue is self explanatory, it is used to talk to the Java server node on it’s P4 port (SAP proprietary protocol) and is probably used to acquire capacity/load information from the server node. Of the other 2 queues, one queue is the “WAIT” queue and is where (I think) the inbound requests (destined to the Java server node) are held, before they enter the other request queue which is where (I think) the Java server node is waiting to process the requests. (There is not a great deal of documentation on the above, but I have seen instances where the WAIT queue fills, which makes me believe it’s a holding area).
In the dev_icm trace we can also see the joining of the server nodes to the ICM for the HTTP protocol (other protocols are supported, such as Telnet, P4):
[Thr 140608759801600] Wed Mar 17 22:59:32:934 2021
[Thr 140608759801600] JNCMIHttpCallLBListener: node 1234650, service Http joins load balancing
[Thr 140608759801600] HttpJ2EELbPut: server 1234650 started protocol HTTP, attached to request queue TS1_00_1234650_HTTP
[Thr 140608759801600] JNCMIHttpMsPutLogon: set http logon port (port:50000) (lbcount: 2)
[Thr 140608759801600] JNCMIHttpMsPutLogon: set https logon port (port:50001) (lbcount: 2)
In the Java server node developer trace files (e.g. dev_server0 and dev_server1), we can see the name of the node (JNODE_10002 for server0) which is also visible in the dev_icm trace output in column 10:
F [Thr 139637668607872] Wed Mar 17 22:53:49 2021
F [Thr 139637668607872] JSFSetLocalAddr: using NI defaults for bind()
I [Thr 139637668607872] MtxInit: JNODE_10002 0 2
The relevant dev_icm output:
MPI<60>: 4d50494d ‘TS1_00_1234650_HTTP_WAIT’ 5 -1 20 0 0 0(4996) 1(10002 ) 0(-1) MPI<5f>: 4d50494d ‘TS1_00_1234650_HTTP’ 4 -1 20 0 0 0(4996) 1(10002 ) 1(30001)
Sizing the FCA
The size of the FCA is not directly configurable. Instead, we can configure the size of the shared memory area (total area) for all the MPIs using parameter “mpi/total_size_MB “, then from this total size, the maximum possible size of any individual MPI is fixed to 25% of the total area size.
In later Netweaver versions (7.40+), it is not recommended to adjust “mpi/total_size_MB “, instead, adjust the “icm/max_conn ” parameter, which is then used to calculate “mpi/total_size_MB “. The internal formula is described as:mpi/total_size_MB = min(0.06 * $(icm/max_conn) + 50, 2000)
There is another undocumented (apart from SAP notes) parameter, which can allow you to increase the max size of an MPI. However it means any one MPI can consume more of the total area than the default 25%. It is therefore not advised to be adjusted.
We can see the value of the parameter “mpi/total_size_MB” in the ICM developer trace file (dev_icm) during it’s start up. This is useful as it shows us the calculation based on the formula mentioned above. We are looing at “total size MB” right at the end of the line:
[Thr 140610607359872] MPI init, created: pipes=40010 buffers=19985 reserved=5995 quota=10%, buffer size=65536, total size MB=1250
Common FCA Errors
There are a dedicated set of SAP notes for FCA errors, such as 1867119. Based on the architecture we can see that they describe issues with throughput (through the FCA Queue), and with issues in the Java server node threads causing the FCA Queues to fill. They also show issues with sizing of the MPIs, and the number of the worker threads (for high throughput scenarios).
In my experience the following types of FCA errors can be seen in the Java server developer traces “dev_server<n>” files:
“-3” error: The Java server node is unable to put a response back onto the FCA Queue, probably because the MPI area is full from a full FCA Queue. This can happen if one of the Java server node HTTP Worker threads has become stuck (waiting) for resources or for the database. As you will see from my previous diagram, a full MPI area will then start to affect HTTP access to both Java server nodes as they share the ICM (it’s a single point of failure). “-7” error: This affects one individual Java server node and prevents it from pulling requests off the FCA queue in a timely manner. This specific issue is usually a timeout mismatch between the HTTP provider and the ICM.
Both of the above errors look similar, but one is a lack of resources in the Java stack and the other is a full FCA Queue (in shared memory) due to inaction (stuck threads) in the Java stack. The “-7” error can therefore present itself as an issue in the ICM or in the Java stack, but it is usually a problem in the Java stack that causes it to close the connection early.
Summary
There you have it, the simple FCA queue that serves HTTP requests to your Java Server nodes. We learned:
Netweaver Java was given the ICM in 7.1 onwards. The ICM in the Netweaver Java and ABAP stacks is the same binary. The ICM uses shared memory for the MPIs. The shared memory area is controlled via a parameter of which it’s value is controlled via 1 parameter (in NW 7.40+). The FCA queues are MPIs. Only memory pointers are passed through the FCA Queues. The Java server nodes are responsible for creating the FCA queues in the ICM shared memory. There are 2 FCA queues for each server node. The developer traces store information about the size of the ICM shared memory and the registration of the Java Server nodes to a queue. There are a known set of errors that can occur and are documented in SAP notes.
Useful SAP References
SAP Note 1867119 – No more memory for FCA SAP Note 2417488 – Resource leak for MPI buffers in FCA communication SAP Note 1945745 – How to increase HTTP Worker (FCA) threads in PI SAP Note 2579836 – AS Java system has performance problem – FCAException – Best practices and tuning recommendations. SAP Note 2997765 – AS Java system has performance problem – FCAException – Best practices for analysis SAP Note 2276273 – AS Java – How to identify the largest MPI buffer consumer by MPI dump
You may also be interested in: