view in plain text or web browser  
Tech Tails | Apple news straight from the Tech Room | SmallDog.com | 800-511-MACS
 
#864: Just a TRIM, Real Time HD I/O, Fix A Sluggish Home Button

 
     
 

Hello all,

I was listening to our local public radio station this morning and the weather forecaster said we were in for a bunch of different stuff in the next few days and to remember that April just “can’t be trusted.” I have no idea why, but I enjoyed that observation a lot.

A little harmless anthropomorphism? A reminder that we, indeed, do not stand separate from our environment but are part of it and simply by existing we therefore relate to it on a deep level?

My body still doesn’t want to accept DST and in turn, makes everything my brain fuzzy enough to laugh at anything remotely amusing. I’m not going to bother to figure it out.

We are ramping up to our Rutland store grand opening in a couple of weeks; hopefully that will allow some of you to visit us without having to travel so far. It also means I’m bringing back some nuggets from the past to revisit this week, including an article about SSD devices that will become more relevant as time goes on.

Thanks for reading,

Liam
liam@smalldog.com

 
   
     
  Just a TRIM  
   
 

This article was written by Glenn Brensinger, a former technician, and originally debuted in Tech Tails issue #758.

Solid state drives (SSDs) are advertised as better than standard hard drives, and in most cases that’s true. There are no moving read/write heads or spinning platters, so there’s no time wasted while the drive rotates around to grab the next data fragment. Plus, the lack of moving parts means better battery life on portable systems.

However, due to the way data is stored on a solid state drive, you will see a higher performance gain on reading data than writing it. Loading applications and documents will take almost no time at all compared to the same retrieval on a hard disk, but writing large amounts of data may not be that fast. The reason is because of the way a SSD stores data.

Picture a large storeroom with a row of shelves, and each shelf contains a row of egg cartons. Near the door of the storage room is a large whiteboard with a list of what is in each of the egg cartons. Any time someone needs to store some information, they write it on a slip of paper and put it into an empty spot in an egg carton, then go to the inventory list and mark down the location of that note.

When someone needs to find a note, they consult the list so they know which egg carton to go to. If you no longer need a note, you go to the whiteboard and erase the reference to the note so others know that space can be reused. Seems like a decent system, right? Well, there’s one issue: No one ever goes into the shelves and does any housecleaning, so you have rows of egg cartons full of old notes that aren’t being used anymore.

When you delete a file, the directory portion of the file system (the whiteboard) is updated to show that the file is no longer needed so the space it takes up can be reused. However, the data is not actually removed from the hard disk (unless you specify a secure wipe, which is outside the scope of this article). For a standard hard drive, any existing (unused) data is overwritten by the new data in one pass, so to the user it’s transparent. Because of the way the memory cells work on a solid state drive, data cannot be overwritten; the storage cell must be emptied before something else can be put there.

Data on a solid state drive is stored in blocks, with each block containing multiple cells. Data can be written to each cell individually, but data has to be erased by the block. Remember those egg cartons? To save a note, you find an empty spot in an egg carton and drop the paper into it. To replace one of those pieces of paper, however, you have to remove every piece of paper from the egg carton, temporarily store them in another egg carton (known as a cache) dump all of the notes, then put only the notes that are still in use back into the original egg carton.

Now there are empty spaces so you can save your new note, but two extra steps were needed just to store it. Since it all happens in a matter of microseconds, it doesn’t typically become a problem for small files, but when you start dealing with large files (such as editing movies) the slow-down in writes can become very noticeable.

This is where the TRIM feature comes in. TRIM, while capitalized, is not an acronym for anything; its purpose is to trim old data from the SSD. The operating system will watch for idle times (when no data is being written) and signal the drive to erase any storage locations that have been marked for deletion. Later, when data needs to be written to that space, there is no wait time since the space is already empty. The TRIMming happens in the background while you’re doing other things, so you aren’t even aware that it’s going on.

A lot of newer solid state drives either have TRIM support built in or the vendor has made a firmware update available to enable it. TRIM does not happen automatically, however; the drive needs to be told by the operating system when it’s safe to trim. Windows 7, Windows Server 2008, Linux 2.6, OpenSolaris, and FreeBSD already have TRIM support, but Mac OS X support was not scheduled to be included until version 10.7 “Lion” later this year. It was recently discovered that the newly released line of MacBook Pro “Thunderbolt” systems run an updated build of Snow Leopard that includes support for TRIM. As of the time this article is being written, the only drives supported are the ones Apple ships with the system, but that may change in the future as Apple evaluates other brands.

There are utilities available to do a manual TRIM on operating systems that do not have support built in; however, some of them could cause data loss if not used properly, so I will not mention them here. They fall under the category of “if you know how to use it, you’ll know where to look for it.”

 
   
     
  Real Time HD I/O  
   
 

This article was written by Jon Spaulding, a former technician and originally debuted in Tech Tails issue #812.

Do you want to see the input and output of your hard drive in real time? Do you want to see what applications are reading from and writing to your drive and vice versa?

Dynamic Tracing, or DTrace, is a suite of scripts and frameworks created by Sun Microsystems for troubleshooting. DTrace is supported on Sun’s Solaris platform and has been ported to FreeBSD (upon which OS X is based) and NetBSD. Apple added DTrace support in OS X 10.5 Leopard as part of Xcode’s Instruments development tool.

DTrace is a collection of many different tools and commands that can be run in Terminal to examine just what your computer is doing. One of the DTrace tools is the iosnoop. This is a command that must be run as root, so you’ll need to use sudo to execute it. The command gives you a live readout of your hard drive’s I/O. Each line of output in iosnoop is a system call regarding I/O to your hard drive.

UID PID D BLOCK SIZE COMM PATHNAME
501 9152 W 232493176 4096 PubSubAgent Database.sqlite3-journal
501 8967 W 232493176 4096 TextEdit TextEdit Document.rtf
501 8967 W 232493184 4096 TextEdit ??/Autosave Information/.dat2307.020
501 9153 W 232493192 4096 PreferenceSyncC ??/Preferences/com.apple.PreferenceSync.plist
501 9153 R 45546264 8192 PreferenceSyncC ??/Preferences/com.apple.sidebarlists.plist
501 9153 R 45546280 8192 PreferenceSyncC ??/Preferences/com.apple.sidebarlists.plist
501 9153 R 45546296 8192 PreferenceSyncC ??/Preferences/com.apple.sidebarlists.plist
501 9153 R 25427968 4096 PreferenceSyncC ??/Preferences/com.apple.java.JavaPreferences.plist
501 9153 W 1416 4096 PreferenceSyncC ??/unknown (NULL v_parent)
501 9153 W 6216 4096 PreferenceSyncC ??/unknown (NULL v_parent)
501 9153 W 6544 4096 PreferenceSyncC ??/unknown (NULL v_parent)
501 9153 W 6560 4096 PreferenceSyncC ??/unknown (NULL v_parent)
(Your output will look different. Our example has been edited so it displays properly.)

In the output above, iosnoop has listed the UID (user ID) who made the call; user 501 (me) has been executing the system I/O calls.

The second column, PID (Process ID), is a unique number provided to each application or routine that the system is performing. The PIDs grow sequentially; as a Process is terminated, it will disappear from the system but it will not give up its number until the system restarts.

The D column references what direction the data was going: R for read events, W for write.

Block refers to the location on the hard drive where the read or write function occurred, and Size is the amount of data in bytes.

COMM is the process name; for each line with a matching PID, COMM will be the same. In the above output, PubSubAgent, TextEdit and PreferenceSyncC were the only processes I captured.

Finally, PATHNAME is the directory path where the data was written to or read from.

 
   
     
  Fix A Sluggish Home Button  
   
 

This article was written by Carl Grasso, a former technician and originally debuted in Tech Tails issue #819.

Do you have an older iPod or iPhone that has a sluggish Home button? Does it take a couple taps to get it to register? It may just need to be recalibrated.

Before today, I didn’t even know you can do this; I’d always figured it was just a failing part. But thanks to an article on snapguide.com, I learned that you can recalibrate the button.

In order to do this, you need to open up one of the stock Apple apps (like Calendar, YouTube, Weather, Maps, etc.). Once the app is open, hold down the power button until the red “slide to power off” shows up, then immediately press and hold down the home button until the slider goes away. The app quits and you’re back at the home screen. There’s no guarantee that this will fix the problem, but depending on the issue, it may.

Editor’s Note: I discovered that I had a bad habit of using the Home button to turn on my iPhone instead of using the Sleep/Wake button. As a result, my Home button was very sluggish and I was afraid it was starting to fail. Once I trained myself to use the Sleep/Wake button, I reduced the amount of use on the Home button dramatically, and in return, it’s much more responsive. In conjunction with this tip, I think any Home button seemingly “on the verge” can be saved.—KH

 
   
     
  SPECIAL | Achieve Lightning Fast Speeds With SSDs  
   
 

TT | FREE Shipping on LaCie Rugged SSD

199.99

Have you been inspired to start reaping the benefits of solid state drives after reading about them in Glenn’s article? SSD’s truly are the wave of the future and if you’d like to get with the times, we suggest trying out LaCie’s Rugged portable SSD.

The Rugged SSD drives offer incredibly fast read/write speeds and a Thunderbolt port to move it all, so now your file transfers won’t be bottlenecked by your I/O port.

This week, every purchase of a LaCie Rugged USB 3.0 Thunderbolt SSD Drive – 120GB will ship FREE!

View

 
     
  SPECIAL | New Low Prices on Retina MacBook Pro  
   
 

Nothing says speed like Apple’s Flash Storage drives! If you don’t have a Mac and want to capitalize on the lightning fast speeds that solid state drives have to offer, then Apple’s line of Retina MacBooks are the perfect choice for you!

Here at Small Dog we like to give you the best deals around, so once again we have lowered our prices on select models of our Retina MacBook Pros. Plus, this week, we are offering these two models with an even bigger savings on AppleCare.

Hurry now and save $50 on your purchase with AppleCare and a 15in Retina MacBook Pro!

 
   TT | Save $50 on AppleCare with 15in MacBook Pro Retina 2.3GHz
2,299.98
View  
   TT | Save $50 on AppleCare with 15in MacBook Pro Retina 2.6GHz
2,699.98
View