« December 2006 | Main | February 2007 »

January 2007 Archives

January 4, 2007

Sysinternals to the Rescue!

I've known about Sysinternals (now owned by MS) for a long time, but I didn't, and still don't have a full appreciation for the extreme value of their utilities.

For a long while now, I've been trying to revive Qian's computer. It's an old IBM thinkpad R series, with a 1.13Ghz P3, and 384 megs of RAM. And it's dog slow. With more than one app open, it starts thrashing. I poked around with task manager and even Process Explorer to see what's going on, but things seem pretty kosher.

Today, I tried the Autoruns utility as well as the PageDefrag utility, both from sysinternals. The former gives you a huge catalog of all the things that can automatically get loaded in your system. I disable a bunch of unnecessary startup items (qttask, and webcam related items). I also found that the "Logitech Desktop Manager" app had registered a bazillion protocol handlers (literally like 50 dlls) which I think were being loaded in to explorer.

The PageDefrag utility shows you the fragmentation state of the two big system files on your computer: the virtual memory swap file, and the hibernation file. In this case the swap file had only 5 fragments, which isn't cause for too much concern, but the hibernation file had 32,000+ fragments!

Because the system takes exclusive locks on these files, the PageDefrag utility gives you an option to defrag these files at next startup. As I write this, it's been working on the hibernation file for a good 5 minutes.

Of course, I know that the only real way to make this machine faster is upgrading its hardware -- maybe 700MB ram and at least a 5400rpm drive. But at least now I have a hope of getting its performance back to the fresh OS install level.

Happy New Years

I'm debating whether I should create yet another blog that's more like a journal. At least that would let me concentrate on tech-related things here.

Anyways, since I haven't really gotten around to that yet, this space will have to do. I need to write down my new year's resolutions.

  • Waste Less Time: Try to spend less time doing things that amount to nothing. This is intentionally a very broad resolution. The point is to minimize that feeling after you feel like you've just wasted the past [insert amount of time] doing nothing worthwhile.
  • Be more aggressive about buying things that enhance my life: It seems aside from the basic necessities, there are two kinds of purchases. Purchases that somehow expand or enhance your life experience, and those that don't. I've spent a lot of time the last year regretting the fact that I hadn't been more aggressive in former type of purchasing. Whether it be adding another monitor to my setup, or buying a printer, or a DS Lite, or a cellphone, or a digital piano, and on and on. I've just sat and waited, and to some extent I feel like I've missed out on things.

    There's a certain joy to being at the front of the technology curve. But there's also a lot you can learn from it. Keeping yourself exposed to all the latest stuff, understanding the current problems, etc, are all important aspects of keeping yourself relevant as a technology developer.

    So this resolution is about trying to be less trigger-shy when it comes to things that will help me stay ahead and broaden my experience.

  • Corollary: Waste less money on things that don't matter: This is just the flip side of the previous item. Actually, the two combine into a single mindset of being more conscious about why I'm buying things.
  • Keep in touch with people: There's so many people on my various buddy lists that I talked to for maybe a year or two of my life, then dropped. It'd be nice to reconnect with them, and try to keep something gonig.

January 7, 2007

Toy Apples

I went into the Apple store for the first time in months today--a day before Macworld--and came away disenchanted and disappointed. Even as Macworld is about to begin, I can't imagine anything that his Steve-ness bring into this world that would rekindle my enthusiasm about the whole Apple platform. It's a rather depressing feeling for someone who used to drink the koolaid.

At the store, I waited around a while to play with a Core 2 Duo iMac. As soon as I started to move the mouse around, it all came back to me. All the little annoyances and disappointments that, as a koolaid drinker, you try to just ignore or rationalize away. The first rude reminder was the weird mouse acceleration. With OSX's default settings, the mouse just moves (or rather, accelerates) too slowly! argh. Fine, whatever, you can tweak that in System Preferences, but you never get exactly what you get with Windows (mainly because you can't tweak sensitivity and acceleration separately; I always want very low acceleration and medium sensitivity).

I've lately been searching for a good RAW workflow in Windows (details coming in another post), and was eager to be re-inspired by Aperture's completeness and simplicity. So I fire it up on the iMac, and start poking around. The first set of images loads, and I start scrolling through them. Then I see the familiar loading overlay message over the preview, with no visible progress. The Core 2 Duo is supposed to be way beyond the PPC G4 in terms of performance, and yet I'm still sitting here waiting for this image to load. There are tons of PC programs that can handle this without breaking a sweat.. grr.

I then try to switch to another album... beachball.

This is a brand new machine for [insert deity here]'s sake! What is the point of switching to a new architecture and raving about the "4x performance increase" if the user experience is exactly the same? They may have dramatically improved the hardware, in doing so, they've also illuminated serious software performance issues. It will likely take someone like Adobe to show everyone how it's done.

I looked around the rest of the store, and couldn't help but notice that everything just seemed like toys. Maybe it's only because I've been using an X60 Thinkpad for a while. Apple laptops can look nice, but also very consumery. Even the MacBook Pro's design looks somewhat dated. Silver is out. Meanwhile, the black Thinkpad look has been a classic since forever.

And then I was reminded that there's non-obvious piece of wisdom that I only really learnt after using a Mac for a year. It's this: if you're Apple's target user, then their stuff is great. If you deviate even a little bit from the predetermined user classes, then you're screwed. You're either a Pro with tons of cash, and everything you own has a "Pro" suffix on it, or you're a total noob who doesn't care about how iPhoto happens to arrange your photos on disk. Everyone caught in between just has to deal with random hacks, shareware apps that keep breaking because of OS upgrades, or would you prefer an OSX hint?

Apple's free to take whatever approach that it chooses. But in the general scheme of things, it's hard to see a closed platform that caters only to very specific users winning out in the end. If Apple decides to change course and open up their platform and make their software more flexible, they'll suddenly collide into the same problems that Microsoft has been dealing with for years. There's no indiciation that Apple would be any better at solving those problems, so maybe they are better off creating their niche products.


January 9, 2007

Macworld Keynote Reaction

Apple TV: meh. It's still too locked into iTunes. I've already got a PC hooked up to my TV, which works fine, and I'm looking at a SqueezeBox to hook up to the Rhapsody catalog.

Yea yea yea, the iPhone is cool. It'll be great if all you did was browse the occasional webpage, send sms messages, and view photos. But what about hooking up with my work's Exchange server? or hooking up with Rhapsody? I'm not holding my breath.

It took Apple forever to even allow simple things like different games onto the iPod. How long until they open up the software platform on the iPhone? (and not just widgets!) Maybe not very long, but Steve didn't mention anything about that, which is cause for some concern.

Either way, it's damn expensive. And I'm not up for a Cingular upgrade discount for another year. Thus my verdict is a solid "wait and see."

Update: There are some reports that end users won't be able to add applications to the iPhone. That sounds too stupid to be true. Maybe it will take them a few iterations to figure it out, but I'm definitely not getting one if there's no way to get around the Apple lock-in.

January 12, 2007

Score! I hope: NEC 2070NX-BK

I've been agonizing over a new monitor to buy for my home setup. I couldn't decide between a 24 inch "non-S-IPS but large and bright" versus a 20 inch "smaller, but S-IPS" model.

Then I saw an auction on eBay for a new NEC 2070NX (which falls into the latter category). I managed to manually snipe it (bid it up by the minimum increment in the last few minutes) and win for $355 final price with shipping. (compared to $500 w/ shipping new from newegg.com)

Now to see if I actually get what was advertised...

January 13, 2007

Technorati

Apparently, the correct way to use Technorati is to create an account, then claim your blog.

The claim process is interesting. You to embed a special link: Technorati Profile, and have their crawler pick it up.

Update: for Wordpress, apparently you can just provide a username and password, and they'll do a fake login and figure out the rest.

January 15, 2007

Tweaking the screen update rate on VMware Workstation/Player

I try to use VMs on my developer box at work, but I have been always annoyed with what I felt was "choppiness" or "chunkiness" in the guests' rendering rate. I asked around, and I found out that this was actually configurable.

The parameter is svga.maxChangeTick, and it can be set in the .vmx file of a VM (make sure to power off or suspend first). It controls the rate at which the host side polls the communication channel to the guest's virtual SVGA device to check for new screen changes from the guest.

The default value of this variable is 4. The value is divided into 100, and the result is used as a update frequency. So 100 / 4 = 25 hz.

Anyone who's played an FPS knows that you can feel the difference between 25hz and 50hz. It's unclear whether you can actually see more, but 50hz definitely feels more "smooth".

To set your update rate to 50 hz, try putting a svga.maxChangeTick = "2" in your .vmx file. You can also try "1" (it has to be a positive integer value) for very frequent updates, but I didn't really see too big of a difference in my experimentation.

The downside to this is that because you're polling for updates more frequently, you're more at risk of seeing "intermediate" drawing state. For something like WinXP, especially, because apps draw straight to the front buffer, you never know if at any point in time the contents of the screen are in a 'consistent' state (i.e. did a guest app just finish a complete rendering pass?). The more frequently you try to synchronize with the guest, the more likely that you may synch up with the guest while it's in the middle of drawing something.

But even in this case, this 'inconsistent' state only last for a mere 20ms (when updating at 50hz). Usually short enough that it's not bothersome. YMMV. I vastly prefer the effect that my VM feels like a native machine. The apps are still slower than native, but the rendering latency and general "smoothness" are much closer to real hardware.

You're also going to burn more CPU on the host, but when you're just dragging windows around, CPU is usually one of the last things you're worrying about.

January 16, 2007

The last straw for IE7

I've been pretty enthusiastic about IE7 since it came out. It seems faster, has tabs, and handles most websites pretty well.

Recently, I've come to have a more negative view. Some of it is related to IE7's UI quirks, some of it is just performance. Specifically:

  • There's not enough room for tabs (the bookmark buttons as well as the other buttons on there right just take room away)
  • It never remembers the layout of the toolbar add-ons correctly. This is particularly irritating with 3+ toolbars.
  • It's slower than Firefox on the same machine
  • It temporarily freezes a lot (probably a few times a day, for a good 30 seconds or so. reason unknown, and this is on a machine with tons of memory that's not doing much else)
  • Occasionally crashes. More than Firefox.

I'm also not convinced that memory usage with IE7 is much better. That was one of the original reasons I switched to it from FF 1.5, but 2.0 seems ok, and on a machine with 2GB, it just doesn't matter that much.

Anyhow, the last straw was when it froze while I was taking my online traffic school test. Right in the middle of it. No fancy Javascript. No nothing. I had to kill it and restart my test.

The only real downside of going back to FF is that now I get the crappy version of the Outlook OWA interface again.

January 17, 2007

Moving to x64

At work, I finally took the plunge into running a 64 bit host OS on my main desktop. I've been hesitant the past several months, but a 2GB memory upgrade (pushing me up to the magic 4GB) finally pushed me over the edge.

It's not that you can't use 4GB on a 32 bit windows install. Rather it had more to do with my hardware. I have an HP xw9300 workstation, which uses AMD Opterons over a hyper transport bus. What I didn't realize is that the topology of the memory and the CPU's is different from plain old SMP. In AMD's picture, each CPU has it's own memory banks, and pairs of CPU/Memory are connected to each other over the Hyper Transport bus.

That's all fine and dandy, except that XP 32 bit doesn't understand this topology. So installing 2GB on each CPU's memory bank still only yielded a total of 2GB physical memory showing up in the task manager's performance tab. Curiously the CPU-Z could see things just fine, and XP still seemed to understand that there were 2 physical CPU's. I've been running XP for a while now.. makes me wonder what it's been doing all this time.

Feels a little weird to me that we've finally hit the point where a fairly reasonable developer configuration can pass the 4GB barrier. Seems not too long ago that we were still dealing with 16bit legacy applications on a 32 bit platform.

Thankfully, this time around, the bit-doubling transition is much easier. On windows, as long as you have x64 drivers for your hardware, you're set. Most apps, including 32 bit ones, worked out of the box on my new Server 2003 x64 install (I chose w2k3/x64 because I needed the nfs server). It's certainly far less troublesome than the DOS to Win95 transition, with the mixing of real mode and protected mode programs.

The only app that doesn't work is Rhapsody.. and I've read on their forums that it doesn't work on XP/x64 either. There's no reason why this program shouldn't work. It's probably just something really dumb that hopefully they'll fix very soon. Fortunately, the Rhapsody player engine still appears to work, so I can at least use yotta music to stream Rhapsody to work.

Setting up an NFS server on Windows Server 2003 R2

For some reason, the setup process for the NFS server on Window Server 2003 R2 is very different than it is on XP. Note that what I'm about to describe is for sharing a directory hosted on my Windows box to another machine on my switch. No integration with active directory or anything like that.

First of all, make sure you have all the components installed. This can be done from the Add/Remove Windows Components option from within the Add or Remove Programs item in the control panel.

Other Other Network File and Print Services (click Details), there's another sub-window for Microsoft Services for NFS.

In the components list for Microsoft Services for NFS, I made the original mistake of checking only the things that I thought were required. In the end, I ended up installing everything, so it's really much easier to just install everything from the get go.

Once that's all done there should be a Microsoft Services for Network File System entry in your Administrative Tools list. Clicking on this brings you to a somewhat familiar looking (if you've done this on XP) window with a list of NFS related items on the left. The major difference from the XP version is that when you click on each item in the left, the larger right window pane only shows a help message. The way you get to the actual setting values is by right-clicking the items in the list on the left. Took me a while to figure this out, and I still don't understand why it was done this way.

Anyhow, here's the checklist:

  1. Make sure your username mapping service is running and configured correctly. You can start and stop it through the right click menu on list entry on the left of the configuration window.
  2. Make sure you set your nfs server to use the local username mapping server. You can do this by issuing the following command in a shell:
    c:\> nfsadmin mapping \\<yourhostname> config mapsvr=localhost
    
  3. Make sure you server for NFS is running, and set up exports. You can do the former through the standard Services mechanism, and sharing is set up almost like normal windows file sharing. Start by right-clicking on the folder you want to share. You can also use the nfsshare command line utility if you prefer.

That's it for the Windows side. The one last thing I'll mention is something I found out the hard way. Linux nfs clients have bad defaults (performance wise) for nfs mounts. Most importantly, the values of rsize and wsize default to 1024, which mean a request is made for each 1K that needs to be read or written. Obviously, this doesn't even fit all small files, so even for sharing source code this sucks.

Because I'm on my own switch, I bumped this up to rsize=16384,wsize=16384 and the performance improvement is like night and day. YMMV, but 1K is most likely too small for most situations (it even says so in the Ubuntu man pages). They probably didn't bump up the defaults for some archaic compatibility reason.

January 26, 2007

What Mathematicians do when they're bored

No description required.

January 31, 2007

Thinkpad X60 Review

I've had my X60 for a few months now, so I've developed quite a few opinions about it. But first things first, the specs:

  • 12 inch 1024x768 screen
  • Intel Core Duo T2400 1.83ghz dual core processor
  • 2GB of system memory
  • 100GB hard drive
  • Built in intel wifi, 3 USB ports, one firewire, SD slot, PCMCIA slot, GigE port

Looks: The X60 looks pretty much like any other Thinkpad. Classic and black. If you like Thinkpads, you like the X60. If you don't, then well, there aren't any pleasant surprises in store.

Likes:

  • Keyboard illuminator light. Not sure I like it better than the Apple backlit keyboard, but it works pretty much just as well. Plus you can use it to illuminate other things than the keyboard.
  • Battery life. I get an average of 5 hours+ with the large battery with my average use pattern. 6 to 7 hours is not unheard of either. On my Powerbook G4, I used to get 2.5 to 3 hours tops.
  • Wireless disable switch
  • Keyboard feel. Thinkpads are known for their nice keyboard, and the X60 lives up to the reputation. But there are a few gotchas (see below). Also, overall, I'd say I prefer the Powerbook keyboard. It had switches that required less effort to press down.
  • Keyboard Drain Hole. Nice to know its there, even though I haven't needed it yet.
  • Sudden movement detection and hard disk parking. Every laptop should come with this.
  • Build. It feels as sturdy as the T series.
  • It's light. Even with the bigger battery.
  • Heat. It doesn't get very hot, even under heavy usage
  • Quiet. It has a fan that runs sometimes, but it isn't very loud.

Dislikes:

  • Thinkvantage software. Some of it is marginally useful, most of it is useless. The only thing I use are the volume control OSD, the external monitor profile switcher, and the undock menu. I tried the network location manager thing, but found that it sucks compared to Apples version, so I just uninstalled to use to the basic XP stuff
  • No touchpad. I know they don't have space, but the nub hurts my finger after a while.
  • Scrolling sucks. Two fingered scrolling is definitely the right way to do this. Aside from not working very well, the middle button + nub scroll doesn't even work in a large number of applications.
  • No ports on the back. Ethernet is on the left, and power is on the right. This means that whenever I'm hooked in, I usually have cables coming out both sides, which is kinda ugly
  • Keyboard Gotchas. They added the windows key, which makes the control and alt keys very small. I don't mind the control key so much, since i remap caps lock, but having a small alt is really annoying. Also ESC is a small key right above F1, and I always hit F1 when I mean ESC, which gives me the help menu in Vim. The backspace is only a normal sized key, and backslash is a half-sized key.
  • Screen. XGA is too small to get any real work done, though its fine for doing non work stuff. At this form factor, its hard to complain. My bigger complaint is the poor viewing angle of the screen. It seems particularly bad on the vertical axis.
  • No DVI. I can tolerate XGA on the builtin screen, but not being able to hookup to a Flat panel in digital mode totally sucks. And worse yet, even the docking station doesn't have DVI. I seriously hope this is the last X-series with this misfeature.
  • Sound quality: isn't the best. Sometimes it picks up noise from the network. Standard set of problems that come with cheaper sound parts. Oh well, hardly any laptop gets this right

I guess it seems like I have more complaints than things I like. But all in all, this is the best laptop I've ever used. The positives generally outweigh the negatives, which are more like minor annoyances anyways.

There are definitely a few usability things that I miss from the Powerbook, but they're not fatal. Some of it is just what you get for using Windows I suppose.

The X60 has definitely redefined my expectations for battery life in a laptop. If only for that reason, I'll probably be stuck on this sub-notebook form factor for a long time to come. Though if Apple did manage to ship a similar form factor machine with comparable battery life, I would seriously consider switching back.

About January 2007

This page contains all entries posted to LevelsOfDetail in January 2007. They are listed from oldest to newest.

December 2006 is the previous archive.

February 2007 is the next archive.

Many more can be found on the main index page or by looking through the archives.