How to determine Intel SSD Endurance on Mac OS X

On January 22, 2012, in How-To, by Bill Plein

I’ve been chatting with @garyorenstein on Twitter about his upgrade from the stock spinning rust HDD in his MacBook Pro, to an Intel 320 Series SSD. This is an upgrade that I’ve undertaken before.

I started thinking about endurance. Commercial grade MLC SSD products have a bad reputation for early wear-out. I wanted to see what I could do to determine how much life my SSD has in it, according to Intel.

Intel has their Intel SSD Toolbox, which is available for Windows only. This isn’t much help for those of us running Mac OS X.

I’ve used smartmontools, specifically the smartctl command line program, under Linux and Mac OS X in the past.  It’s available for Mac as part of MacPorts. I updated my smartmontools package, and ran a quick view of the drive using “smartctl -a disk0″. The output includes a section with the SMART attributes, and I was hoping to see some SSD specific information. Here’s that section:

SMART Attributes Data Structure revision number: 5
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
 3 Spin_Up_Time 0x0020 100 100 000 Old_age Offline - 0
 4 Start_Stop_Count 0x0030 100 100 000 Old_age Offline - 0
 5 Reallocated_Sector_Ct 0x0032 100 100 000 Old_age Always - 12
 9 Power_On_Hours 0x0032 100 100 000 Old_age Always - 585
 12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 1239
170 Unknown_Attribute 0x0033 100 100 010 Pre-fail Always - 0
171 Unknown_Attribute 0x0032 100 100 000 Old_age Always - 0
172 Unknown_Attribute 0x0032 100 100 000 Old_age Always - 0
183 Unknown_Attribute 0x0030 100 100 000 Old_age Offline - 0
184 Unknown_Attribute 0x0032 100 100 090 Old_age Always - 0
187 Reported_Uncorrect 0x0032 100 100 000 Old_age Always - 0
192 Power-Off_Retract_Count 0x0032 100 100 000 Old_age Always - 19
199 UDMA_CRC_Error_Count 0x0030 100 100 000 Old_age Offline - 0
225 Load_Cycle_Count 0x0032 100 100 000 Old_age Always - 76344
226 Load-in_Time 0x0032 100 100 000 Old_age Always - 21155
227 Torq-amp_Count 0x0032 100 100 000 Old_age Always - 14
228 Power-off_Retract_Count 0x0032 100 100 000 Old_age Always - 2147518782
232 Unknown_Attribute 0x0033 100 100 010 Pre-fail Always - 0
233 Unknown_Attribute 0x0032 100 100 000 Old_age Always - 0
241 Unknown_Attribute 0x0032 100 100 000 Old_age Always - 76344
242 Unknown_Attribute 0x0032 100 100 000 Old_age Always - 88070

 

Nothing really stood out, except all those “Unknown Attributes”.

A little research revealed that MacPorts has a very old outdated version of smartmontools, version 5.38, which dates back prior to the common use of SSDs that we see today.

Since MacPorts didn’t have the latest code, I downloaded the latest directly from Sourceforge. It configures, compiles and installs cleanly, but to /usr/local/bin which is NOT ealier in the path than the Macports version. Users should remove the old version, located in /opt/local/sbin.

Running the command now gave me updated attributes titles:

SMART Attributes Data Structure revision number: 5
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
 3 Spin_Up_Time 0x0020 100 100 000 Old_age Offline - 0
 4 Start_Stop_Count 0x0030 100 100 000 Old_age Offline - 0
 5 Reallocated_Sector_Ct 0x0032 100 100 000 Old_age Always - 12
 9 Power_On_Hours 0x0032 100 100 000 Old_age Always - 587
 12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 1242
170 Reserve_Block_Count 0x0033 100 100 010 Pre-fail Always - 0
171 Program_Fail_Count 0x0032 100 100 000 Old_age Always - 0
172 Erase_Fail_Count 0x0032 100 100 000 Old_age Always - 0
183 Runtime_Bad_Block 0x0030 100 100 000 Old_age Offline - 0
184 End-to-End_Error 0x0032 100 100 090 Old_age Always - 0
187 Reported_Uncorrect 0x0032 100 100 000 Old_age Always - 0
192 Unsafe_Shutdown_Count 0x0032 100 100 000 Old_age Always - 19
199 UDMA_CRC_Error_Count 0x0030 100 100 000 Old_age Offline - 0
225 Host_Writes_32MiB 0x0032 100 100 000 Old_age Always - 76433
226 Workld_Media_Wear_Indic 0x0032 100 100 000 Old_age Always - 2147483643
227 Workld_Host_Reads_Perc 0x0032 100 100 000 Old_age Always - 281457729732607
228 Workload_Minutes 0x0032 100 100 000 Old_age Always - 4294967295
232 Available_Reservd_Space 0x0033 100 100 010 Pre-fail Always - 0
233 Media_Wearout_Indicator 0x0032 100 100 000 Old_age Always - 0
241 Host_Writes_32MiB 0x0032 100 100 000 Old_age Always - 76433
242 Host_Reads_32MiB 0x0032 100 100 000 Old_age Always - 88076

 

A bit of further research showed the following areas that are of most interest to understanding the history to dateof the drive: ”233 Media_Wearout_Indicator” and “241 Host_Writes_32MiB”. If my understanding is correct, “Media_Wearout_Indicator” is the total life left to the nearest 1% in the Value (not Raw Value) column. Mine is showing 100, indicating that I’ve written less than 1% of the expected write lifetime. “Host_Writes_32MiB” is how much capacity of writes have been done to the drive since shipment, in 32MiB (MebiBytes). For those of you who aren’t familiar with it, a Mebibyte is 1,048,576 bytes, the base-2 number we are familiar with and sometimes call a MegaByte. Disk manufacturers use 1,000,000 bytes as a MegaByte, operating systems use 1,048,576 bytes as a MegaByte, but for disambiguation in the disk capacity world, a MebiByte is 1,048,576 bytes and a MegaByte is 1,000,000 bytes. This is why your 160GB drive formats to 149GB in the OS. It has little to do with space lost to partitioning or file system formatting, and almost entirely to do with MiB vs MB. 160MB*1,000,000/1,048,576=152MiB (or MB according to most OS tools).

But I digress!  According to smartctl, my laptop SSD has absorbed  76443*32MiB, or a little under 2.3TiB.

I then looked up the endurance claims for my 300GB Intel 320 Series SSD. It was a disappointingly low 30TB!!! What the heck! BUT…. reading more closely, that’s 30TB written at 4K random write via a benchmarking tool. Mac OS X will write larger than 4K when it can, unlike, say, Linux, that writes buffered writes at 4K size regardless of the size of the write by the application, and if you are lucky, write merges can make the writes larger again.

So, does this all add up? Nope. According to Intel’s specs, I should have used up approximately 13% (2/15) of my write endurance. How much that was alleviated by large block writes, or how much of the difference is due to buggy output by the drive, is unknown.

So, I now know how to measure how used my drive is. The life left, according to the SMART attributes, is huge. Then again, I found out that this drive is supposed to wear out as early as 30TB of writes, so it really should only be used as a laptop drive, never as a server drive in an enterprise environment (but I knew that already, because I work for Fusion-io).

Not really sure if I feel better or worse about my Intel 320 Series SSD at this point in time! I’m really happy with the performance, and I should be happy with that. Any SSD or HDD can die at any time, that’s what a good backup strategy is there for.

 


 

Tagged with:  

I wrote my representatives, online via their web interfaces, regarding my opposition to SOPA.

Feinstein’s camp responded with a form letter. I thought I’d share it here for your perusal. This is the HTML code taken straight out of the HTML portion of the email, unadulterated.

Promises Promises. She’s promising to fight for changes in the bills she already approves. But doesn’t say what those changes will be.

Feinstein’s Form Letter regarding SOPA/PIPA

 

Savannah Stoker Auto-Tune

On January 9, 2012, in How-To, by Bill Plein


The Savannah Stoker is a PID controller upgrade for the Traeger brand of pellet grill. PID controllers get their name from the type of feedback loop they use to control the output. PID is short for “Proportional Integral Derivative”. A good description for those of a technical bent can be found on the Wikipedia listing for PID Controller.

The Savannah Stoker comes with pre-set numbers for the variables, such as the minimum temperature, and the maximum, but also for various outputs that determine, for example, the duty cycle of the auger at the minimum and and on the maximum.

For those that are interested in modifying these values, especially those who may have modified their Traeger on other ways (high speed auger motor, insulation, firebricks, etc.), they may find that they’d  like to play with the stock values.In addition, there is an Auto Tune function built into the controller module on which the Savannah Stoker is based.

The following notes are taken from the manufacturers notes:

In order to start an Auto Tune, initiate normal start up and set the SV (Set Value) lower number to 250 temperature. When the pit is stable at 250, initiate the Auto Tune sequence as noted below.

  • Press and hold the Set Key to enter into the Parameter’s Menu which will show up in the PV Display (upper number) which is normally the sensor read out (pit temperature).
  • Once in the menu each time the Set Key is press the menu advances to next parameter.
  • Advance through the menu and record the current I, P and D Parameters (numbers) for reference. This way you can reset it to “factory” if you want to go back.
  • If you exit out of the menu just press and hold the Set Key to again enter the menu. To change parameters’ values use the up and down arrows.
  • Advance the menu to AT and you will see the number next to AT is 3 (normally).
  • Use the Down Arrow to change the number to 2.
  • Wait 3 to 5 seconds and the numbers in the SV Display (lower Number) will start flashing which indicates the PID is in the auto tuning mode.  This launches Auto Tune.

The auto tuning is accomplished by the PID by cycling from lower to higher temperatures 2 to 3 times.
When Auto Tuning is finished the numbers with stop flashing.

 

Tagged with:  

Nest Learning Thermostat: First thoughts

On December 21, 2011, in Other Stuff, Product Reviews, by Bill Plein

I got my Nest Learning Thermostat yesterday, and have had a chance to play around with it and the web app for remotely monitoring and controlling the settings.  I’ll probably do a product review later.

But I’d like to post an open letter to Nest with one comment or request.

Make it Social!

Now, I can’t believe those words came out of my keyboard. I’m the guy who is constantly saying “No, not everything is social”. And at first glance, I’d say “Your thermostat isn’t social”.

But guess what is social? Friendly competition.

Just as with Hypermilers, each one out to show how many more miles per gallon they can squeeze out of their hybrids, people who buy the Nest are likely to be proud of how they are saving energy, and might like a way to “humble brag” about it.

So consider this request:

  • Allow users of your web-app to publish links to their data. Energy consumption estimates, savings estimates can all be shared through the nest.com web site.
  • Allow owners to grab the data directly using a simple API via CURL or another open standard.

Just as with SETI@home, you will find people digging in to ways to save money, publish data, and generally do good things due to their competitive nature. All the while, driving more eyeballs to your product.

A perfect addition to the product family would be a simple data logger for power consumption. These already exist in other forms, with a simple non-invasive power monitor that goes on your breaker box or at the main power meter to the house. Connect that power usage data to the HVAC data, and start getting really good data for the user, and make it ~simple~ and easy to use, in line with your design ethic.

Get people competitive about saving energy. They’ll spend money to save money, especially if they can brag about it.

Tagged with:  

BBQ Smoked Chili

On December 17, 2011, in BBQ, by Bill Plein

Decided to try out the new Savannah Stoker controller by cooking up some beef for chili.

note: This is not Texas chili. It has beans and other stuff in it!

Ingredients:

  • 3 lbs of stew quality beef (chuck, anything that will break down is good). I used some “bulk -buy” chuck that I had bought several weeks ago, chopped into large chunks and frozen for later use in 16oz bags.
  • Chili powder, 1-2 Tbsp per pound of beef, to taste. Mild or hot, your choice depending on your guests
  • 2 medium onions, yellow or white
  • 4 14.5oz cans (or 2 @ 28+oz) of diced tomato (this is a very tomato rich sauce. Cut back and replace with water for less tomato taste)
  • Several cans of kidney beans. I used about 4 14.5oz cans per recipe.
  • Salt, Pepper to taste
First, fire up your pellet grill or smoker, and set it to a good low smokey temperature. I used 170F for this recipe, use whatever you like. Let your grill settle in while you prepare the meat.

Start by making large cubes of your beef, 2+ inches each. We want to smoke the beef, not cook it through!

Add a bit of chili powder, just enough to coat it lightly

 

Next, put the meat on the smoker. I use FrogMats to keep the beef from getting stuck on the grill, and to avoid smaller pieces from wedging down through the grate.  We’re going to leave the meat on the smoker for about an hour.

While the meat is smoking, prepare the rest of the ingredients:

Dice and brown the onions in the bottom of a large stock pot, using a small amount of butter or extra virgin olive oil (EVOO). I prefer to use a low heat, cooking them to semi-translucent, more of a “sweat” than “browning”. If you prefer to caramelize them to a darker brown, that’s good too!

With the onions done to your liking, add the diced tomatoes. If you prefer a more traditional, purist chili, reduce the tomatoes and add about half the capacity back using water. Adjust later to taste.

Add the chili powder. My wife likes mild chili, both not to strong nor hot. I prefer stronger, spicier. For mild chili flavor, use 1 heaping Tblsp per pound of raw meat. For stronger taste, use up to 2 Tbls per pound. Vary the chili powder type from mild to hot based on your preference for heat. Experiment!

Bring the tomato/onion/chili mix to a low boil and reduce to a simmer while waiting for the meat.

After about an hour, the meat should have picked up a good amount of smoke flavor. I pulled mine and whoa, it smelled great! The meat should be dry and smokey on the outside, raw on the inside (not cooked)

For chili, we are going to want to cut the meat into smaller pieces. I like to get it down to sizes about the size of the end of your thumb. Remove any excessive fat or connective tissue as you go.

 

Brown the meat in small enough portions that you can brown, not braise, using vegetable oil or EVOO. We don’t want to boil the meat, we want it to go through the Maillard Reaction to get that browned goodness that imparts a lot of great flavor.  You want the meat cooked mostly through, but you don’t have to worry if some are a little undercooked, as they will continue to cook in the chili for hours. As you brown each batch, transfer them to the stock pot with the tomato/onion/chili mix.

During the browning, you’ll notice the strong smell of the smoke. This is what we are after!  The outside of the meat has picked up a lot of smoke flavor from the smoker. Some of this is sticking to the pan as you cook.

After browning the last batch, deglaze the pan with water (white wine would be OK too). Get all the brown smoky crusties scraped up and whisked, and transfer the liquid to the stock pot.

 

Mix it all in and set the pot to simmer (very low, don’t burn it!)

I left this to cook for hours. You need to let it cook long enough for the meat to start to break down.

About an hour before serving, add your beans. I had my wife pick up 3 different colors of kidney beans, for variety.

 

The final product: Hints of smoke, definitely not your typical canned chili, nor is it exactly like your stove top cooked chili. Smoking the meat is definitely the way to go. The final product is less smoke flavored than what you are smelling all the way through the cooking process, the cooking definitely makes it milder.

I will always try to take the time to smoke my chili beef going forward!

 

 

Tagged with: