Next-generation e-science applications such as the ones found in smart cities, e-health, or ambient intelligence, require constantly increasing high computational demands to capture, process, aggregate, and analyze data and offer services to users. Research has traditionally paid much attention to the energy consumption of the sensor deployments that support this kind of application. However, computing facilities are the ones presenting a higher economic and environmental impact due to their very high power consumption. In this chapter, we provide a vision of the increasing energy problem in computing facilities with a focus on cloud computing, under the new computational paradigms, and propose solutions from a global, multilayer perspective, describing a novel system architecture, power models, and optimization algorithms. This chapter is organized as follows: Section 12.1 introduces the topic; Section 12.2 briefly describes the related work. Section 12.3 describes a novel system architecture for the global energy optimization of next-generation e-science applications. Section 12.4 describes the power models developed for the architecture, and Sections 12.5 and 12.6 briefly describe some optimization techniques. Finally, Section 12.7 summarizes the most important aspects.