Ubuntu Unleashed 2019 Edition: Covering 18.04, 18.10, 19.04

(singke) #1

Many Linux users love to tinker under the hood to increase the performance
of their computers, and Linux gives you some great tools to do that. Whereas
stability-loving nurturers generally tell us, “Don’t fix what’s not broken,”
(Robert Atkins) experiment-loving hot-rodders often say, “Fix it until it
breaks (Andrew Cartledge).” In this section, you learn about many of the
commands used to tune, or “tweak,” your file system.


Before you undertake any under-the-hood work with Linux, however, keep a
few points in mind. First, perform a benchmark on your system before you
begin. Linux does not offer a well-developed benchmarking application, and
availability of what exists changes rapidly. You can search online for the most
up-to-date information for benchmarking applications for Linux. If you are a
system administrator, you might choose to create your own benchmarking
tests. Second, remember to tweak only one thing at a time so you can tell
what works, what does not work, and what breaks things. Some of these
tweaks might not work or might lock up your machine, but if you are only
implementing them one at a time, you will find it much easier to reverse a
change that caused a problem.


Always have a working boot disc handy, such as the live Ubuntu CD or DVD.
Remember that you are personally assuming all risks for attempting any of
these tweaks. If you don’t understand what you are doing or are not confident
in your ability to revert any changes discussed here, do not attempt any of the
suggestions in this chapter. The default settings in Ubuntu work very well for
most people and really don’t need adjusting—just as most people can use and
enjoy their car just as it is. However, some people love taking apart their cars
and building hot-rods; they enjoy tweaking and breaking and fixing them.
This chapter is for that sort of person. If you don’t think you can fix it, don’t
risk breaking it.


Linux File Systems


Most of the options discussed in this chapter are for the ext2, ext3, or
ext4 file systems. The most common default in Ubuntu—and most other
current Linux distributions today—is ext4. In addition, although it is stable
and well known, ext3 is still quite common, and ext2 is considered legacy
but is still frequently encountered.


Both ext3 and ext4 are journaling file systems, which are much more
reliable than other file systems for data storage. A journaling file system
writes data changes first to a log in a separate part of the drive. Once
journaled, the change is queued and performed in the background. This can
help prevent data corruption while also keeping data in a consistent state. If

Free download pdf