Configuring Thread Stack Size: Difference between revisions

(Creating article)
 
No edit summary
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==About Thread Stack Size==
{{BC|Certified}}
Thread stack size is the amount of memory allocated to a single Java Virtual Machine (JVM) thread, such as HTTP, IMAP, or POP3. This setting is stored in '''zmlocalconfig'''. The default thread stack size varies depending on the server.   
__FORCETOC__
<div class="col-md-12 ibox-content">
=About Thread Stack Size=
{{KB|{{ZC}}|{{ZCS 5.0}}|{{ZCS 4.5}}|}}
{{Archive}}{{WIP}}
Thread stack size is the amount of memory allocated to a single Java Virtual Machine (JVM) thread. The ZCS application can specify JVM thread stack size using '''zmlocalconfig'''. If you are running ZCS 4.5.10 or 5.0, the default thread stack size is 256k. If you are running an earlier version of ZCS, the default thread stack size varies depending on your server.   


Systems running a large number of thread stacks may need to set a smaller the thread stack size in order to improve performance. For optimal performance, Zimbra recommends configuring your thread stack size to 256k.
Systems running a large number of thread stacks may need to set a smaller the thread stack size in order to improve performance. For optimal performance, Zimbra recommends configuring your thread stack size to 256k.
Line 7: Line 12:


==Configuring your Thread Stack Size==
==Configuring your Thread Stack Size==
In order to configure this parameter, you must add the '''–Xss''' option to '''tomcat_java_options'''.


Note: For ZCS 5.0 or later, this options is added to '''mailboxd_java_options'''.
===Configuring Thread Stack Size Using the CLI===
To configure this parameter, you must change the thread stack size key using '''zmlocalconfig'''. If you are using ZCS 4.5.10, the key is '''tomcat_thread_stack_size'''. If you are using ZCS 5.0, the key is '''mailboxd_thread_stack_size'''.
 
For example, in ZCS 4.5.10, the following command will change the threadstack size to 256k:
 
$ zmlocalconfig -e tomcat_thread_stack_size=256k
 
In ZCS 5.0:
 
$ zmlocalconfig -e mailboxd_thread_stack_size=256k
 
===Configuring Thread Stack Size Using Java Options===
You can also configure this parameter by adding the '''–Xss''' option to '''tomcat_java_options'''. For ZCS 5.0 or later, this option is added to '''mailboxd_java_options'''.
 
'''''Note:'''If you add the -Xss flag to java options, then the thread_stack_size key will be ignored.''


The syntax of this parameter is:
The syntax of this parameter is:
Line 15: Line 33:
   -Xss<value>
   -Xss<value>


For example, in order to set the thread stack size to 256k, you would type:
For example, in order to set the thread stack size to 256k:


   -Xss256k  
   zmlocalconfig -e mailboxd_java_options = -client -Xss256k -verbose:gc -XX:+PrintGCDetails


'''''Note:''' There is no space between the parameter designation and its value.''
'''''Note:''' There is no space between the parameter designation and its value.''


==Monitoring for Thread Stack Size Errors==
==Monitoring for Thread Stack Size Errors==
It is good practice to monitor /opt/zimbra/log/mailbox.log for errors after changing the thread stack size. If you are getting errors such as '''java.lang.StackOverflowError''', your thread stack size is too large.
It is good practice to monitor '''/opt/zimbra/log/mailbox.log''' for errors after changing the thread stack size. If you are getting errors such as '''java.lang.StackOverflowError''', your thread stack size is too large.


==Related Articles==
==Related Articles==
*[[Performance_Tuning_Guidelines_for_Large_Deployments#Java_Settings_for_Tomcat|Performance Tuning Guidelines for Large Deployments: Java Settings for Tomcat]]
*[[Performance_Tuning_Guidelines_for_Large_Deployments#Java_Settings_for_Tomcat|Performance Tuning Guidelines for Large Deployments: Java Settings for Tomcat]]
*[[CLI_zmlocalconfig_%28Local_Configuration|CLI zmlocalconfig (Local Configuration)]]
*[[CLI_zmlocalconfig_%28Local_Configuration)|CLI zmlocalconfig (Local Configuration)]]




Line 33: Line 51:
[[Category: Configuration]]
[[Category: Configuration]]
[[Category: Troubleshooting]]
[[Category: Troubleshooting]]
[[Category: Pending Certification]]
[[Category: ZCS 5.0]]
[[Category: ZCS 4.5]]

Latest revision as of 23:30, 10 July 2015

About Thread Stack Size

   KB 2297        Last updated on 2015-07-10  




0.00
(0 votes)

Thread stack size is the amount of memory allocated to a single Java Virtual Machine (JVM) thread. The ZCS application can specify JVM thread stack size using zmlocalconfig. If you are running ZCS 4.5.10 or 5.0, the default thread stack size is 256k. If you are running an earlier version of ZCS, the default thread stack size varies depending on your server.

Systems running a large number of thread stacks may need to set a smaller the thread stack size in order to improve performance. For optimal performance, Zimbra recommends configuring your thread stack size to 256k.

Important: 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.

Configuring your Thread Stack Size

Configuring Thread Stack Size Using the CLI

To configure this parameter, you must change the thread stack size key using zmlocalconfig. If you are using ZCS 4.5.10, the key is tomcat_thread_stack_size. If you are using ZCS 5.0, the key is mailboxd_thread_stack_size.

For example, in ZCS 4.5.10, the following command will change the threadstack size to 256k:

$ zmlocalconfig -e tomcat_thread_stack_size=256k

In ZCS 5.0:

$ zmlocalconfig -e mailboxd_thread_stack_size=256k

Configuring Thread Stack Size Using Java Options

You can also configure this parameter by adding the –Xss option to tomcat_java_options. For ZCS 5.0 or later, this option is added to mailboxd_java_options.

Note:If you add the -Xss flag to java options, then the thread_stack_size key will be ignored.

The syntax of this parameter is:

 -Xss<value>

For example, in order to set the thread stack size to 256k:

 zmlocalconfig -e mailboxd_java_options = -client -Xss256k -verbose:gc -XX:+PrintGCDetails 

Note: There is no space between the parameter designation and its value.

Monitoring for Thread Stack Size Errors

It is good practice to monitor /opt/zimbra/log/mailbox.log for errors after changing the thread stack size. If you are getting errors such as java.lang.StackOverflowError, your thread stack size is too large.

Related Articles


Verified Against: Zimbra Collaboration Suite 4.5.10, 5.0 Date Created: 12/10/2007
Article ID: https://wiki.zimbra.com/index.php?title=Configuring_Thread_Stack_Size Date Modified: 2015-07-10



Try Zimbra

Try Zimbra Collaboration with a 60-day free trial.
Get it now »

Want to get involved?

You can contribute in the Community, Wiki, Code, or development of Zimlets.
Find out more. »

Looking for a Video?

Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.
Go to the YouTube channel »

Jump to: navigation, search