|
Lines 2228-2233
Link Here
|
| 2228 |
</note> |
2228 |
</note> |
| 2229 |
</sect3> |
2229 |
</sect3> |
| 2230 |
</sect2> |
2230 |
</sect2> |
|
|
2231 |
|
| 2232 |
<sect2> |
| 2233 |
<title>Virtual Memory</title> |
| 2234 |
|
| 2235 |
<sect3> |
| 2236 |
<title><varname>kern.maxvnodes</varname></title> |
| 2237 |
|
| 2238 |
<para>A vnode is the internal representation of a file or |
| 2239 |
directory. So increasing the number of vnodes avaliable to |
| 2240 |
the operating system cuts down on disk I/O. Normally this |
| 2241 |
is handled by the operating system and does not need to be |
| 2242 |
changed. In some cases where disk I/O is a bottleneck and |
| 2243 |
the system is running out of vnodes, this setting will need |
| 2244 |
to be increased. The amount of inactive and free RAM will |
| 2245 |
need to be taken into account.</para> |
| 2246 |
|
| 2247 |
<para>To see the current number of vnodes in use:</para> |
| 2248 |
|
| 2249 |
<programlisting>&prompt.root; sysctl vfs.numvnodes |
| 2250 |
vfs.numvnodes: 91349</programlisting> |
| 2251 |
|
| 2252 |
<para>To see the maximum vnodes:</para> |
| 2253 |
|
| 2254 |
<programlisting>&prompt.root; sysctl kern.maxvnodes |
| 2255 |
kern.maxvnodes: 100000</programlisting> |
| 2256 |
|
| 2257 |
<para>If the current vnode usage is near the maximum, upping |
| 2258 |
<varname>kern.maxvnodes</varname> by a 1,000 is probably a |
| 2259 |
good idea. Keep an eye on the number of |
| 2260 |
<varname>vfs.numvnodes</varname>. If it climbs up to the |
| 2261 |
maximum again, <varname>kern.maxvnodes</varname> will need to |
| 2262 |
be increased further. A shift in your memory usage as |
| 2263 |
reported by &man.top.1; should be visable. More memory should |
| 2264 |
be active.</para> |
| 2265 |
</sect3> |
| 2266 |
</sect2> |
| 2231 |
</sect1> |
2267 |
</sect1> |
| 2232 |
|
2268 |
|
| 2233 |
<sect1 id="adding-swap-space"> |
2269 |
<sect1 id="adding-swap-space"> |