1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134
|
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>8.8. Temporary Data</title>
<link rel="stylesheet" href="../stylesheets/icinga-docs.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
<meta name="keywords" content="Supervision, Icinga, Nagios, Linux">
<link rel="home" href="index.html" title="Icinga Version 1.14 Documentation">
<link rel="up" href="ch08.html" title="Chapter 8. Security and Performance Tuning">
<link rel="prev" href="perfgraphs.html" title="8.7. Graphing Performance Info With PNP4Nagios">
<link rel="next" href="ch09.html" title="Chapter 9. Integration With Other Software">
<script src="../js/jquery-min.js" type="text/javascript"></script><script src="../js/icinga-docs.js" type="text/javascript"></script>
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<CENTER><IMG src="../images/logofullsize.png" border="0" alt="Icinga" title="Icinga"></CENTER>
<div class="navheader">
<table width="100%" summary="Navigation header">
<tr><th colspan="3" align="center">8.8. Temporary Data</th></tr>
<tr>
<td width="20%" align="left">
<a accesskey="p" href="perfgraphs.html">Prev</a> </td>
<th width="60%" align="center">Chapter 8. Security and Performance Tuning</th>
<td width="20%" align="right"> <a accesskey="n" href="ch09.html">Next</a>
</td>
</tr>
</table>
<hr>
</div>
<div class="section" title="8.8. Temporary Data">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="temp_data"></a>8.8. <a name="temp-data"></a>Temporary Data</h2></div></div></div>
<p>Several files are created while starting Icinga and processed very often during runtime. Depending on the size of your
configuration this may lead to high I/O and therefore degraded responsiveness. To reduce physical I/O operations it might be a good idea
to place temporary files on a RAM disk. The following lines show the steps to setup a RAM disk and the changes to the main config
file.</p>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p>Please keep in mind that these files will be lost if you reboot the system. Also note that sometimes it is difficult to determine
the size of these files which may lead to a full RAM disk.</p>
</td></tr>
</table></div>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<p>Have a look at the current location of the <a class="link" href="configmain.html#configmain-status_file">status file</a> (e.g.
<code class="filename">/usr/local/icinga/var/status.dat</code>) and the <a class="link" href="configmain.html#configmain-object_cache_file">object cache file</a>
(e.g. <code class="filename">/usr/local/icinga/var/objects.cache</code>) and determine the size of both files. Add the size of the status file
for temporary data (<a class="link" href="configmain.html#configmain-temp_file">temp_file</a>).</p>
<pre class="programlisting"> #> ls -la /usr/local/icinga/var/
-rw-rw-r-- 1 icinga icinga 8.2M Jun 10 11:57 status.dat
-rw-r--r-- 1 icinga icinga 5.9M Jun 10 11:58 objects.cache</pre>
</li>
<li class="listitem">
<p>Increase the number to a considerable value to allow for future growth (100 MB should be sufficient in this case) and create the
RAM disk. </p>
<div class="caution" title="Caution" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Caution">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Caution]" src="../images/caution.png"></td>
<th align="left">Caution</th>
</tr>
<tr><td align="left" valign="top">
<p>If the value is too high then this will throttle your system because it will start to swap resulting in physical I/O once
again.</p>
</td></tr>
</table></div>
<pre class="programlisting"> #> mkdir /var/icinga/ramdisk
#> mount -t tmpfs tmpfs /var/icinga/ramdisk -o size=100m
#> chown icinga:icinga /var/icinga/ramdisk</pre>
<p>Adapt the values of user and group to the ones found in your configuration if
necessary.</p>
</li>
<li class="listitem">
<p>Add an entry to <code class="filename">/etc/fstab</code> to make the setting permanent so the RAM disk will be created automatically
after the next reboot.</p>
<pre class="programlisting">tmpfs /var/icinga/ramdisk tmpfs size=100m 0 0</pre>
</li>
<li class="listitem">
<p>Edit the Icinga main configuration file and change the setting of the appropriate directives</p>
<pre class="programlisting"> #object_cache_file=/usr/local/icinga/var/objects.cache
object_cache_file=/var/icinga/ramdisk/objects.cache
#status_file=/usr/local/icinga/var/status.dat
status_file=/var/icinga/ramdisk/status.dat
#temp_file=/usr/local/icinga/var/icinga.tmp
temp_file=/var/icinga/ramdisk/icinga.tmp</pre>
</li>
<li class="listitem">
<p>Restart Icinga to put the changes into effect</p>
<pre class="programlisting"> #> /etc/init.d/icinga restart</pre>
</li>
</ol></div>
<p>You may want to use the RAM disk for other files like the check results as well. Please increase the size of the RAM disk if
necessary and change the directive in the main config file</p>
<pre class="programlisting"> check_result_path=/var/icinga/ramdisk/checkresults</pre>
<p>
Please make sure that addons like check_mk are aware of this change.</p>
<a class="indexterm" name="idm140381622871776"></a>
<a class="indexterm" name="idm140381622870608"></a>
<a class="indexterm" name="idm140381622871648"></a>
<a class="indexterm" name="idm140381622868176"></a>
</div>
<div class="navfooter">
<hr>
<table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left">
<a accesskey="p" href="perfgraphs.html">Prev</a> </td>
<td width="20%" align="center"><a accesskey="u" href="ch08.html">Up</a></td>
<td width="40%" align="right"> <a accesskey="n" href="ch09.html">Next</a>
</td>
</tr>
<tr>
<td width="40%" align="left" valign="top">8.7. Graphing Performance Info With PNP4Nagios </td>
<td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td>
<td width="40%" align="right" valign="top"> Chapter 9. Integration With Other Software</td>
</tr>
</table>
</div>
<P class="copyright">© 1999-2009 Ethan Galstad, 2009-2017 Icinga Development Team, https://www.icinga.com</P>
</body>
</html>
|