Calculating storage requirements for Node.js applications
To start one or more Node.js applications in a CICS® region, you must ensure that there is enough free storage available for each Node.js application to use. CICS and other products that are running in the same region might require a considerable amount of z/OS® storage. CICS storage allocation parameters such as DSALIM and EDSALIM affect storage availability and might be over-allocated compared to the peak requirements.
About this task
The storage that is required for a Node.js application is not allocated from CICS DSA or EDSA storage. Some storage is managed by the Language Environment® handling requests such as malloc() issued by C code, and some is managed directly by the Node.js application that uses z/OS storage management requests such as IARV64 and STORAGE OBTAIN. Language Environment uses z/OS storage services.
4 KB of 24-bit storage is required for each thread used by the Node.js runtime. The number of threads used is fixed once the Node.js runtime has started, and is typically between 8 and 12, unless you set the UV_THREADPOOL_SIZE environment variable. In addition, UNIX System Services require 256 KB of contiguous 24-bit storage during the process of creating each thread.
The Node.js runtime allocates a heap for JavaScript objects and JIT compiled code. On z/OS 2.3 or higher, the heap can span both 31-bit and 64-bit storage. Also, the heap is comprised of several spaces, and their sizes vary independently. Measuring the heap usage in a test environment is the simplest way to estimate the heap size requirement. 31-bit storage is also required to load UNIX System Services dynamic link library (DLL) files for the Node.js runtime.
In addition, 64-bit storage is allocated by Language Environment for the C++ heap and stack. This used by Node.js runtime code internally, and by native modules.
To estimate the total storage required for Node.js applications, perform the following procedure.