Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion source/adminguide/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ Tuning
.. toctree::
:maxdepth: 4

tuning
tuning/tuning


Events and Troubleshooting
Expand Down
55 changes: 55 additions & 0 deletions source/adminguide/tuning/disable_omit_stack_trace.rst
Original file line number Diff line number Diff line change
@@ -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"
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ For more information about memory issues, see "FAQ: Memory" at `Tomcat
Wiki. <http://wiki.apache.org/tomcat/FAQ/Memory>`_


.. include:: disable_omit_stack_trace.rst


Set Database Buffer Pool Size
-----------------------------

Expand Down
47 changes: 47 additions & 0 deletions source/installguide/hypervisor/kvm.rst
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,53 @@ 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

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.

.. 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 resource controls:

.. code:: bash

sudo systemctl daemon-reload
sudo systemctl restart cloudstack-agent


.. include:: ../../adminguide/tuning/disable_omit_stack_trace.rst


Configure CPU model for KVM guest (Optional)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down