Problem:
- Product Name: Visibroker for C
- Product Version: 7.0 and above
- Product Component: Core ORB
- Platform/OS Version: RHEL 4.0
- JDK/Compiler Verison: n.a.
Setting thread stack size and default stack sizes of different operating systems
Resolution:
One can use dispatcher's "threadStackSize" property (of the corresponding Server Connection Manager under the corresponding Server Engine) to set thread stack's size. For instance, for the default iiop_tp SCM of iiop_tp SE, the property is "vbroker.se.iiop_tp.scm.iiop_tp.dispatcher.threadStackSize".
The default value is 0, which indicates system's default value and should be specified in bytes.
You have to note the following points before setting the threadStackSize:
- Systems running a large number of thread stacks may need to set a smaller the thread stack size in order to improve performance.
- The thread stack size should never be smaller than 128k. Setting the thread stack size smaller than this can result in a failure to allocate threads.
- You need to ensure that that the system has sufficient stack segment allocated for the process.
- This threadStackSize option affects only those threads that are created by the ORB to service CORBA requests. It does not affect the main thread or threads created by the application.
- You have to estimate the stack size value based on the memory requirement of your application.
- VisiBroker calls pthread_attr_setstacksize() API internally to set the thread's stack size when creating a new worker thread. The functions pthread_attr_setstacksize() and pthread_attr_getstacksize(), respectively, sets and gets the thread stack size.
- The threadStackSize setting will only take effect on a spawned worker thread, and will not affect any other admin threads created by the orb. So, you can only see a change in the thread stack size if you examine the spawned worker threads servicing your servant.
AIX 5.2: 400 KB Linux: 10 Meg Solaris Sparc 32 bit: 512 KB Solaris Sparc 64 bit: 1024 KB Solaris x86: 256 KB HP-UX: 128 KB
#thread
#VisiBrokerforC
#Security
#VisiBroker