19th June 2008

Installing Vista SP1 Follow Up

Yesterday I wrote about problems installing Vista SP1 on this machine. Running the “download and run it yourself” installer worked fine with one little glitch. The issue was that I first downloaded the SP1 setup that only contained 5 languages, thinking “hey, I only really actually care about English”. The catch is that it won’t run if you have any languages other than those 5 installed. I had previously installed a ton of languages since they were just check boxes in Windows Update.

Uninstalling languages turned out to be a nightmare. First of all, you can’t uninstall from “Programs and Features”, you have to go into “Regional and Language Options”, go into the “Keyboards and Languages” tab, click a button, click another button. Then most of my attempts to remove languages would fail (after sitting doing something to my computer for what seemed like 30 minutes), PLUS it requires a reboot after each one (even though I’m uninstalling languages I’ve never ever used).

So the solution ended up being downloading the “all languages” version of the Vista SP1 package. The 20 minutes the download took was way faster than uninstalling the languages. Upgrade felt like it took a long time- I could be wrong but it feels slower than initial setup (which does make some sense since initial setup can just write an image down on your disk while upgrade is presumably doing more real work).

All is well now and so far the machine is running smoothly.

posted in Technology, Vista, Microsoft | 0 Comments

18th June 2008

Problems Installing Vista SP1

I’m having a problem installing Vista SP1 on my main workstation. Microsoft Update keeps throwing a Code 80070570 error which has no real description. The best hint I can find searching the net is that it might be related to some disk issues, but running a CHKDSK to fix errors didn’t make the problem go away.

My next attempt is to download the standalone upgrade- its possible the problem I’m experiencing is with Microsoft Update rather than the service pack itself.

posted in Technology, Vista, Microsoft, Software | 2 Comments

9th June 2008

Microsoft Velocity and Memcache

Just saw a post about Microsoft Velocity, Microsoft’s answer to memcache. I’m looking forward to checking this out soon- we have had a ton of success using memcache on the LAMP platform and it was a missing piece in the .NET world. I understand why it was a bit hard to see its importance in that environment- Unlike PHP, .NET can persist things in memory in between requests. PHP really needs memcache quickly since you can’t really save anything from request to request so you go to the database very quickly. But as your system grows Memcache fills an even more important role because of how easily you can scale out adding more caching servers.

Memcache (at least the standard one) has a few problem scenarios all revolving around how it so easily shares the load between servers. The coolest thing about memcache is how simple of a mechanism it is- no complex configuration to tune (there are a few things to tune), maintain, debug. You simply configure N memcache servers on all your web server, and when you save or retrieve an object, it takes the ‘key’ (an arbitrary string), hashes it and uses the hash to pick one of the memcache servers (in effect it does H(key)%N where H is the hashing function and N is the number of servers). In effeect you automatically get a smooth distribution of your keys across your caching servers.

However, if you add or remove memcache servers from the array, it changes the hash, so all of the sudden your keys are on different servers. Now, if your site is under low load, this isn’t that big a deal- you just dumped your whole cache and it will build back up and be fine. But if you are running memcache because you really need it, your site just went down as all the web-servers just started pounding directly on the database with every request. Right now DeepRockDrive has a pretty unique situation where we get huge spikes of traffic (that are mostly predictable- showtime) during which the memcache servers really save our bacon, and most of the time we can clear them out more or less safely, but most big sites are going to have a more consistent traffic pattern and would have a harder time with this.

This also means that if you a memcache server goes down you can’t just pull it out of your configuration (at least under normal load). You really really need to replace it. The easiest (although resource intensive) way to do this is to just have a hot-spare server or two in your track. If one of your memcache servers goes down, you map that spare to the same IP and bring it up. You just lost a portion of your cache (10% if you have 10 servers, etc..), but its way better than losing the whole thing. A more complicated setup would be to run multiple instances of memcache on every machine. So if you have 10 memcache machines, you run each with 3 IPs and it looks like your whole array is 30 “servers”. If one goes down, you bring those 3 IPs up on 3 of the other machines distributing some of its load to those machines.

We hadn’t had a chance to fully work out the scalability of the standard memcached running with multiple instances on the same box so far. We have played with it some and on our 8-core boxes even with the right threading libraries we haven’t gotten close to maxing it out with a single instance of memcache. It looks like there may be some I/O limits but I can’t be sure about what is actually going on, still the notion of running multiple instances on the same box seems like a fairly reasonable one for scalability and these fail-over flexibility cases.

The other tricky issue is that memcache gives you a balanced distribution of keys but does not necessarily give you a balanced distribution of access. Lets say you had some runtime configuration information that you wanted to persist on your site. The easy thing to do would be to save it in a key called ‘config’ and just retrieve that key on every request.

What you have accomplished here is to just introduce a nice hard-scalability limit into your system. Memcache isn’t actually that much faster than MySql is for basic queries. If MySql can cache the query well (as it would be able to for a query on a simple table that just gets hit over and over), the performance of the two will be pretty similar. Where memcache shines is that because of how its keys and the hashing thing work, it can transparently distribute that load over the multiple servers. So the person building the app with the ‘config’ key will have something that looks great as its small and on one caching server and then when they try to apply it to a high load site with multiple servers. All the traffic still just goes to the one memcache server (since its one key that gets hashed the same every time) and they will typically be stumped why the performance isn’t better.

The way around this is to generate keys that look something like-

‘config-’.rand(0,9)

(php syntax)

At first this is counter-intuitive. I’m storing the same thing in 10 keys? That means that when they expire I’m going to have to go back and do 10x the initial loading of this object (whether from the database or config files or whatnot). However, at the cost of a very small # of those database queries (they only happen once every 5 or 60 minutes right), I’m spreading my keys out across my memcache array and the result is that the load gets spread smoothly across my whole array. I can even do a couple of slick extra things like every time I refresh the config data write to all 10 keys at once, resulting in no extra load on the database (except for a race condition I’ll cover in a future post) and just a small amount of occasional load on one web server.

I started this post mentioning Microsoft Velocity and then went into memcache- looping back to Velocity, in typical Microsoft fashion it looks like its a much more complicated solution, but it also automatically deals with some of the above issues. As far as I can tell from a few architecture diagrams the servers maintain knowledge of a cluster (memcache servers have no idea about each other) and I’d assume they automatically deal with some of the fail-over and “add a server” cases. It also has a more explicit concurrency model- although memcache supports building things with much of the same concurrency behavior you need to manage it a bunch more yourself.

Looking forward to checking out velocity more later. In particular I’m interested in when the protocol to talk to the servers will be published and whether there will be support for PHP/Python clients talking to these servers.

posted in Technology, Microsoft, Developers, Software | 1 Comment

2nd May 2008

Microsoft Mesh Second Impressions

I mentioned last week that I was going to have a hard time playing with Mesh because it won’t run with UAC disabled. First of all, Microsoft did post an explanation of why the current version requires UAC. I understand the explanation, but it is one of the typical cases where teams have to build on this internal technology and that one and this other one, none of which are ready for prime-time and all of which aren’t necessarily focused on actually providing user value…

In any case, I did install it on two XP machines. I’m about to shut it off. I noticed one of them was running a bit slow lately and checked the task manager. Mesh is using 490MB of memory, and has consumed 9 hours of CPU over the past couple of days. And in case it wasn’t clear, I haven’t really been asking it to DO anything…

I’m also mildly annoyed that the process is named “Moe.exe” so it took a small amount of digging to figure out what it was that was consuming all my system resources. They also have a second process called MoeMonitor.exe that somehow has consumed over 1.25hours CPU and 33mb RAM. It appears to be responsible for the task-bar icon.

posted in Technology, Microsoft, Software | 2 Comments

3rd October 2007

Microsoft Releasing Source Code for .NET

Microsoft is releasing the sources for the .NET frameworks including most of the base libraries, XML, and even stuff like WPF. This is great- it will make it a ton easier to debug things, understand performance implications and more.

There are some people complaining that they aren’t open sourcing this stuff, but I think that is unfair. What is great here is that they have realized that they can still retain the rights to the IP while providing these sources to developers to make the platform better to build on.

posted in Technology, Microsoft | 0 Comments

7th June 2007

Microsoft Back to the Future Spoof

Dare posted links to a Back to the Future Spoof that was used in Bob Muglia’s TechEd keynote. Great stuff. I’m touched that Bob managed to include “web store” in the great list of failed integrated storage attempts. Ahhh, good times.

I also love the “get me all the pictures of me with the CEO at the company picnic for the past 5 years”- a good semi-inside joke. I knew WinFS was in trouble when this was the most common example of why you really needed to be able to do joins on semi-structured data like documents, photos and contacts. It was a classic case of “so we have this great technology that does this thing X. Hmmm, why would anyone actually care about doing X. Lets construct a scenario that needs it!”

To be clear, its not that WinFS couldn’t do lots of more basic things that people cared about. However, other, less complex technologies could also do those other things so the team had to keep constructing odd scenarios that those alternative technologies couldn’t accomplish.

posted in Technology, Microsoft | 0 Comments

21st November 2005

Microsoft- Mini-Microsoft

A brief mention of me in Mini-Microsoft today.
Its always nice to get recognition for cool projects you worked on. I still
really enjoy reading mini, although as many people have observed his
comments section has really gone to hell. My other observation is that while
I agree with a ton of the stuff that he writes, in many ways I think his
central premise- that the key thing to fix Microsoft is to just reduce its
size a bunch, is just incredibly unrealistic. There are two key issues here-
1) Just who does the scaling back anyway? The problem is that once you have
an organization with entrenched power structures, fiefdoms, etc. as you
scale back those tend to get maintained or even enhanced. Unless the senior
management types are super-human, the fiefdoms protect themselves and the
cuts probably in exactly the wrong places. 2) Microsoft has lots of
legacy. Sometimes you can try to ignore it, but the reality is that just
about every computer user in the world today relies on Microsoft’s products
and they can’t just quit maintaining them. And this means that every time
they fix something they need to fix it across ~33 languages across 6+
different OS revs, etc. They can’t afford to just abandon their existing
customers and architectures and the reality is that much of their bulk is
because of situations like that. If people blindly took mini’s advice you
would likely have another situation like the run up to the great “security
push” and temporary abandonment of IE where people (myself included) got too
focused on the new great innovative stuff and ignored supporting the
existing stuff.

On another topic I really really need to upgrade this site- I’m going to make it my top
project to crank out some RSS feeds, etc. I’m still going to stubbornly stick to
using my own custom tools to build the site. Also if people have been connecting to
this page on alex.hopmann.org, I’ve also registered
www.alexhopmann.com since the more
normal URL structure seems to be easier for people.

]]>

posted in Microsoft | 0 Comments

10th November 2005

Microsoft- Ray Ozzie memo

When Microsoft acquired Groove and made Ray Ozzie CTO #3 (talk about having
lots of “chiefs”) I’ll have to admit that I was a skeptic. I’ve seen lots of
smart people come into Microsoft and have a really hard time figuring out
how to fit in and be effective. To be honest, with some of the recent trends
(more on that later) I was expecting it to be even harder to do anything
that would make sense.

They recently published a memo that he sent to the whole company (initially
two weeks ago). This is being positioned as the latest “Internet Tidal Wave”
memo and I’ve got to say that my reaction is actually “wow”. First of all I’m
really touched that he talks about OWA and XMLHTTP (twice!) as being some of the
key pioneering projects leading to the Internet services wave. I didn’t
necessarily expect those things to catch on quickly or be recognized for what
they are initially, but its interesting that it wasn’t really until the guy
comes in from outside that they finally get some internal recognition. I seem to
recall the Hotmail guys even analyzing how gmail was doing its stuff when OWA
was right there under their noses for 7+ years!

But beyond that, I’ve got to say that it really feels like the rest of the
memo is pretty much dead-on in a way I haven’t seen for awhile. I’m sure there
are some details you could pick on, but it looks like a great wake-up call, it
looks like something that people should be able to get their teeth into, and it
feels like some good validation for a which of the thinking we have been doing
at Pure lately.

Back to the “recent trend” thing. I was just reading Rich Tong and John Zagula’s book The Marketing Playbook. Despite the title, the book doesn’t really
seem to be directly about marketing much, but there are a few really interesting
insights. One was that Microsoft was constantly re-orging in a way that people
were constantly working on new things. Some of the strongest things Microsoft
ever did were the result of mixing up a bunch of people who weren’t entrenched
in the history of a specific area. At least back when I left in March it was
pretty common to have many of the main players in each area have been in the
same role for 10+ years. The guys running Office had been doing it forever. Many
of the people running keys parts of Windows had been doing it forever. Microsoft
still does tons of re-orgs, but they rarely involve much substantial change that
I’ve seen. I’d love to see them just swap a bunch of the dev-managers and GPMs
(ok, and GMs and VPs) between Windows and Office and shake things up a bit.

]]>

posted in Microsoft | 0 Comments