OS X Understanding & Enabling SSD Trim Support December 31st, 2011
Over the past few years, our understanding of SSD technology has advanced significantly. In theory, SSDs are a massive improvement over conventional spindle drives with no major weakness to speak of. No longer does your computer have to wait for a motor powered platter to rotate into the correct position every time you want to access a piece of data; it can now grab it instantly from a bank of memory cells inside the SSD. As well as this dramatic increase in performance gone is the noise, the heat, and importantly the power consumption, and in its place smooth, silent, virtually instant data transfer.
Well, that’s the theory anyhow.
The reality is that whilst a lot of the above is true, an SSD is not immune to problems like any other hard drive; one of the biggest of these problems is the way in which SSDs handle deleted data and the way this causes overall performance to tail off after continual use.
First, we need to understand the problem.
SSDs are split into multiple cells. Imagine for a moment a brand new SSD with a clean 20kb cell, the drive writes two 10kb files into this space at its full write speed, so far so good. Later, you delete one of these 10kb files as it is no longer required. The SSD will now simply mark the unwanted 10kb space as an area that is available to be rewritten, this is exactly the same behaviour you’d expect from a conventional spindle drive; the important point to note here is that neither the SSD nor the conventional spindle drive actually deletes the physical data. The difference comes when you need to right new data into the 10kb space.
The conventional spindle drive will simply write over the 10kb of space when the new data comes along however when the SSD comes to rewrite data to the 10kb of free space in the now dirty cell – in order retain the 10kb file still there – it must first read that data to its controller, wipe the whole 20kb cell clean and then rewrite the complete set of valid data, old and new, into the cell. Over time, this continual rewrite process has very little impact on the performance of a conventional spindle drive however the read-modify-write process employed by the SSD will drastically reduce performance on the SSD in comparison to writing data to new, clean cells. This behaviour is the main cause of SSD performance degradation over a period of time, especially for heavy users accessing data daily.
Ironically, for a device which can, at least in theory, address any given cell at the same speed, SSDs can also become subject to fragmentation as a side effect to dirty NAND. Having numerous cells filled with deleted data means the drive needs to perform more and more read-modify-write cycles when writing files to the drive which over time causes yet more performance degradation. A heavily fragmented SSD will also have no choice but to spread files over even more cells, forcing the drive to address all those cells too when reading data; this of course has the effect of reducing the overall read performance of the SSD as well as the write performance.
SSD manufacturers are aware of these issues of course and there is a fix by way of the TRIM command. TRIM reorganises written data on the SSD and scrubs deleted data as soon as it has been deleted (this is triggered by a delete command, clearing the recycle bin or, reformatting the drive). This means that when the drive needs to write data to that cell again, there is nothing but clean NAND waiting negating the need to perform the read-modify-write process, therefore ensuring the optimum write performance is maintained and does not degrade with use. However, in order for TRIM to work, support is required not only within the SSDs firmware but also the host OS. Windows 7 shipped with TRIM support out of the box and I can say from personal experience, it makes a huge difference. The problem with OS X is that TRIM support is very limited.
TRIM is officially supported in OS X 10.6.8 or greater, but is limited by the fact that it only supports Apple branded SSDs.
Take a look at About This Mac>More Info>Serial-ATA and you’ll notice unless you’re running an Apple SSD the TRIM support flag is set to ‘No’. It seems a deliberate oversight on Apple’s part, no doubt to try and convince you to buy their own branded drives (which by the way you should never do, they are way over-priced and old technology) but as always there is a way to enable TRIM for other manufacturers SSDs. To enable TRIM support, simply download an app called TRIM Enabler which works by loading a kernel extension from MacBook Pro 2011 models (with TRIM support) into your Mac OS X kernel, this forces TRIM to be enabled; all you have to do is download and mount the DMG file and click on Patch. Simples!
Caveat: This is completely unsupported software and is not endorsed by Apple. I am not responsible for any damage or data loss that may result from enabling TRIM. Always have a backup of your data and proceed carefully at your own risk. If you decide to download the above patch and enable TRIM, you do so of your own choice.
Notes: I have tested TRIM Enabler on my MacBook Pro (early 2011) i5 running OS X 10.6.8 Snow Leopard without issue. After a reboot, the TRIM support flag changes to ‘Yes’ and the system runs normally without any issues, it’s too early to tell if having TRIM enabled will keep my read/write speeds consistant but I will run some benchmarks and report back at a later date with a comparison.
I hope this may be of use to someone, please feel free to share your experiences in the comment box below.
Posted in Apple, Blah, Lion, Mac OS X, MacBook Pro i5, Snow Leopard, Technology Related | 1 Comment »
For Sale – Lenovo ThinkPad T61p 6460-8UG December 24th, 2011
As a converted Mac user, I no longer use my trusted Lenovo T61p.
The T61p may be a few years old but in my experience it still out performs most, if not all, of the mid-range machines on the market today. The ‘p’ designation was a very high specification laptop designed as a mobile workstation geared towards serious mobile computing and design work and will frankly, embarrass many of the most up-to-date models; with good all round performance coupled to a quality full HD display, the T61p is truly a great machine.
I wrote a review of the machine a while ago which can be found here for further information.
Specifications are as follows:
Model – Lenovo ThinkPad T61p 6460-8UG
Processor – Intel Core 2 Duo T7700 2.4Ghz with Centrino Pro technology
Memory – 3Gb DDR2 SDRAM PC2-5300-667MHz SO DIMM 200-Pin
Display – 15.4″ Full HD (1920×1200 WUXGA) TFT Active Matrix
Graphics – Nvidia Quatro FX 570M 256Mb PCI Express x16
Battery – 9-Cell Extended (Genuine Lenovo, approximately 6 months old)
Hard Drive – 320Gb 7200rpm SATA
Optical Drive – DVD-Writer DVD+RW
Operating System – Windows 7 Ultimate Edition 32-Bit (installed, licensed and activated but no COA or media supplied)
Please feel free to contact me if you’d like any further information, or head over to the eBay auction directly to place a bid. I also have available a Lenovo Advanced Dock (for the above) as well as a 19″ Widescreen Lenovo monitor.
Google Chrome Finally Supports Full Screen Mode in OS X 10.7 September 18th, 2011
It’s taken Google a little while to catch up with Safari to fully support the new full screen features in OS X 10.7 but an update is now available to do just that. As well as supporting native full screen, the update also brings overlay toolbars to Chrome. These features are not necessarily new and have been available for some time in the developer releases of Chrome, but of course these were not widely available and were quite unstable for day-to-day use.
To get the update, all you need to do is go to the Chrome menu and select About Google Chrome and then select Update Now, you can also download the update directly from Google servers by following this link.
Posted in Announcements, Apple, Blah, Chrome OS/Chromium, Google, Mac OS X, Technology Related | No Comments »
Restoring Music From Your iPod to iTunes August 18th, 2011
I guess it was only a matter of time before I did something stupid.
I’m always advocating the need to take regular backups and ensure that you keep a copy of all of your important data; in fairness, I usually do and I did it’s just that I forgot to include my iTunes library in my backup routine. My only saving grace is that I still have all my music on my iPod.
Apple in all of their wisdom has made it surprising difficult to copy data from your iPod into your iTunes library from within iTunes itself, or rather they have made it impossible. You’d have thought that this would make perfect sense in terms of a feature but alas, no.
All is not lost however, there is of course a way to simply restore your music back into your library from iTunes, just follow this simple guide.
Caveat: I have used a machine that currently does not have iTunes installed to produce this guide; the recovered data was then placed onto an external hard drive before restoring to my main machine with iTunes installed. I did it this way to ensure that iTunes did not auto sync with my iPod when it was connected and wipe any data, I was just being cautious. You can of course follow the steps in this guide on the same machine as you currently have your iTunes on, but, you must ensure that iTunes does not automatically sync initially or you face the possibility of overwriting all of your music with nothing.
Notes: I have used a Windows 7 based machine to initially connect my iPod and backup the data (my iPod was originally formatted and used with a Windows machine). Then, my new main machine which contains my iTunes is a MacBook Pro; if your iTunes is on a Windows based machine some of the following steps will be slightly different i.e. you will not be able to use the OS X specific keyboard shortcuts and will need to find the options using the menus within iTunes itself, other than that the process is identical.
Firstly, on my windows machine:
- Connect your iPod to your computer using the sync cable.
- Navigate to My Computer; you should see your iPod connected as an external drive, double click on the icon.
- Next you need to un-hide hidden folders; Click on Organize followed by Folder and search items. Click the View tab and check the option to Show hidden files, folder, and drives.
- Click OK to return to the explorer window.
- You should now see a folder called iPod_Control, double click this.
- Copy the entire folder called Music to a backup location of your choice; in my case I copied this to an external drive.
- You can now disconnect your iPod.
Secondly, on my Mac:
- Load iTunes from the dock and navigate to iTunes preferences by pressing ⌘, and clicking on the Advanced tab.
- Check both options to Keep iTunes Media folder organized and Copy files to iTunes Media folder when adding to library.
- Finally you need to import the music in the backup folder into your library, to do this press ⌘o and navigate to the folder containing the backup up data and click Choose.
Once you have done that, iTunes should automatically sort out the files for you and copy them back into your iTunes library.
Posted in Apple, Blah, iTunes, Mac OS X, Technology Related, Windows 7 | No Comments »
Citrix Access Gateway Installation Error 2738 April 25th, 2011
I came across this issue earlier in the week whilst trying to install the latest version of the Citrix Access Gateway client. The machine I was working on was a new, fresh off the shelf Windows 7 Acer laptop; albeit 64-bit. Thinking the problem was related to the Citrix installation itself I headed over to the Citrix forums and found that the issue was actually a generic Windows problem indicating that the VBScript engine currently isn’t registered on the machine where the install (or indeed uninstall) is taking place.
The fix is actually quite simple, just follow these simple steps:
- Click the Start Menu
- Click All Programs
- Click Accessories
- Right click on Command Prompt and select Run as Administrator
Next, if you are using the 32-bit version of Windows:
- Type the following:
cd %windir%system32and press the Enter key and then type
regsvr32 vbscript.dlland press the Enter key and then type
regsvr32 jscript.dlland then press the Enter key
Alternatively if you are using the 64-bit version of Windows:
- Type the following:
cd %windir%syswow64and press the Enter key and then type
regsvr32 vbscript.dlland press the Enter key and then type
regsvr32 jscript.dlland then press the Enter key
That should get you up and running, try to run the installer again and everything should now work as expected. Enjoy!
Posted in Access Gateway, Blah, Citrix, Technology Related | No Comments »

