Micro Mart - 10 March 2016_

(Nancy Kaufman) #1

20 Issue 1404


In a terminal, type:

sudo nano /etc/cron.daily/fstrim

Use the cursor keys to move around, backspace or delete to edit
lines, and Ctrl+o to save, followed by Ctrl+X to exit.
Edit the line that starts ‘exec fstrim-all’ toread ‘exec fstrim-all –
no-model-check’.
This method is to be preferred to setting dynamic trim by adding
the discard option in fstab entries, which can cause slowdown on
current kernels.


PreventDatestamping
atime is the access time option. When enabled, this means that the
datestamp on each file is updated every time it is accessed, which
adds to unwanted writes. It can be disabled by editing the /etc/fstab
file entry for the SSD.
Toedit the /etc/fstab file, first back up the fstab file in case of
problems, using the following command:


cp /etc/fstab /etc/fstab.bak

Then to edit it:

sudo nano /etc/fstab

Now, make the following changes to each SSD drive entry.
If relatime is present,remove it, and add noatime. The entries
may look like this:


/dev/sda1 / ext4 relatime,errors=remount-ro
0 1


...or this:

/ was on /dev/sda1 during installation


UUID=77d591aa-23d0-4470-9c67-06295454be7a /
ext4 relatime,errors=remount-ro 0 1


Either way, edit the options separated by commas like this:

noatime,errors=remount-ro 0 1

MoveSystemCacheTo RAM
While we’re looking at the fstab file, there’s another change that
can be made. The system cache is stored in /tmp, which is inroot.
By default, this is flushed on every boot. If you have 4GB or more
of RAM, it can be moved to RAM, whichreduces disk writes and
improves access times.
Add this line to the bottom of the fstab:


tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0

Save the fstab file andreboot to apply these changes.

SSDs:AShortGuide
SSDs have changed immensely over the last few years. For
example, ‘wear levelling’ ensures that writes are applied
evenly over the memory cells, and initial problems with
drive partitioning and operating system incompatibilities
have been overcome. Prices have dropped steadily, while
capacity has increased.
Of course, what follows is grossly simplified, and there
are many other factors that can affect performance and
longevity. As the market develops, new ways of optimising
memory cells are emerging. Firmware in controllers and
software in operating systems continues to improve, as do
manufacturing processes.
There are currently three main types of SSD: SLC, MLC
and TLC.

SLC
These are single-level cell devices, which means they
store one bit of data per memory cell. This gives higher
sequential and random data read and write speeds, faster
access times and a longer life for the device, as they can
tolerate a larger number of write operations. This comes
at a cost, however, which means they’re mainly used for
enterprise applications in servers.

MLC
MLC stands for multi-level cell. Most SSDs sold for general
use are MLC. In these devices, the voltage output level
of each cell can be used to represent more than one bit,
enabling it to store two bits per cell. This reduces the
manufacturing costs but slightly reduces read/write speeds
and increases access time. The life of an MLC device is
roughly two thirds of that of an SLC device, which is still
about four times that of a typical mechanical hard drive.

TLC
TLC devices use triple-level cells, which reduces the price
further, but at the cost of lower speeds and a shorter life.

Mixing It Up
In addition to these basic forms, hybrid devices use a mix
of these three types of memory cells.
SLC SSDs have cells that can be flipped between SLC
and MLC modes depending on storage requirements,
essentially operating as SLC until the drive starts to fill
up past the 50% mark. This increases speed and lifespan,
while still keeping the costs down. These are often used
for embedded applications, such as in printers, where the
full capacity is seldom used. I purchased one of these,
which was ideal for my choice of OS.
There are other types of hybrids emerging. For example,
some use SLC for a high-speed cache and TLC for longer-
term storage.
Other types of solid-state memory worth mentioning
are SD cards and eMMC (Embedded MultiMediaCard).
Most phones, tablets, and Chromebooks (including
convertibles often sold as laptop replacements) use
eMMC modules for storage. They’re more like SD card
memory than a true SSD. Although they’re faster thana
mechanical drive, SD cards are slower than a true SSD and
are not as well suited to the frequent write cycles ofa
typical PC.

Even a standard Linux


distro can easily fit in 8GB


or less



Free download pdf