Skip to content

Commit 4cf19d1

Browse files
Updated configuration details for Management and KVM Agent services
1 parent 4ec617b commit 4cf19d1

File tree

2 files changed

+86
-0
lines changed

2 files changed

+86
-0
lines changed

source/adminguide/tuning.rst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,27 @@ For more information about memory issues, see "FAQ: Memory" at `Tomcat
5757
Wiki. <http://wiki.apache.org/tomcat/FAQ/Memory>`_
5858

5959

60+
Disable Omit Stack Trace
61+
------------------------
62+
63+
JVM by default stop printing some stack traces in the logs. To enable print stack traces always:
64+
65+
#. Edit the cloudstack-management.service configuration file at:
66+
67+
.. code:: bash
68+
69+
/etc/default/cloudstack-management
70+
71+
#. Add the command-line parameter -XX:-OmitStackTraceInFastThrow to disable omit stack trace flag in JVM so that all
72+
the stack traces are always printed on the logs. This flag is enabled by default in JVM to omit the stack traces
73+
for certain exceptions that are thrown frequently. Printing of the stack traces might impact performance, and is not
74+
recommended for production, so it's better to disable this flag for troubleshooting or debugging purposes when required.
75+
76+
.. code:: bash
77+
78+
JAVA_OPTS="... -XX:-OmitStackTraceInFastThrow"
79+
80+
6081
Set Database Buffer Pool Size
6182
-----------------------------
6283

source/installguide/hypervisor/kvm.rst

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,71 @@ sudoers file:
310310
cloudstack ALL=NOPASSWD: /usr/bin/cloudstack-setup-agent
311311
Defaults:cloudstack !requiretty
312312
313+
Limit Resources For the Agent Service
314+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
315+
316+
#. Edit the cloudstack-agent.service file at:
317+
318+
.. code:: bash
319+
320+
/usr/lib/systemd/system/cloudstack-agent.service
321+
322+
#. You can set the following resource controls in the cloudstack-agent service:
323+
324+
- Limit the number of file descriptors
325+
326+
Default configuration is usually higher, set to lower number explicitly when required. It is observed
327+
that the average FDs for a host with 40 VMs was 380, we can reserve +20% based on the requirement.
328+
329+
Example:
330+
.. code:: bash
331+
332+
LimitNOFILE=1500
333+
334+
- Limit the memory usage
335+
336+
You can limit the memory usage. For example, set to 2500MB (2500 * 1024 * 1024 bytes) as shown below.
337+
338+
.. code:: bash
339+
340+
MemoryMax=2500M
341+
342+
- Limit the CPU quota
343+
344+
You can control the CPU allocation. For example,set to allow 2 full cores worth of CPU time as shown below.
345+
346+
.. code:: bash
347+
348+
CPUQuota=200%
349+
350+
#. Reload and restart the cloudstack-agent service after changing any of the controls:
351+
352+
.. code:: bash
353+
354+
sudo systemctl daemon-reload
355+
sudo systemctl restart cloudstack-agent
356+
357+
358+
Disable Omit Stack Trace
359+
^^^^^^^^^^^^^^^^^^^^^^^^
360+
361+
JVM by default stop printing some stack traces in the logs. To enable print stack traces always:
362+
363+
#. Edit the cloudstack-agent.service configuration file at:
364+
365+
.. code:: bash
366+
367+
/etc/default/cloudstack-agent
368+
369+
#. Add the command-line parameter -XX:-OmitStackTraceInFastThrow to disable omit stack trace flag in JVM so that all
370+
the stack traces are always printed on the logs. This flag is enabled by default in JVM to omit the stack traces
371+
for certain exceptions that are thrown frequently. Printing of the stack traces might impact performance, and is not
372+
recommended for production, so it's better to disable this flag for troubleshooting or debugging purposes when required.
373+
374+
.. code:: bash
375+
376+
JAVA_OPTS="... -XX:-OmitStackTraceInFastThrow"
377+
313378
314379
Configure CPU model for KVM guest (Optional)
315380
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)