Tech Tip: Changing 4D Server stack sizes in 4D v11 SQL
PRODUCT: 4D Server | VERSION: 11.5 | PLATFORM: Mac & Win
Published On: March 26, 2010
4D Server v11 SQL features a hybrid system for managing processes. In particular, for each global client process the server has:
- One cooperative 4D process.
- One pre-emptive OS thread to handle DB4D requests.
- One preemptive OS thread to handle SQL requests (this thread is optional and is created as needed for SQL requests; these are also used in a "pooled" manner).
Each of these processes/threads requires a stack, meaning some memory. The more global client processes you have, the more memory is needed. This is no different than previous versions of 4D. The difference with 4D Server v11 SQL is there are potentially 3 stacks to be accounted for vs. only 1 stack in previous versions.
In situations with a large number of clients, or a large number of global client processes, it is possible to run out of memory on the server in 4D v11 SQL where you might not have in earlier versions of 4D. To alleviate this one of the things that can be done is to alter the stack sizes for the server.
Cooperative process
The technique for modifiying the cooperative process stack size is unchanged from previous versions and is documented here in the Tech Tip "How to change internal stack sizes in 4D".Preemptive DB4D thread
As of 4D Server v11 SQL Release 5 (11.5) the stack for the preemptive DB4D threads can be modified using the SET DATABASE PARAMETER command as follows:SET DATABASE PARAMETER(53;sizeInBytes) |
You can also use GET DATABASE PARAMETER to check the default size (it is different per-OS, and subject to change, so the values are not included in this Tech Tip).
Preemptive SQL thread
The stack for this thread cannot be changed currently.
See Also: