Data centers across the world use about 30 billion watts of electricity, about the same as the output of 30 nuclear power plants, with digital warehouses in the U.S. accounting for one-quarter to one-third of that load, The New York Times reports.

Those are huge numbers for an industry that often puts forth an image of environmental friendliness.

Consider Apple's soon-to-be-built research and development complex near its Cupertino, California, headquarters. The building, which will look something like a spaceship, will be entirely surrounded by a thick layer of trees and will be powered with its own energy center that will run mostly off the grid.

Yet in a year-long investigation, The Times found that "most data centers, by design, consume vast amounts of energy in an incongruously wasteful manner."

It adds, "Online companies typically run their facilities at maximum capacity around the clock, whatever the demand. As a result, data centers can waste 90 percent or more of the electricity they pull off the grid."

In addition, to prevent power failure, they rely on vast numbers of generators that spew diesel exhaust in amounts that often violate clean air regulations. In fact, many Silicon Valley data centers appear on California's Toxic Air Contaminant Inventory, a list of the biggest stationary polluters.

Microsoft/Facebook

"It's staggering for most people, even people in the industry, to understand the numbers, the sheer size of these systems,” Peter Gross, a man who has helped design hundreds of data centers, told The Times. "A single data center can take more power than a medium-size town."

Want to see some of the largest data centers around? Check out Mondo Data Centers, an interesting story that shows just how huge some of these digital warehouses are.

Not all are environmental abusers. For example, eBay's 245,000 square-foot data center in Delta, Utah, is LEED Gold certified and is 50 percent cheaper to operate and 30 percent more efficient than previous eBay facilities, partly due to the 400,000-gallon water cooling cistern that collects rainwater and can keep the building cool for 7000 hours without drawing any electrical current.