Instructor: In this lesson, we're going to talk about
drive performance issues,
specifically, about the smart diagnostic tool
and a metric known as
the input output operations per second.
First, let's talk about SMART.
Now, SMART is an acronym and SMART stands for
the Self-Monitoring Analysis and Reporting Technology.
And it's built into most hard disk drives
that you're going to be using on a daily basis.
Now, this smart technology is actually
a self-diagnostic program that's going to alert
the operating system if it detects
that there's a failure that's occurred
or if a failure is eminent.
Now, the smart system has been around
for about 20 to 30 years,
and it started out in hard disk drives,
but has also been migrated into solid state devices.
This SMART technology is something that's going to compliment
your operating system, your BIOS, your UEFI
and other systems like that.
The whole idea with SMART is
that it can then monitor your hard drive
and be able to understand the health status
of that particular drive.
As it looks at it, it's going to be looking at things like
the temperature of the drive, the drives overall health,
how fast it's spinning if you're dealing
with a hard disk drive,
how many bad blocks there are if you're dealing
with a solid-state device and things like that.
Now, the important thing to remember with SMART is
that it's not designed to keep your drives healthy.
Instead, it's designed to identify
when they're having problems
and when they might be failing in the future.
So keep this in mind.
Their goal here is not to be able to fix your drive
but simply to monitor and figure out
when something bad is about to happen.
This self-monitoring, analysis
and reporting technology is designed to measure lots
of different attributes about your hard drive
and your solid-state devices.
For example, it can monitor things like
your read error rate, the spin-up time of the hard disc,
the reallocated sectors count, the seek error rate,
the power-on hours, high temperature alerts,
and other things like this.
By monitoring all these different pieces of information,
the SMART utility is able to notify the operating system
of any pending issues
or problems that may exist in the future.
Now, one of the metrics that the SMART utility
is monitoring is known as your input output operations
per second or IOPS.
Now, IOPS is a really important metric
to be able to look at on a system.
Because as you're measuring how fast things can be inputted
or outputted to a storage device,
this is one of the key metrics for performance
that you need to understand when dealing with storage.
Now, if you're comparing a hard disk drive
to a solid-state device,
generally you're going to have much lower IOPS
on a hard disk drive than you will on a solid-state device.
This is because a solid-state device
has much faster seek times because it doesn't have to move
a platter around to be able to read that information,
but that is not always the case.
There are some very inexpensive
and cheaply made SSDs that have much lower IOPS counts
than do some really fast hard disk drives.
So you have to remember that not everything is clear cut
where solid-state devices are always faster
than hard drives, but that is a good general rule.
So keep this in mind.
If you're working in the cloud,
you don't actually have access to the underlying storage.
So the only way you can measure performance is
by measuring the IOPS,
which is the input output operations per second,
because you don't know if they're using hard disk drives
or solid-state devices underneath that storage layer,
because it's being abstracted from you
when you're using virtualization and cloud computing.
And this is why we like to look at the IOPS number
or that input output operations per second,
because this is the best measure of performance we have
when we are reading and writing data
to a particular storage device.
Now, if you start seeing that your overall performance
is going down when you're talking about your storage devices
and you measure your IOPS
and you see that number is going down as well,
this indicates you're having some sort of
a bottleneck reading and writing to those storage devices.
This could be an issue with the hardware
or it could be an issue with the software.
You'd have to look into that and be able to determine that
by using tools like the SMARt utilities
to be able to determine is the drive reading
and writing at the right speed,
or is it the operating system that's actually slowing down
and not able to read and write
to the device as fast as it needs to?
And this is why it's important to look at things
holistically because a low input output operations
per second could be an issue with the hardware,
or it could be something with the application
or the general system resources that are being overloaded
because of a lot of other things that are happening
on that particular system.
If you're experiencing slow performance
when it comes to storage,
some of the things you want to look at
on a hard disk drive would be
whether or not the files have become fragmented.
And if they have,
you're going to want to run a defragmentation tool.
This will be able to take all the pieces of those files
and put them back together
which will then reduce your read right times to that device.
This is because when you're writing to a hard disk drive,
it's going to start taking that file
that you're trying to write,
and it will break it up into smaller pieces.
Each of those pieces will be put onto the hard disk
starting at the beginning
and moving towards the end in any available space.
So I want you to think about a hard disk drive
like you would a book.
Let's say I gave you a blank book that has 200 pages in it.
That's all the storage you have, but you have a pencil,
and as you're writing in the book,
you start on page one and you keep writing
until you get to page 50.
Now, you went back to page three
and decided you didn't need stuff on that page.
So you erase that.
Now you have some empty space in that book.
You did the same thing on page seven and 12 and 15,
and you went through the book
and erase things you didn't need.
Now when you want to write something else down,
you're not going to start on page 51,
but you're going to go back to page three where you erased that
and fill in the blank.
Now, once you run out of space,
you're going to move to the next page that has blanks,
and you're going to keep doing that
until you get all the way back up to page 51,
and then you'll keep writing again.
That's how a hard drive works.
So if you have a lot of little files
that you've been deleting,
you now have a lot of little holes all over your drive.
And the next time you go to write something,
it's going to start filling in those holes.
But because you have to seek to those different places
to gain that whole file again,
this can lead to excessive read write times.
So to be able to bring that time back down,
you want to do what's called defragmentation.
Where it goes through and puts all those files back together
in the right order on the same pages.
And it can move things around the drive
and shuffle them around until everything
is nice and orderly again.
Over time though, that drive is going to get jumbled up again
because of all of this deleting
and rewriting that's occurring,
and that's where fragmentation happens.
As your drive becomes more fragmented,
this means you're going to have lower performance
when you're trying to seek or read data from that drive.
Now, luckily, as you move to a solid-state device,
fragmentation is no longer an issue,
because we can access everything on that drive
at any given time,
because we don't have to move the platter
to be able to access a particular part
of that drive and get the data back off.
So fragmentation is no longer an issue
with solid-state devices,
and you do not need to run defragmentation utilities
on a solid-state device.
But you do need to do it on a hard disk drive.
Now, on the other hand, with a solid-state device,
if you start running out of space
and you have decreased capacity,
you are going to notice that the drive
is going to start slowing down on you.
To be able to speed the drive back up,
you're going to have to move some of those files
off of that solid-state device and free up some extra space.
This is because of the way that a solid-state device works
that when it starts filling up
and having almost no free space,
that device will slow down
a lot in terms of its performance.
So I always recommend keeping at least 10%
of your solid-state device empty and free,
and this will make sure your performance stays high.