Thursday, December 07, 2006

Tip: OS X doesn't have a defragmentation tool because user's don't need to run one

A co-worker asked me yesterday if he needed to defragment his Mac. This is my co-worker's first Mac, and after being conditioned to Windows defragmentation he thought he should ask so he could keep his Mac running at top performance. I told him right away that OS X doesn't need to be defragmented, mostly because I had done some research on this in the past because I was conditioned to defrag coming from Windows. I came to the conclusion it was unneeded because OS X automatically and silently defrags files, and moves heavily requested files onto the fastest parts of the disk (more on this stuff later). I also told him no defrag needed because I hadn't defragged any Macs in the 3 years of owning and using Macs. This is one of the "Windows taxes" that you forget to tell people about that they don't have to do when they use Macs, since the pain is gone you kinda forget what all the fuss is about.

But my VersionTracker for OS X RSS feed showed a new version of iDefrag, 1.5.8, available for download, so I read their documentation and then Googled for some more information on fragmentation on OS X, specifically the default filesystem HFS+.

A few minutes later, I found pretty much the authoritative article, Fragmentation in HFS Plus Volumes by Amit Singh. Amit it seems is becoming the Mark Russinovich of the Mac OS X kernel. Amit's book, Mac OS X Internals: A Systems Approach may be the equivalent of Microsoft Windows Internals, Fourth Edition. I hear Santa is bringing me the OS X internals book...

Anyway, here is the conclusion to Amit's article:
Defragmentation on HFS+ volumes should not be necessary at all, or worthwhile, in most cases, because the system seems to do a ver good job of avoiding/countering fragmentatio .
For the more curious, I encourage you to read all of Amit's article. Two features in OS X help eliminate the need to manually defrag, Hot File Adaptive Clustering and On-the-fly Defragmentation. Amit's article contains excellent descriptions of both. There is an Apple support article on why defragmentation should not be needed, but there are specific scenarios that might cause heavier then usual fragmentation and OS X built-in techniques wouldn't suffice. This has to do entirely with heavy large file manipulation, since those files aren't earmarked for automatic and silent defrag since they most likely exceed the 20MB rule Amit mentions.

For comparison's sake, Windows XP has had the Prefetcher which does essentially the same thing as OS X's Hot File Adaptive Clustering combined with On-the-fly defragmentation, with one exception. OS X will defrag any file on open if it hits a bunch of conditions, again listed in Amit's article, Windows isn't doing that, only for the most used files. Vista goes get an Automatic Defragmenter.

Wednesday, December 06, 2006

Vista Annoyance #003: What driver was that please?

I finally got around to installing Vista in a Parallels VM on OS X. Parallels takes whatever remaining pain there is in installing Windows XP or Vista away by capturing all the information, like product key and username, at the start of the VM install and then automates the Windows install process so you basically don't have to do anything, it totally rocks.

What doesn't rock is that all the drivers it installs aren't digitally signed so Windows pops-up the following nag dialog:

Why is this a Vista annoyance and not a Parallels annoyance for the driver thing? Because Windows is showing the user the red shield and scary red dialog title and leaves out the most critical piece of information possible, what the hell is actually causing this dialog to pop-up? What process? What driver is being installed? Then look at your choices. Which one is the better option? Both have the green arrow next to them, why is that? Should I as a normal user exercise more caution if I decided to install the driver anyway?

Tip: Reducing OS X and Application disk space

Update
In my experience, you can expect to recover between 2-5 GB of disk space by removing additional languages.

Original Post
In the wild world of Windows, installing or using localized versions of Windows and programs is a conscious decision the user has to make. Installation programs are often split into multiple versions, one for each localization offered, and using a localized version of Windows means installing a completely separate copy. If anyone has had to use localized versions of either Windows or its applications, thats a complicated procedure and at the minimum a potential time waster.
With OS X and applications made for the platform, there is only one version of OS X for all locales its installed for, and Applications are the same way. This is great for usability, and makes buying OS X or apps less confusing, but the downside is that localizations eat up a lot of disk space. If you are not using the localizations, and you know you never will, why keep them around?

Fortunately, OS X provides UI to remove localizations, they are called Languages, from an application through the Info pane on the application.

You can go through every single app and remove languages you aren't going to use, but this will not remove the extra language files from OS X itself. You can choose not to install the Languages when you install OS X, but most people use OS X pre-installed on their Macs. There is a pretty great utility, called Monolingual, a Universal binary that allows you to remove all the languages you know you aren't going to use. Here is a screenshot:

Monolingual also allows you to remove PowerPC binary data from Universal binaries if you are using an Intel Mac, or Intel binary data from a Universal binary on a PowerPC Mac, but I don't recommend it for pretty much one reason. Developers may keep certain files in a distribution as PowerPC because there performance doesn't matter and Rosetta emulation is good enough. World of WarCraft had this issue when they first released a Universal binary.

Tip: OS X Finder Error Code -1309 Possible Meaning

If you are copying files from your OS X partition to external drive or a Boot Camp partition and receive Finder Error Code -1309, it most likely means you are copying a file greater than 4 GB in size, which is the maximum a FAT32 formated drive can support. That's because the 32 in FAT32 means it uses a 32-bit unsigned integer for the number of bytes in a file, so 2^32-1 is 4 GB. Wikipedia Reference

Wednesday, November 29, 2006

Vista Annoyance #002: Shared By Me search folder does not appear to work

When I setup sharing on Vista because of the lack of ISO mounting software, I found Search Folders in Windows Explorer and was surprised that the Shared By Me search folder showed no results. Here is the final dialog on setting up sharing:

If you look on the dialog, you see the Show me all the files I am sharing link, which brings up the Shared By Me search folder with no results, days later even:

I have 2 files on my Desktop that I think should be showing up in the search results, a Visio file and the Visio ISO file. I thought this was a decent way to expose users to the search folders, give them hints when they use other functionality, until it didn't work that is.

Tuesday, November 21, 2006

Vista Annoyance #001: No ISO mounting software built-in

This is hardly the first annoyance I have already had with Vista RTM, and I am barely a few hours into using the final version, but the issue I am going to talk about is the most infuriating from a MSDN subscriber point of view.

I started using Vista for real today, installed the RTM and Office 2007 from DVD/CD (I burned both on OS X with the included Disk Utility, assuming I would be passing the discs around), and then realized I wanted to take a look at Visio 2007. So I started downloading the ISO from MSDN. I expected that MS would have finally included ISO files as mountable images, you know, in the OS. OS X has supported mountable disk images, both its DMG format and ISO formats for a while now and I certainly expected that MS would copy this with Vista. I mean every MSDN subscriber has to mount ISO images, why wouldn't you include a driver to make ISO appear as volumes?

While waiting for the download, I tried to install the unsupported Virtual CD driver for Windows XP on Vista, which failed spectacularly, so I actually was more encouraged that Vista had ISO image support built-in. Unfortunately I was wrong, Vista doesn't know what to do with these files. The good news though is that setting up a share on Vista was a lot easier than on Windows XP because I had to enable one so I could copy the ISO file over to my MacBook Pro, mount the ISO, and then copy the contents back over to the Vista PC I am testing with. The other good news is that Windows File Sharing worked perfectly between OS X 10.4.8 and Vista :-)

200

Hard to believe this is the 200th post to my blog, I feel nearly like an old timer ;-)

I really do feel like an old timer with this observation. I am installing Windows Vista RTM on the test box, so I revert to my Windows NT 3.51 or greater installer experience and format the previous Vista RC1 partition.

The interesting part to me is that:
  • When you click format, you get the hourglass for a few seconds, and then its done. This is clearly not a traditional format. Not sure how I feel about this, but I always wondering why you had to go through that laborious format process instead of just fixing the file system to say it didn't have any files.
  • One format to rule them all, NTFS. You cannot choose FAT32 here. I think that is a good thing

One more thing, good riddance to the hideous text mode setup.

Thursday, November 09, 2006

Tip: Using Parallels for Mac with Check Point SecureClient on OS X

UPDATE: Installed the latest Parallels beta, 2.5 Beta 2 Build 3094, and in the limited testing I have done so far, CheckPoint can be connected to the Intranet before the VM is up. Once the VM is started, it just figures itself out. This is with Shared Networking in the VM, which has worked great.

Original Post
Since I am doing all my development work in Windows on a VM in Parallels for Mac, I need to use Check Point SecureClient VPN in either OS X or the VM to connect back to the corporate network. The majority of my day to day apps, Notes, TestTrack Pro, MS Office, Safari and Firefox, iChat and Adium, are running in OS X so for some of those I need the VPN connection available to OS X apps. So I can use that same VPN connection with my Parallels VM too right?

You can, but it turns out there is a little trick, at least I have found that to be the cause. The VM has to be running before SecureClient VPN is connected to your corporate network. Why would it matter? My guess is that SecureClient patches routing tables during its connection sequence, but doesn't do the same when new network interfaces come active, well at least the way Parallels does it. Also, didn't seem to matter in Parallels if I used Bridged Networking or Shared Networking (new in Parallels Build 2.2 Build 1970). Again just a guess, I am too lazy to dig that deep :-)

Tuesday, November 07, 2006

I can't buy Gears of War

Retail stunts like this make me furious. My wife just stopped into a GameStop in NJ, and I called over to one in Manhattan, neither will sell a copy of Gears of War unless you had reserved it. I have an extremely hard time believing that this is a supply issue, and extremely easy time believing this is an artificial way to "punish" people that weren't good and pre-ordered through GameStop. Thanks GameStop for teaching me a lesson, I will make sure to not buy anything in your stores again over this stupidity. There are plenty of other retailers and e-tailers out there.

[UPDATED] So I got Gears of War afterall :-) I don't understand what scheme *cough* scam *cough* Microsoft and GameStop/EB are running. Target will not have the game in stock at the Bridgewater, NJ location until Thursday 11/9, Best Buy Bridgewater, NJ was not going to have the game until today, Wednesday 11/8. But I called the EB Games in the Bridgewater Commons mall when I got home last night, and they said sure they would sell me a copy if I walked in, but not the collector's edition. So I went, and even then the guy behind the register hesistated a second when I told him I wanted Gear and I hadn't pre-order. He then pushed, hard, for me to pre-order Halo 3 or buy the $3 disc insurance for a year, but I had none of that and walked out of the store with game in hand.

Gears itself, oh my. The graphics are easily the best seen so far on the 360, but you know the graphics really don't matter if the game play sucks. But Gears doesn't! Far from it, the "pop and stop" action is furious. The AI is very good, and the game is funny, at least to me, it seems to embrace and at the same time make fun of huge military action movies, Arnold Schwazengeer's Predator (one of my all time favorties) comes to mind "get to the chooooopper!!!" My only serious complaint at this stage is that I was wishing the moving from one cover location to another was more sticky, but maybe I just don't have the complete hang of the controls yet. If you have ever liked action games, you really have to pick this up.