sites-boost-speed/. Be sure to set ex-
pire headers and cache control.
Page caching requires using a tech-
nology such as Varnish (https://www.
varnish-cache.org/). Think of this as
a mini Web server with high speed
and low overhead. It cannot handle
complex pages as Apache can, but it
can handle the very simple ones bet-
ter. It therefore sits in front of Apache
and reduces load, allowing Apache to
handle the more complex pages. This
is like a traffic cop letting the bikes go
through an intersection before turn-
ing full attention to the more complex
Object caching is done by some-
thing like memcache. Think of it as
a Post-it note for your application.
Each database access first checks the
object cache for current data and an-
swers to its questions. If it finds the
data it needs, it gets results 10 to 100
times faster, allowing it to construct
the page faster and return everything
to the user in the blink of an eye. If
it does not find the data it needs, or
finds only part of it, then it will make
database requests and put those re-
sults in memcache for later sessions
to enjoy and benefit from.
3. Slow Disk I/O, RAID 5, Multiten-
ant Storage. Everything, everything,
everything in a database is con-
strained by storage—not by the size or
space of that storage but by how fast
data can be written to those devices.
If you are using physical servers,
watch out for RAID 5, a type of RAID
(redundant array of independent
disks) that uses one disk for both par-
ity and protection. It comes with a
huge write penalty, however, which
you must always carry. What’s more, if
you lose a drive, these arrays are unus-
ably slow during rebuild.
The solution is to start with RAID 10,
which gives you striping over mirrored
sets. This results in no parity calcula-
tion and no penalty during a rebuild.
Cloud environments may work with
technology such as Amazon EBS (Elas-
tic Block Store), a virtualized disk sim-
ilar to a storage area network. Since it
is network based, you must contend
and compete with other tenants (aka
customers) reading and writing to that
storage. Further, those individual disk
arrays can handle only so much read-
ing and writing, so your neighbors will
affect the response time of your web-
site and application.
Recently Amazon rolled out a badly
branded offering called Provisioned
IOPS (I/O operations per second).
That might sound like a great name
to techies, but to everyone else it does
not mean anything noteworthy. It is
nonetheless important. It means you
can lock in and guarantee the disk per-
formance your database is thirsty for.
If you are running a database on Ama-
zon, then definitely take a look at this.
4. Serial Processing. When customers are waiting to check out in a grocery store with 10 cash registers open,
that is working in parallel. If every cashier is taking a lunch break and only