From 4cf19d1366557fe8bdae919166b4127b86f62091 Mon Sep 17 00:00:00 2001 From: Suresh Kumar Anaparti Date: Mon, 9 Feb 2026 18:40:18 +0530 Subject: [PATCH 1/4] Updated configuration details for Management and KVM Agent services --- source/adminguide/tuning.rst | 21 +++++++++ source/installguide/hypervisor/kvm.rst | 65 ++++++++++++++++++++++++++ 2 files changed, 86 insertions(+) diff --git a/source/adminguide/tuning.rst b/source/adminguide/tuning.rst index bb214602ee..dcc0cae590 100644 --- a/source/adminguide/tuning.rst +++ b/source/adminguide/tuning.rst @@ -57,6 +57,27 @@ For more information about memory issues, see "FAQ: Memory" at `Tomcat Wiki. `_ +Disable Omit Stack Trace +------------------------ + +JVM by default stop printing some stack traces in the logs. To enable print stack traces always: + +#. Edit the cloudstack-management.service configuration file at: + + .. code:: bash + + /etc/default/cloudstack-management + +#. Add the command-line parameter -XX:-OmitStackTraceInFastThrow to disable omit stack trace flag in JVM so that all + the stack traces are always printed on the logs. This flag is enabled by default in JVM to omit the stack traces + for certain exceptions that are thrown frequently. Printing of the stack traces might impact performance, and is not + recommended for production, so it's better to disable this flag for troubleshooting or debugging purposes when required. + + .. code:: bash + + JAVA_OPTS="... -XX:-OmitStackTraceInFastThrow" + + Set Database Buffer Pool Size ----------------------------- diff --git a/source/installguide/hypervisor/kvm.rst b/source/installguide/hypervisor/kvm.rst index d450a459fa..d0256b68ce 100644 --- a/source/installguide/hypervisor/kvm.rst +++ b/source/installguide/hypervisor/kvm.rst @@ -310,6 +310,71 @@ sudoers file: cloudstack ALL=NOPASSWD: /usr/bin/cloudstack-setup-agent Defaults:cloudstack !requiretty +Limit Resources For the Agent Service +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +#. Edit the cloudstack-agent.service file at: + + .. code:: bash + + /usr/lib/systemd/system/cloudstack-agent.service + +#. You can set the following resource controls in the cloudstack-agent service: + +- Limit the number of file descriptors + + Default configuration is usually higher, set to lower number explicitly when required. It is observed + that the average FDs for a host with 40 VMs was 380, we can reserve +20% based on the requirement. + + Example: + .. code:: bash + + LimitNOFILE=1500 + +- Limit the memory usage + + You can limit the memory usage. For example, set to 2500MB (2500 * 1024 * 1024 bytes) as shown below. + + .. code:: bash + + MemoryMax=2500M + +- Limit the CPU quota + + You can control the CPU allocation. For example,set to allow 2 full cores worth of CPU time as shown below. + + .. code:: bash + + CPUQuota=200% + +#. Reload and restart the cloudstack-agent service after changing any of the controls: + + .. code:: bash + + sudo systemctl daemon-reload + sudo systemctl restart cloudstack-agent + + +Disable Omit Stack Trace +^^^^^^^^^^^^^^^^^^^^^^^^ + +JVM by default stop printing some stack traces in the logs. To enable print stack traces always: + +#. Edit the cloudstack-agent.service configuration file at: + + .. code:: bash + + /etc/default/cloudstack-agent + +#. Add the command-line parameter -XX:-OmitStackTraceInFastThrow to disable omit stack trace flag in JVM so that all + the stack traces are always printed on the logs. This flag is enabled by default in JVM to omit the stack traces + for certain exceptions that are thrown frequently. Printing of the stack traces might impact performance, and is not + recommended for production, so it's better to disable this flag for troubleshooting or debugging purposes when required. + + .. code:: bash + + JAVA_OPTS="... -XX:-OmitStackTraceInFastThrow" + Configure CPU model for KVM guest (Optional) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ From 2687f68a6a8b7ab5f23d90998ad378ca8a4985fc Mon Sep 17 00:00:00 2001 From: Suresh Kumar Anaparti Date: Mon, 9 Feb 2026 18:52:59 +0530 Subject: [PATCH 2/4] indentation correction --- source/installguide/hypervisor/kvm.rst | 30 +++++++++++++------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/source/installguide/hypervisor/kvm.rst b/source/installguide/hypervisor/kvm.rst index d0256b68ce..feb116e193 100644 --- a/source/installguide/hypervisor/kvm.rst +++ b/source/installguide/hypervisor/kvm.rst @@ -321,33 +321,33 @@ Limit Resources For the Agent Service #. You can set the following resource controls in the cloudstack-agent service: -- Limit the number of file descriptors + - Limit the number of file descriptors - Default configuration is usually higher, set to lower number explicitly when required. It is observed - that the average FDs for a host with 40 VMs was 380, we can reserve +20% based on the requirement. + Default configuration is usually higher, set to lower number explicitly when required. It is observed + that the average FDs for a host with 40 VMs was 380, we can reserve +20% based on the requirement. Example + shown below. - Example: - .. code:: bash + .. code:: bash - LimitNOFILE=1500 + LimitNOFILE=1500 -- Limit the memory usage + - Limit the memory usage - You can limit the memory usage. For example, set to 2500MB (2500 * 1024 * 1024 bytes) as shown below. + You can limit the memory usage. For example, set to 2500MB (2500 * 1024 * 1024 bytes) as shown below. - .. code:: bash + .. code:: bash - MemoryMax=2500M + MemoryMax=2500M -- Limit the CPU quota + - Limit the CPU quota - You can control the CPU allocation. For example,set to allow 2 full cores worth of CPU time as shown below. + You can control the CPU allocation. For example,set to allow 2 full cores worth of CPU time as shown below. - .. code:: bash + .. code:: bash - CPUQuota=200% + CPUQuota=200% -#. Reload and restart the cloudstack-agent service after changing any of the controls: +#. Reload and restart the cloudstack-agent service after changing any of the resource controls: .. code:: bash From ba20dd1b173dd1744de47e73a312b09f33ac0b20 Mon Sep 17 00:00:00 2001 From: Suresh Kumar Anaparti Date: Thu, 12 Feb 2026 13:56:59 +0530 Subject: [PATCH 3/4] review changes --- source/adminguide/tuning.rst | 6 +++--- source/installguide/hypervisor/kvm.rst | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/source/adminguide/tuning.rst b/source/adminguide/tuning.rst index dcc0cae590..f28f39f719 100644 --- a/source/adminguide/tuning.rst +++ b/source/adminguide/tuning.rst @@ -60,7 +60,7 @@ Wiki. `_ Disable Omit Stack Trace ------------------------ -JVM by default stop printing some stack traces in the logs. To enable print stack traces always: +The JVM, by default stops printing some stack traces in the logs. To enable printing full stack traces at all times: #. Edit the cloudstack-management.service configuration file at: @@ -68,8 +68,8 @@ JVM by default stop printing some stack traces in the logs. To enable print stac /etc/default/cloudstack-management -#. Add the command-line parameter -XX:-OmitStackTraceInFastThrow to disable omit stack trace flag in JVM so that all - the stack traces are always printed on the logs. This flag is enabled by default in JVM to omit the stack traces +#. Add the command-line parameter -XX:-OmitStackTraceInFastThrow to disable the omit stack trace flag in the JVM so that all + the stack traces are always printed on the logs. This flag is enabled by default in the JVM to omit the stack traces for certain exceptions that are thrown frequently. Printing of the stack traces might impact performance, and is not recommended for production, so it's better to disable this flag for troubleshooting or debugging purposes when required. diff --git a/source/installguide/hypervisor/kvm.rst b/source/installguide/hypervisor/kvm.rst index feb116e193..9f22777c1b 100644 --- a/source/installguide/hypervisor/kvm.rst +++ b/source/installguide/hypervisor/kvm.rst @@ -323,7 +323,7 @@ Limit Resources For the Agent Service - Limit the number of file descriptors - Default configuration is usually higher, set to lower number explicitly when required. It is observed + The default configuration is usually higher, set to a lower number explicitly when required. It is observed that the average FDs for a host with 40 VMs was 380, we can reserve +20% based on the requirement. Example shown below. @@ -341,7 +341,7 @@ Limit Resources For the Agent Service - Limit the CPU quota - You can control the CPU allocation. For example,set to allow 2 full cores worth of CPU time as shown below. + You can control the CPU allocation. For example, set to allow 2 full cores worth of CPU time as shown below. .. code:: bash @@ -358,7 +358,7 @@ Limit Resources For the Agent Service Disable Omit Stack Trace ^^^^^^^^^^^^^^^^^^^^^^^^ -JVM by default stop printing some stack traces in the logs. To enable print stack traces always: +The JVM, by default stops printing some stack traces in the logs. To enable printing full stack traces at all times: #. Edit the cloudstack-agent.service configuration file at: @@ -366,8 +366,8 @@ JVM by default stop printing some stack traces in the logs. To enable print stac /etc/default/cloudstack-agent -#. Add the command-line parameter -XX:-OmitStackTraceInFastThrow to disable omit stack trace flag in JVM so that all - the stack traces are always printed on the logs. This flag is enabled by default in JVM to omit the stack traces +#. Add the command-line parameter -XX:-OmitStackTraceInFastThrow to disable the omit stack trace flag in the JVM so that all + the stack traces are always printed on the logs. This flag is enabled by default in the JVM to omit the stack traces for certain exceptions that are thrown frequently. Printing of the stack traces might impact performance, and is not recommended for production, so it's better to disable this flag for troubleshooting or debugging purposes when required. From 6ae42a3a2bbb71c245c2a3b22ed09e628e9ba6dd Mon Sep 17 00:00:00 2001 From: Suresh Kumar Anaparti Date: Wed, 18 Feb 2026 13:41:22 +0530 Subject: [PATCH 4/4] Update for usage server and ssvm, and move tuning to dir --- source/adminguide/index.rst | 2 +- .../tuning/disable_omit_stack_trace.rst | 55 +++++++++++++++++++ source/adminguide/{ => tuning}/tuning.rst | 20 +------ source/installguide/hypervisor/kvm.rst | 20 +------ 4 files changed, 58 insertions(+), 39 deletions(-) create mode 100644 source/adminguide/tuning/disable_omit_stack_trace.rst rename source/adminguide/{ => tuning}/tuning.rst (92%) diff --git a/source/adminguide/index.rst b/source/adminguide/index.rst index a3aad694ed..9bfe226b8d 100644 --- a/source/adminguide/index.rst +++ b/source/adminguide/index.rst @@ -176,7 +176,7 @@ Tuning .. toctree:: :maxdepth: 4 - tuning + tuning/tuning Events and Troubleshooting diff --git a/source/adminguide/tuning/disable_omit_stack_trace.rst b/source/adminguide/tuning/disable_omit_stack_trace.rst new file mode 100644 index 0000000000..79e7b88725 --- /dev/null +++ b/source/adminguide/tuning/disable_omit_stack_trace.rst @@ -0,0 +1,55 @@ +.. Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information# + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + + +Disable Omit Stack Trace +------------------------ + +The JVM, by default stops printing some stack traces in the logs. To enable printing full stack traces at all times: + +#. Edit the following configuration file for the respective service to disable there and restart it: + + - For cloudstack-management.service in the Management Server: + + .. code:: bash + + /etc/default/cloudstack-management + + - For cloudstack-usage.service in the Usage Server: + + .. code:: bash + + /etc/default/cloudstack-usage + + - For cloudstack-agent.service in the KVM Host: + + .. code:: bash + + /etc/default/cloudstack-agent + + - For cloud.service in the SSVM: + + .. code:: bash + + /usr/local/cloud/systemvm/_run.sh + +#. Add the command-line parameter -XX:-OmitStackTraceInFastThrow to disable the omit stack trace flag in the JVM so that all + the stack traces are always printed on the logs. This flag is enabled by default in the JVM to omit the stack traces + for certain exceptions that are thrown frequently. Printing of the stack traces might impact performance, and is not + recommended for production, so it's better to disable this flag for troubleshooting or debugging purposes when required. + + .. code:: bash + + JAVA_OPTS="... -XX:-OmitStackTraceInFastThrow" diff --git a/source/adminguide/tuning.rst b/source/adminguide/tuning/tuning.rst similarity index 92% rename from source/adminguide/tuning.rst rename to source/adminguide/tuning/tuning.rst index f28f39f719..bc8cb35dcb 100644 --- a/source/adminguide/tuning.rst +++ b/source/adminguide/tuning/tuning.rst @@ -57,25 +57,7 @@ For more information about memory issues, see "FAQ: Memory" at `Tomcat Wiki. `_ -Disable Omit Stack Trace ------------------------- - -The JVM, by default stops printing some stack traces in the logs. To enable printing full stack traces at all times: - -#. Edit the cloudstack-management.service configuration file at: - - .. code:: bash - - /etc/default/cloudstack-management - -#. Add the command-line parameter -XX:-OmitStackTraceInFastThrow to disable the omit stack trace flag in the JVM so that all - the stack traces are always printed on the logs. This flag is enabled by default in the JVM to omit the stack traces - for certain exceptions that are thrown frequently. Printing of the stack traces might impact performance, and is not - recommended for production, so it's better to disable this flag for troubleshooting or debugging purposes when required. - - .. code:: bash - - JAVA_OPTS="... -XX:-OmitStackTraceInFastThrow" +.. include:: disable_omit_stack_trace.rst Set Database Buffer Pool Size diff --git a/source/installguide/hypervisor/kvm.rst b/source/installguide/hypervisor/kvm.rst index 9f22777c1b..5c0ec09a48 100644 --- a/source/installguide/hypervisor/kvm.rst +++ b/source/installguide/hypervisor/kvm.rst @@ -355,25 +355,7 @@ Limit Resources For the Agent Service sudo systemctl restart cloudstack-agent -Disable Omit Stack Trace -^^^^^^^^^^^^^^^^^^^^^^^^ - -The JVM, by default stops printing some stack traces in the logs. To enable printing full stack traces at all times: - -#. Edit the cloudstack-agent.service configuration file at: - - .. code:: bash - - /etc/default/cloudstack-agent - -#. Add the command-line parameter -XX:-OmitStackTraceInFastThrow to disable the omit stack trace flag in the JVM so that all - the stack traces are always printed on the logs. This flag is enabled by default in the JVM to omit the stack traces - for certain exceptions that are thrown frequently. Printing of the stack traces might impact performance, and is not - recommended for production, so it's better to disable this flag for troubleshooting or debugging purposes when required. - - .. code:: bash - - JAVA_OPTS="... -XX:-OmitStackTraceInFastThrow" +.. include:: ../../adminguide/tuning/disable_omit_stack_trace.rst Configure CPU model for KVM guest (Optional)