The military may end up being one of green technology’s biggest customers. The U.S. Department of Defense is spending billions of dollars on everything from advanced battery and biofuel R&D to mass deployment of solar power across bases and military housing. Across the world, militaries are seeking out efficiency and sustainability solutions, both to meet government mandates and to prepare for potential energy shortages.

Green technology also includes information technology, of course. Take the core military function of logistics. Everyone knows that a modern military can’t function without abundant and secure supplies, including energy. But today’s military is being asked to go deeper, into existing buildings, vehicle fleets, supply chains and third-party contracting relationships, and to seek out and destroy inefficiencies wherever they occur -- all while maintaining their core readiness capability.

That’s how Dave Bartlett, vice president of industry solutions at IBM, describes the goals of a massive new project with the U.K.’s Ministry of Defense. Over the next sixteen months or so, IBM will be deploying its Tririga real estate portfolio sustainability management 6software, derived from the startup.

IBM bought Tririga in 2011, and has since built on the San Francisco-based startup’s core real estate portfolio management capabilities. For example, IBM has used its in-house sensor and interval meter data sampling and monitoring technology to create a new application, called Tririga Energy Optimization, that uses data analysis to seek out previously unknown opportunities for efficiency, as well as ranking them against one another in terms of ROI, Bartlett said.

Tririga already had a long list of corporate and retail clients when IBM bought it, and IBM has since used the software for bigger and bigger projects. This year it landed a contract with the U.S. Air Force to apply the Tririga platform to its 626 million square feet of real estate across 170 sites around the world, and it is also leading a consortium involved in a 50-building energy efficiency project with the U.S. General Services Administration, the federal government’s landlord.

The U.K. Ministry of Defense is close to the U.S. Air Force in terms of scale, Bartlett said. The British Army, Royal Navy and RAF control some 4,000 sites around the world, including about 900 square miles and 45,000 buildings in the U.K., as well as bases and properties in Germany, Cyprus, Norway, Poland, Kenya, Canada, Belize, Nepal, Oman and the Falkland Islands.

That makes for a big, complicated project. IBM and the MOD have until April 2014 to deliver a “number of capability releases,” that is, suites of applications for use in the real world. MOD is also undergoing a £7 billion ($11.2 billion) overhaul of its IT infrastructure over the same timeframe, which could lead to further integration with IBM’s Tririga platform, Bartlett noted.

Stay tuned for more defense contractors and energy services giants to get involved in big military base efficiency projects. The U.S. DOD spent about $15.2 billion on energy in 2010, and while three-quarters of that was spent on transportation (gasoline and jet fuel), facilities still made up the remaining quarter, or about $3.8 billion in annual spend -- a big target to tackle. The Pew Charitable Trusts has projected that U.S. military green spending could reach $10 billion by 2030, including biofuels, batteries, renewable energy and other technologies.

The military has also been a key backer of microgrids, technology that allows buildings or bases to stay running on their own power when the grid goes down. Microgrids are the focus of military projects with partners ranging from big players like General Electric, Boeing, Honeywell and Lockheed Martin to smaller specialty technology firms such as Spirae and Power Analytics (formerly EDSA).

Military microgrids can also connect back to the utility grid as well, as long as readiness isn’t threatened. Philadelphia-based startup Viridity Energy is working with the DOD on demand response, for example, and startup Blue Pillar has installed its building power sensors and software platform for MacDill Air Force Base in Florida, allowing it to fine-tune its energy management to shave peak loads, take advantage of unused backup power systems, and other such tricks of the building-to-grid energy trade.