Last week at the Commonwealth Club of San Francisco, Microsoft’s Top Environmental Strategist and Google’s Green Energy Czar went head-to-head in front of a live audience. The topic: cloud computing and energy.

The IT sector represents 2% of global electricity use, comparable to that of the airline industry. But IT’s share continues to grow as more and more of our personal and professional business is conducted in the cloud.

So, the question that Microsoft’s Rob Bernard and Google’s Bill Weihl are grappling with is: Will cloud computing help or hinder our transition to a clean energy economy?

The jury is still out.

The tech duo spent a healthy portion of the program discussing the energy efficiency gains resulting from their data center design improvements and the dematerialization of society at large. Microsoft released a study on the subject late last year, though largely devoid of useful data.

But my favorite quote of the discussion came from Weihl, who is without-a-doubt a very smart and sciency guy, but whose mathematical studies may have suffered for his reliance on artificial intelligence.

While addressing the IT sector’s mounting grab of the global energy pie (growth largely driven by the increased electricity required to power large data farms), Bill stated, “Yes, the 2% will grow, but the other 98% will shrink.”

By my walnut-for-brains calculations, if 2% out of 100% grows, the other 98% is categorically required to shrink. But, hey, maybe I’m just mincing words.

The point is that even if cloud computing enables society to centralize information storage in data centers and do more day-to-day stuff online, there is still limited evidence that cloud computing will displace, rather than add to, our current energy demands. And without proper attention to the sources of energy that these data farms use to power the cloud, the trend actually threatens to increase demand for dirty energy. No amount of energy efficiency can solve this problem.

Of course it’s all part of doing business. Google and Microsoft save money when they improve their efficiency. The economic savings are immediate, inherent, and they provide cover for these sustainability guys when they pitch efficiency measures to the bottom-line types.

Less cynically, however, both companies do evangelize in different ways to the rest of the sector on how to drive more efficient IT. Microsoft, by demonstrating improvements to software coding that uses less power. Google, by sharing its energy efficient data center designs.

Google can also be congratulated for taking the source of energy slightly more seriously than other IT energymongers. At Friday’s event Weihl acknowledged that efficiency is not enough.

“What we need to do is move to cleaner sources of electricity,” Weihl said.

Google has made moves lately to make those sources more affordable and drive deployment. The company invested in North Dakota wind in May 2010 and entered a long-term contract to purchase wind in Iowa, which provides price certainty to clean energy developers, which can accelerate additional renewable energy investment there.

However, contradictions still abound as these companies move first for convenience and cost savings, and continue to make excuses for the lack of bolder action on clean energy. IT companies love to talk about the energy savings that could be unlocked if IT is used to provide information to the end consumer, yet these companies won’t disclose how much dirty energy is being used to supply their own platforms.

For example, both companies have developed energy management software, which relies on the disclosure of consumer data to track electricity consumption. The end-goal is to educate and ultimately reduce consumers’ electricity usage by helping them manage it better. Google’s PowerMeter and Microsoft’s Hohm energy software rely on information transparency, so both companies are lobbying utilities to give away more of their consumers’ data.

But when an audience member at the Commonwealth event challenged Bernard and Weihl to explain why they don’t disclose more information to consumers about the energy impacts of their own web applications (wouldn’t it be cool to see how much energy you use each time you send an email through Gmail or Hotmail?), Weihl responded that he didn’t think anyone would actually do anything with that information if it were provided.

This begs the question: Why is there a double standard here? If PowerMeter and Hohm were built on the assumption that knowing how much energy we use helps us save energy, why would our personal computing footprint be an exception? Why would we care about our hairdryer but not our email account? I, for one, use Gmail far more regularly than I blow-dry.

But at the end of the conversation, it was at least noted that what we have here is a failure of leadership. Companies often don’t do things that aren’t in their own narrow self-interest. We’ve seen Google try to prove this wrong with its strengthening policy advocacy and clean energy investments. Microsoft, not so much.

Ultimately, both companies seem to retain a bit of split personality when it comes to addressing the growing energy impacts of cloud computing. Let’s hope that good wins over evil.