Crucial’s Momentum Cache: The True Performance Results

On my gaming machine I have a 512GB Crucial MX100 as my boot drive (great drive by the way, great price/quality/performance ratio). The other day I launched the Crucial Storage Executive software to check the health information of the drive (all good by the way) and I noticed that I had not enabled an option called Momentum Cache.

If you look at the download page for the Storage Executive software, you see that this feature could allow you to increase the drive boost performance up to 10 times. Can Momentun Cache really improve your drive performance by this much? Let’s find out.

Continue reading

Add An LCD Screen To A Raspberry Pi Cluster

I have stumbled upon a very interesting article by Alasdair Allan today on how to build a Raspberry Pi cluster. It looks like one of the most clear and thorough ones on the topic, but what I absolutely want to try is adding an LCD screen to the cluster. Look at the final result:


This looks amazing and will definitely be one of my next projects. Make sure to give the original article a read, I’ll be sure to post something about this once I am done with the project.

Disappearing Unreadable Sectors In FreeNAS Drives

Some weeks ago I experienced something a bit weird on my FreeNAS system. I received an email at 02:40 AM with this content:

The volume Disk1 (ZFS) state is DEGRADED: One or more devices has been removed by the administrator. Sufficient replicas exist for the pool to continue functioning in a degraded state.

From the kernel log messages (also received via email) about half an hour later, I see that the first drive was disconnected:

ahcich0: Timeout on slot 26 port 0
ahcich0: is 00000000 cs 04000000 ss 00000000 rs 04000000 tfd c0 serr 00000000 cmd 0000fa17
(ada0:ahcich0:0:0:0): FLUSHCACHE48. ACB: ea 00 00 00 00 40 00 00 00 00 00 00
(ada0:ahcich0:0:0:0): CAM status: Command timeout
(ada0:ahcich0:0:0:0): Retrying command
ada0 at ahcich0 bus 0 scbus0 target 0 lun 0
ada0: <ST31000333AS SD35> s/n 6TE03QP9 detached
GEOM_ELI: Device ada0p1.eli destroyed.
GEOM_ELI: Detached ada0p1.eli on last close.
(ada0:ahcich0:0:0:0): Periph destroyed

Not a problem, I thought, luckily this is a mirrored volume so I will just put in another drive and I won’t lose anything (hoping that nothing goes wrong during the resilvering process of course). First, though, I took a backup of my data and, while doing so, I receive a third email:

Device: /dev/ada0, 10 Currently unreadable (pending) sectors
Device: /dev/ada0, 10 Offline uncorrectable sectors

This really looked like the drive’s life was coming to an end. At the end of the backup, however, I decided to play around with the system a bit as I had never seen a drive fail before in FreeNAS. So I force a scrub and I run short and long smart test on the drive. Boy was I surprised.

Continue reading

How To Deal With Checksum Errors In ZFS – FreeNAS

Some days ago I received an email from one of my FreeNAS boxes letting me know that a pool scrub was starting:

starting scrub of pool 'Disk1'

About 3 hours after this, I received another email with an excerpt from the kernel logs:

freenas.local kernel log messages:
(ada1:ahcich1:0:0:0): READ_FPDMA_QUEUED. ACB: 60 d8 80 df 4d 40 46 00 00 00 00 00
(ada1:ahcich1:0:0:0): CAM status: ATA Status Error
(ada1:ahcich1:0:0:0): ATA status: 51 (DRDY SERV ERR), error: 40 (UNC )
(ada1:ahcich1:0:0:0): RES: 51 40 98 df 4d 40 46 00 00 c0 00
(ada1:ahcich1:0:0:0): Retrying command
(ada1:ahcich1:0:0:0): READ_FPDMA_QUEUED. ACB: 60 d8 80 df 4d 40 46 00 00 00 00 00
(ada1:ahcich1:0:0:0): CAM status: ATA Status Error
(ada1:ahcich1:0:0:0): ATA status: 51 (DRDY SERV ERR), error: 40 (UNC )
(ada1:ahcich1:0:0:0): RES: 51 40 98 df 4d 40 46 00 00 c0 00
(ada1:ahcich1:0:0:0): Retrying command
(ada1:ahcich1:0:0:0): READ_FPDMA_QUEUED. ACB: 60 d8 80 df 4d 40 46 00 00 00 00 00
(ada1:ahcich1:0:0:0): CAM status: ATA Status Error
(ada1:ahcich1:0:0:0): ATA status: 51 (DRDY SERV ERR), error: 40 (UNC )
(ada1:ahcich1:0:0:0): RES: 51 40 98 df 4d 40 46 00 00 c0 00
(ada1:ahcich1:0:0:0): Retrying command
(ada1:ahcich1:0:0:0): READ_FPDMA_QUEUED. ACB: 60 d8 80 df 4d 40 46 00 00 00 00 00
(ada1:ahcich1:0:0:0): CAM status: ATA Status Error
(ada1:ahcich1:0:0:0): ATA status: 51 (DRDY SERV ERR), error: 40 (UNC )
(ada1:ahcich1:0:0:0): RES: 51 40 98 df 4d 40 46 00 00 c0 00
(ada1:ahcich1:0:0:0): Retrying command
(ada1:ahcich1:0:0:0): READ_FPDMA_QUEUED. ACB: 60 d8 80 df 4d 40 46 00 00 00 00 00
(ada1:ahcich1:0:0:0): CAM status: ATA Status Error
(ada1:ahcich1:0:0:0): ATA status: 51 (DRDY SERV ERR), error: 40 (UNC )
(ada1:ahcich1:0:0:0): RES: 51 40 98 df 4d 40 46 00 00 c0 00
(ada1:ahcich1:0:0:0): Error 5, Retries exhausted

-- End of security output --

Immediately followed by a third email, with a status summary of my pool:

Checking status of zfs pools:
Disk1   928G   494G   434G    53%  1.00x  ONLINE  /mnt

 pool: Disk1
state: ONLINE
status: One or more devices has experienced an unrecoverable error.  An
	attempt was made to correct the error.  Applications are unaffected.
action: Determine if the device needs to be replaced, and clear the errors
	using 'zpool clear' or replace the device with 'zpool replace'.
  see: http://illumos.org/msg/ZFS-8000-9P
 scan: scrub repaired 96K in 1h38m with 0 errors on Sun Aug  9 01:38:43 2015

	NAME                                            STATE     READ WRITE CKSUM
	Disk1                                           ONLINE       0     0     0
	  mirror-0                                      ONLINE       0     0     0
	    gptid/4f54a386-8f88-11e4-a049-009c02975356  ONLINE       0     0     0
	    gptid/62701945-eb48-11e4-bdc4-009c02975356  ONLINE       0     0     2

errors: No known data errors

-- End of daily output --

So the summary of the situation is that one of the two drives reported 2 checksum errors, and these are likely connected to the read errors reported by the kernel logs.

Often, this is because the drive is failing, but it could also be a SATA cable issue, or perhaps it could be something temporary. In my case, I was told that there had been a blackout recently, so when you see an output like this it doesn’t necessarily mean you need to go out and replace the disk straight away.

From the FreeNAS error message page:

ind the device with a non-zero error count for READ, WRITE, or CKSUM. This indicates that the device has experienced a read I/O error, write I/O error, or checksum validation error. Because the device is part of a mirror or RAID-Z device, ZFS was able to recover from the error and subsequently repair the damaged data.

If these errors persist over a period of time, ZFS may determine the device is faulty and mark it as such. However, these error counts may or may not indicate that the device is unusable. It depends on how the errors were caused, which the administrator can determine in advance of any ZFS diagnosis. For example, the following cases will all produce errors that do not indicate potential device failure:

  • A network attached device lost connectivity but has now recovered
  • A device suffered from a bit flip, an expected event over long periods of time
  • An administrator accidentally wrote over a portion of the disk using another program

In these cases, the presence of errors does not indicate that the device is likely to fail in the future, and therefore does not need to be replaced.

However, there are some things you can do to find out whether this is indeed a hard drive issue or not:

  1. Clear the error count:
    zpool clear pool_name

    This will reset all the read, write and checksum error counters.

  2. You can either wait for a while, wait for the next scrub to take place or, if you are impatient, you can force one immediately:
    zpool scrub pool_name
  3. Check the output of
    zpool status pool_name

    If the error counters are still 0, the issue you experienced was likely a temporary one. If no issue appears over the next few days, you hard drive should be fine for the foreseeable future.

  4. If you still see errors (or even if you really want to make sure everything is ok), you can check the SMART status of the drive. To run a short SMART check, type
    smartctl -t short /dev/ada0

    To run a long SMART check, type

    smartctl -t long /dev/ada0

    instead. Of course, replace


    with your drive identifier. Note: a short test will take a minute, a long test will take around 4 hours.

  5. Check the output of
    smartctl –a /dev/ada0

    for errors.

  6. At this point, if you don’t see any error messages, your drives might be ok. You can force a scrub again with
    zpool scrub pool_name

    and you should be good.

This is all to say that, even though this type of message usually points to a failing drive, it doesn’t necessarily have to be a hardware issue. Go through this list before deciding to buy a new drive and monitor the status of your system for a while after this happens for the first time to make sure this wasn’t just a temporary issue.

So How Much Power Does a Home ESXi Server Use After All?

I started wondering how much power my home ESXi host was really using, but I didn’t have any tool to measure the actual energy usage. So this week I took the plunge and bought a small energy monitor to take a few measurements. The results were pretty interesting.

The Hardware

  • Asus H81I-Plus motherboard
  • Intel Pentium G3220 CPU with stock cooler
  • 2 x 8 GB Kingston 1,333 MHz DDR3 Non-ECC RAM
  • 2 x Western Digital Red 2 TB drives
  • Corsair CX430 Power Supply

As you can see, nothing fancy, but enough to run a few VMs at the same time and do some decent testing (the CPU performs especially well for the price).

The Power Consumption

These are the results of the measurements I took over two days of usage. They don’t mean to be scientific: every value represent the average of the power consumption I could observe during the tests.

  • Booting the server: 40W
  • Idle, no VMs running: 30W
  • Booting 4 VMs: 40-45W
  • Idle, 4 VMs running: 30W
  • Plex streaming one movie: 40-42W at the beginning, back to 30-32W afterwards
  • Downloading one series of a TV show to a client machine: 36-37W
  • Uploading one series of a TV show to Plex: 34-38W
  • Uploading a 4GB ISO to the datastore: 35-37W
  • Creating a VM: 32W
  • Installing Windows 10 in a VM: about 35W, peak of 50W
  • 4 VMs idle + 1 Windows VM idle: 35-45W

So as you can see, the power consumption is very, very reasonable. I have also left the energy monitor plugged in for two days to measure the energy consumption for my typical usage. The total energy usage has been of 1.5 kWh over two days, so 0.75 kWh per day. At my energy price (about £0.15 per kWh) this amounts to about £0.11 per day. A pretty reasonable price if you ask me, which shows that running your own server at home doesn’t necessarily have to be a huge expense.

© 2018 Daniel's TechBlog

Theme by Anders NorénUp ↑

%d bloggers like this: