Databases Reference
In-Depth Information
(continued)
Each independent computer is called a node .
For the purposes of this topic, unless we're discussing custom hardware, we'll define
nodes as containing a single logical processor called a CPU . Each node has its own
local RAM and disk. The CPU may in fact be implemented using multiple chips, each
with multiple core processors. The disk system may also be composed of several
independent drives.
Nodes are grouped together in racks that have high-bandwidth connections between
all the nodes within a rack. Racks are grouped together to form a database cluster
within a data center. A single data center location may contain many database clus-
ters. Note that some NoSQL transactions must store their data on two nodes in dif-
ferent geographic locations to be considered successful transactions.
2.3
Speeding performance by strategic use
of RAM, SSD, and disk
How do NoSQL systems use different types of memory to increase system perfor-
mance? Generally, traditional database management systems weren't concerned with
memory management optimization. In contrast, NoSQL systems are designed to be
cost effective when creating fast user response times by minimizing the amount of
expensive resources you need.
If you're new to database architectures, it's good to start with a clear understand-
ing about the difference in performance between queries that retrieve their data from
RAM (volatile random access memory) and queries that retrieve their data from hard
drives. Most people know that when they turn off their computer after a long work
day, the data in RAM is erased and must be reloaded. Data on solid state drives ( SSD s)
and hard disk drives ( HDD s) persists. We also know that RAM access is fast and, in com-
parison, disk access is much slower. Let's assume 1 nanosecond is equal to approxi-
mately a foot, which is in fact roughly the time it takes for light to travel one foot. That
means your RAM is 10 feet away from you, but your hard drive is over 10 million feet
away, or about 2,000 miles. If you use a solid state disk, the result is slower than RAM ,
but not nearly as slow as a spinning disk drive (see figure 2.5).
Let's start by putting you in the city of Chicago, Illinois. If you want to get some-
thing from your RAM , you can usually find it in your back yard. If you're lucky enough
to have data stored in a solid state disk, you can find it by making a quick trip some-
where in your neighborhood. But if you want to get something from your hard drive,
you'll need to go to the city of Los Angeles, California, which is about 2,000 miles
away. Not a round trip you want to make often if you can avoid it.
Rather than drive all the way to Los Angeles and back, what if you could check
around your neighborhood to see if you already have the data? The time it takes to do
a calculation in a chip today is roughly the time it takes light to travel across the chip.
Search WWH ::




Custom Search