Incorporate 12.2 Initial Configuration - Partition Layout into
2.7 Allocating Disk Space. Sponsored by: iXsystems
This commit is contained in:
parent
4fe406539c
commit
35d930b925
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=44296
2 changed files with 98 additions and 140 deletions
|
@ -1232,6 +1232,104 @@ Trying to mount root from cd9660:/dev/iso9660/FREEBSD_INSTALL [ro]...</screen>
|
|||
</mediaobject>
|
||||
</figure>
|
||||
|
||||
<para>This section describes what to consider when laying
|
||||
out the disk partitions. It then demonstrates how to use both
|
||||
the Guided Partitioning and Manual Partitioning screens.</para>
|
||||
|
||||
<sect2 xml:id="configtuning-initial">
|
||||
<title>Designing the Partition Layout</title>
|
||||
|
||||
<indexterm><primary>partition layout</primary></indexterm>
|
||||
<indexterm>
|
||||
<primary><filename>/etc</filename></primary>
|
||||
</indexterm>
|
||||
<indexterm>
|
||||
<primary><filename>/var</filename></primary>
|
||||
</indexterm>
|
||||
<indexterm>
|
||||
<primary><filename>/usr</filename></primary>
|
||||
</indexterm>
|
||||
|
||||
<para>When laying out file systems, remember that hard drives transfer data
|
||||
faster from the outer tracks to the inner. Thus, smaller
|
||||
and heavier-accessed file systems should be closer to the
|
||||
outside of the drive, while larger partitions like
|
||||
<filename>/usr</filename> should be placed toward the inner
|
||||
parts of the disk. It is a good idea to create partitions
|
||||
in an order similar to: <filename>/</filename>, swap,
|
||||
<filename>/var</filename>, and
|
||||
<filename>/usr</filename>.</para>
|
||||
|
||||
<para>The size of the <filename>/var</filename> partition
|
||||
reflects the intended machine's usage. This partition is
|
||||
used to hold mailboxes, log files, and printer spools.
|
||||
Mailboxes and log files can grow to unexpected sizes
|
||||
depending on the number of users and how long log files are
|
||||
kept. On average, most users rarely need more than about a
|
||||
gigabyte of free disk space in
|
||||
<filename>/var</filename>.</para>
|
||||
|
||||
<note>
|
||||
<para>Sometimes, a lot of disk space is required in
|
||||
<filename>/var/tmp</filename>. When new software is
|
||||
installed, the packaging tools
|
||||
extract a temporary copy of the packages under
|
||||
<filename>/var/tmp</filename>. Large software packages,
|
||||
like <application>Firefox</application>,
|
||||
<application>OpenOffice</application> or
|
||||
<application>LibreOffice</application> may be tricky to
|
||||
install if there is not enough disk space under
|
||||
<filename>/var/tmp</filename>.</para>
|
||||
</note>
|
||||
|
||||
<para>The <filename>/usr</filename> partition holds many of
|
||||
the files which support the system, including the &os; Ports
|
||||
Collection and system source code. At least 2 gigabytes is
|
||||
recommended for this partition.</para>
|
||||
|
||||
<para>When selecting partition sizes, keep the space
|
||||
requirements in mind. Running out of space in one partition
|
||||
while barely using another can be a hassle.</para>
|
||||
|
||||
<indexterm>
|
||||
<primary>swap sizing</primary>
|
||||
</indexterm>
|
||||
<indexterm>
|
||||
<primary>swap partition</primary>
|
||||
</indexterm>
|
||||
|
||||
<para>As a rule of thumb, the swap partition should be about
|
||||
double the size of physical memory (<acronym>RAM</acronym>).
|
||||
Systems with minimal <acronym>RAM</acronym> may perform
|
||||
better with more swap. Configuring too little swap can
|
||||
lead to inefficiencies in the <acronym>VM</acronym> page
|
||||
scanning code and might create issues later if more memory
|
||||
is added.</para>
|
||||
|
||||
<para>On larger systems with multiple <acronym>SCSI</acronym>
|
||||
disks or multiple <acronym>IDE</acronym> disks operating
|
||||
on different controllers, it is recommended that swap be
|
||||
configured on each drive, up to four drives. The swap
|
||||
partitions should be approximately the same size. The
|
||||
kernel can handle arbitrary sizes but internal data
|
||||
structures scale to 4 times the largest swap partition.
|
||||
Keeping the swap partitions near the same size will allow
|
||||
the kernel to optimally stripe swap space across disks.
|
||||
Large swap sizes are fine, even if swap is not used much.
|
||||
It might be easier to recover from a runaway program before
|
||||
being forced to reboot.</para>
|
||||
|
||||
<para>By properly partitioning a system, fragmentation
|
||||
introduced in the smaller write heavy partitions will not
|
||||
bleed over into the mostly read partitions. Keeping the
|
||||
write loaded partitions closer to the disk's edge will
|
||||
increase I/O performance in the partitions where it occurs
|
||||
the most. While I/O performance in the larger partitions
|
||||
may be needed, shifting them more toward the edge of the
|
||||
disk will not lead to a significant performance improvement
|
||||
over moving <filename>/var</filename> to the edge.</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 xml:id="bsdinstall-part-guided">
|
||||
<title>Guided Partitioning</title>
|
||||
|
||||
|
|
|
@ -60,11 +60,6 @@
|
|||
<para>After reading this chapter, you will know:</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>How to efficiently work with file systems and swap
|
||||
partitions.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>The basics of <filename>rc.conf</filename> configuration
|
||||
and <filename>/usr/local/etc/rc.d</filename> startup
|
||||
|
@ -110,141 +105,6 @@
|
|||
</itemizedlist>
|
||||
</sect1>
|
||||
|
||||
<sect1 xml:id="configtuning-initial">
|
||||
<title>Initial Configuration</title>
|
||||
|
||||
<sect2>
|
||||
<title>Partition Layout</title>
|
||||
|
||||
<indexterm><primary>partition layout</primary></indexterm>
|
||||
<indexterm>
|
||||
<primary><filename>/etc</filename></primary>
|
||||
</indexterm>
|
||||
<indexterm>
|
||||
<primary><filename>/var</filename></primary>
|
||||
</indexterm>
|
||||
<indexterm>
|
||||
<primary><filename>/usr</filename></primary>
|
||||
</indexterm>
|
||||
|
||||
<sect3>
|
||||
<title>Base Partitions</title>
|
||||
|
||||
<para>When laying out file systems with &man.bsdlabel.8; or
|
||||
&man.sysinstall.8;, remember that hard drives transfer data
|
||||
faster from the outer tracks to the inner. Thus, smaller
|
||||
and heavier-accessed file systems should be closer to the
|
||||
outside of the drive, while larger partitions like
|
||||
<filename>/usr</filename> should be placed toward the inner
|
||||
parts of the disk. It is a good idea to create partitions
|
||||
in an order similar to: <filename>/</filename>, swap,
|
||||
<filename>/var</filename>, and
|
||||
<filename>/usr</filename>.</para>
|
||||
|
||||
<para>The size of the <filename>/var</filename> partition
|
||||
reflects the intended machine's usage. This partition is
|
||||
used to hold mailboxes, log files, and printer spools.
|
||||
Mailboxes and log files can grow to unexpected sizes
|
||||
depending on the number of users and how long log files are
|
||||
kept. On average, most users rarely need more than about a
|
||||
gigabyte of free disk space in
|
||||
<filename>/var</filename>.</para>
|
||||
|
||||
<note>
|
||||
<para>Sometimes, a lot of disk space is required in
|
||||
<filename>/var/tmp</filename>. When new software is
|
||||
installed with &man.pkg.add.1;, the packaging tools
|
||||
extract a temporary copy of the packages under
|
||||
<filename>/var/tmp</filename>. Large software packages,
|
||||
like <application>Firefox</application>,
|
||||
<application>OpenOffice</application> or
|
||||
<application>LibreOffice</application> may be tricky to
|
||||
install if there is not enough disk space under
|
||||
<filename>/var/tmp</filename>.</para>
|
||||
</note>
|
||||
|
||||
<para>The <filename>/usr</filename> partition holds many of
|
||||
the files which support the system, including the &os; Ports
|
||||
Collection and system source code. At least 2 gigabytes is
|
||||
recommended for this partition.</para>
|
||||
|
||||
<para>When selecting partition sizes, keep the space
|
||||
requirements in mind. Running out of space in one partition
|
||||
while barely using another can be a hassle.</para>
|
||||
|
||||
<note>
|
||||
<para>The <literal>Auto-defaults</literal> partition sizer
|
||||
used by &man.sysinstall.8; will sometimes select smaller
|
||||
than adequate <filename>/var</filename> and
|
||||
<filename>/</filename> partitions. Partition wisely and
|
||||
generously.</para>
|
||||
</note>
|
||||
</sect3>
|
||||
|
||||
<sect3 xml:id="swap-design">
|
||||
<title>Swap Partition</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>swap sizing</primary>
|
||||
</indexterm>
|
||||
<indexterm>
|
||||
<primary>swap partition</primary>
|
||||
</indexterm>
|
||||
|
||||
<para>As a rule of thumb, the swap partition should be about
|
||||
double the size of physical memory (<acronym>RAM</acronym>)
|
||||
as the kernel's virtual memory (<acronym>VM</acronym>)
|
||||
paging algorithms are tuned to perform best when the swap
|
||||
partition is at least two times the size of main memory.
|
||||
Systems with minimal <acronym>RAM</acronym> may perform
|
||||
better with more swap. Configuring too little swap can
|
||||
lead to inefficiencies in the <acronym>VM</acronym> page
|
||||
scanning code and might create issues later if more memory
|
||||
is added.</para>
|
||||
|
||||
<para>On larger systems with multiple <acronym>SCSI</acronym>
|
||||
disks or multiple <acronym>IDE</acronym> disks operating
|
||||
on different controllers, it is recommended that swap be
|
||||
configured on each drive, up to four drives. The swap
|
||||
partitions should be approximately the same size. The
|
||||
kernel can handle arbitrary sizes but internal data
|
||||
structures scale to 4 times the largest swap partition.
|
||||
Keeping the swap partitions near the same size will allow
|
||||
the kernel to optimally stripe swap space across disks.
|
||||
Large swap sizes are fine, even if swap is not used much.
|
||||
It might be easier to recover from a runaway program before
|
||||
being forced to reboot.</para>
|
||||
</sect3>
|
||||
|
||||
<sect3>
|
||||
<title>Why Partition?</title>
|
||||
|
||||
<para>Several users think a single large partition will be
|
||||
fine, but there are several reasons why this is a bad idea.
|
||||
First, each partition has different operational
|
||||
characteristics and separating them allows the file system
|
||||
to tune accordingly. For example, the root and
|
||||
<filename>/usr</filename> partitions are read-mostly, with
|
||||
few writes, while a lot of reads and writes could occur in
|
||||
<filename>/var</filename> and
|
||||
<filename>/var/tmp</filename>.</para>
|
||||
|
||||
<para>By properly partitioning a system, fragmentation
|
||||
introduced in the smaller write heavy partitions will not
|
||||
bleed over into the mostly read partitions. Keeping the
|
||||
write loaded partitions closer to the disk's edge will
|
||||
increase I/O performance in the partitions where it occurs
|
||||
the most. While I/O performance in the larger partitions
|
||||
may be needed, shifting them more toward the edge of the
|
||||
disk will not lead to a significant performance improvement
|
||||
over moving <filename>/var</filename> to the edge. Finally,
|
||||
there are safety concerns. A smaller, neater root partition
|
||||
which is mostly read-only has a greater chance of surviving
|
||||
a bad crash.</para>
|
||||
</sect3>
|
||||
</sect2>
|
||||
</sect1>
|
||||
|
||||
<sect1 xml:id="configtuning-core-configuration">
|
||||
<title>Core Configuration</title>
|
||||
|
||||
|
|
Loading…
Reference in a new issue