Welcome to blog.chinoy.com Sign in | Join

January 2008 - Posts


At work, we've been using Microsoft's VirtualPC 2007 to do CRM 4.0 development for a few months now. This entails booting what's turned into a 16 gb VHD - Windows 2003 Server R2 SP2, SQL Server 2005 SP2 (w/ patches), SRS, CRM 4.0, and dev tools - VS.NET 2005, NAnt 0.86, etc. Not only is 16 gb huge, but the 1.5gb of RAM used pushes it to monsterous levels, rendering most of our developers unable to even fire up the image unless the shut everything else off. (Note to self: Shut down Firefox with the 50 tabs, 30 of which are AJAX refeshing.)

The most common optimization tricks for Microsoft's VPC involve the following:

  • Defrag your host and guest hard drives
  • Place the client vhd on a seperate spindle, aka hard drive.
    Even a USB external for the vhd makes a massive improvement in the VPC's i/o usage and external USB drives (Maxtor, Seagate, Western Digital) are getting cheap. The ultimate, of course, would be a VHD on a USB stick.
  • Get as much RAM as you can.
    If you're using Vista, don't, since Vista won't allow pegging to 4 gb of RAM (in 32-bit mode) - "upgrade" to XP.
  • Shut off all services you're not using on your host system
    From the obvious SQL Server, IIS, to the semi-obvious, anything in your tray - IM clients, video card helpers - to the non-obvious, like iPod helpers, Picasa helpers, etc. Write a bat script to help you "net stop" and "net start" these. Every 100kb helps.
  • Turn on Hardware Virtualization in your BIOS
    If your PC supports hardware virtualization, turn it on

Then there's this little goodie included in VPC 2007 (since 2004, btw) that's often overlooked (from the VPC2007 release notes):

Virtual Disk Precompactor Virtual PC 2007 includes Virtual Disk Precompactor, a utility that is designed to "zero out"—that is, overwrite with zeros—any available blank space on a virtual hard disk.

We recommend that you use Virtual Disk Precompactor before you compact a dynamically expanding virtual hard disk. Using Virtual Disk Precompactor should result in a smaller compacted virtual hard disk. After you install Virtual PC 2007, Virtual Disk Precompactor.iso is located in the folder: \Program Files\Microsoft Virtual PC\Virtual Machine Additions\.

To use Virtual Disk Precompactor, you must first capture the image file Virtual Disk Precompactor.iso. For instructions on capturing image files, see "To capture or release a CD or DVD" in the Virtual PC Help.

After you capture Virtual Disk Precompactor.iso, you can run Virtual Disk Precompactor by starting it from the CD drive of the virtual machine. To view Help for Virtual Disk Precompactor, type precompact -help. To run Virtual Disk Precompactor, type precompact.

Once you've precompacted, turn off your VPC and compact the VHD, itself.
This can be done by going to the VPC entry in the Console, pressing Settings, and using the Virtual Disk Wizard on the VHD file. There's an option to Edit an Existing VHD and Compacting it.

With all that said, I was able to get our 16gb VHD down to a svelte 13gb image. (Just in case you're keeping score here, that's not success.)

This is a post I wish I didn't have to write, because it explains how to make a perfectly fine, fast machine into something that runs slowly while also running another machine. Seems a bit silly, doesn't it?

By now, you're probably wondering why we don't use VMWare or some other solution, like, Xen? This is a good question, since VMWare's Player (not to mention images) are a few gb smaller in size when converted using VMWare Converter (takes machines and other vms and turns them into VMWare images) and also appears to have less I/O dependency (no need for a 2nd drive) and doesn't allocate RAM (no need for 3+gb for a 1.5gb image). The answer, at this time, is that we're looking into it, although I'm starting to wonder why I'm trying to optimize a machine inside a machine and when I'm going to get back to coding.

Other good tips:

0 Comments
Here's a guy you can't accuse of an assassination and expect to rest on his laurels.  This one was pretty much expected, given Mehsud's past.

Showing off his undisputed warlording skills, and further embarassing the Pakistani military's Frontier Corps, (FC) Baitullah Masood (or Meshud, the spelling of his tribal-origin name is still quite confusing in angrezi) has taken the Sararogha Fort in South Waziriztan, 80 kilometers from the town of Wana, with a 1,000 man strong force.  Most of the Pakistani military is bunkered up in cantonments and forts and doesn't really get to exercise much control in the North West Frontier Province of Pakistan.

The last we heard of Sararogha Fort was in August 2007 when a convoy of 16 FC paramilitary troopers went missing (08/10) leaving the fort and then "[the] surrender of an estimated 280 soliders, including a colonel and nine other officesers, on 30 August in South Waziristan to just a few score Taleban fighters who blocked their supply convoy on the road to the main town of Wana."  That's 280 highly trained paramilitary corps just giving up at the sight of Mehsud's troops.

The loss of the fort is a continuing blow to President Musharraf who's repeatedly attempted to assert some control over the region, both for his sake and also at the repeated urging of our military.

Washington Post, 47 Killed as Insurgents Take Key Fort in NW Pakistan, 01/17/2008
Pak Tribune, Taliban claims to have control of Sararogha Fort, 30 soldiers killed in attack, 01/17/2008
McClatchy, Islamic militants capture Pakistani fort, 01/16/2008
BBC, Pakistan crisis 'hits army morale', 09/17/2007
0 Comments

Soon, we're having our annual security briefing.

Last year, we received the below very helpful and extremely useful "Bomb Threat" note pads, just in case there was a call-in of a threat and the bomber was helpful enough to stick around for questions.  Personally, I believe the "Why" line is too short - it makes it look like we don't care enough to give a larger forum for grievances.  Also, remember this crucial bit of information: "Is there crockery in the background?"

I want to see the FBI or GSA research that dictated the priorities of the items and the categories of the queries beyond the who, what, where, when, why, how?

I'm hoping there'll be more, because I've run out.

0 Comments
So, one of the consultants I interact with has a Dell's latest high-end laptop every time I see him, ostensibly for demonstration.  I really can't see the need for a BluRay DVD drive and 2 SLI video cards, but hey, I'm not paying for him.  He runs Vista Ultimate and his background is the new feature in that version of the bloated, slow, RAM hog OS called DreamScene which allows a .wmv or .mpg to be looped as your background.  That's right, not a static background, but one in motion.  It's actually pretty visually stunning which, might I add, is the hallmark of Vista.

Like ReadyBoost and Aero, it's technology developed to compensate and distract from the OS's underlying disappointments.  Having only Vista Business, I decided to use the powers of Google to figure out whether or not I could get this exciting and productivity enhancing feature.  It turns out, I can, via some hacked dll's.  Yes, I know what you're thinking, putting hacked dll's over a suspect OS, what are you doing? Well, my public, I'm doing it for you.  After a few tries (apparently, the guy who did the hack got a cease-and-desist from Microsoft almost immediately) I found and installed the dlls that allowed me to use a few pretty scenes in the background. Do not get me wrong, it's pretty and not at all distracting when I'm using other apps.

With that said, it constantly uses 10% - 40% of the CPU to keep the loop going.  Way to go Vista, first, take my RAM, now my CPU.  What's the point of this OS again?
0 Comments
Surprize!  Musharraf has postponed the election until February and Nawaz Sharif, a longtime Bhutto rival, previously boycotting the election, is now running.
"The other, somewhat smaller, main opposition party, the faction of the Pakistan Muslim League led by Nawaz Sharif, said it was ready to participate in the vote on Jan. 8."
Clearly, an election, on schedule, so soon after Bhutto's assassination would garner a huge sympathy vote and, since a lot of PPP stalwarts can't see anything but red and blame Musharraf, well, that'd benefit Sharif. The article also states that the US is pushing for elections earlier:
"A February election date would probably be acceptable to the Bush administration, even though the Americans have been pushing for the elections to go ahead on schedule, the Musharraf party member said."
At this point, all we're doing is providing Musharraf's party someone to quote and therefore someone to indirectly blame for his actions.  We should take our time and watch him flounder. 

Granted, they can't really hold equitable elections after the post-assassination riots:
"In 11 districts of Sindh Province, offices of assistant election commissioners have been burned to the ground," [Elections Commission secretary] Dilshad said. "Nothing is left."
Well played, sirs, well played.  Now if our politicians could only stop trying to make a media event out of it (that means you, John Edwards),  maybe Pakistani politicians would take some responsibility for their actions.
0 Comments