Jurnal Arsitektur
Jurnal Arsitektur
Jurnal Arsitektur
Learn the discipline, pursue the art, and contribute ideas at www.architecturejournal.net
input for better outcomes
Green Computing
Environmentally Sustainable Infrastructure Design Green Maturity Model for Virtualization Application Patterns for Green IT
Architecture Journal Profile: Udi Dahan Profiling Energy Usage for Efficient Consumption Project Genome: Wireless Sensor Network for Data Center Cooling Green IT in Practice: SQL Server Consolidation in Microsoft IT
Contents
Foreword
by Diego Dagum 1
18
16
22
24
28
35
Founder Arvindra Sehmi Director Simon Guest Editor-in-Chief Diego Dagum Lewis Curtis (Guest Editor-in-Chief) Contributors for This Issue Rajesh Chheda Lewis Curtis Udi Dahan Kevin Francis Ulrich Homann Chieh-Jan Mike Liang Jie Liu Michael Manos Jeff OReilly Mark Pohto Peter Richardson Dan Rogers Dan Shookowsky Amaya Souarez Steve Stefanovich Andreas Terzis Joe Toscano Feng Zhao Design, Print, and Distribution United Business Media Limited Contract Publishing Chris Harding, Managing Director Angela Duarte, Publication Manager Bob Steigleider, Production Manager Camille Verde, Senior Art Director
Foreword
Dear Architect,
he theme of this issue, Green Computing, is especially important and timely: As computing becomes increasingly pervasive, the energy consumption attributable to computing is climbing, despite the clarion call to action to reduce consumption and reverse greenhouse effects. At the same time, the rising cost of energy due to regulatory measures enforcing a true cost of energy coupled with scarcity as finite natural resources are rapidly being diminished is refocusing IT leaders on efficiency and total cost of ownership, particularly in the context of the world-wide financial crisis. We are pleased to have Lewis Curtis, Principal Architect on the Microsoft Platform Architecture Team, as our subject matter expert on this topic and co-editor for this issue. In the first article (page 2), Lewis provides a holistic approach to greener architectures, and he also helped us subdivide the topic in five perspectives: Physical. The Genome research project, described in Wireless Sensor Network for Data Center Monitoring (page 28), uses heat distribution data from a wireless sensor network to optimize data center design and server provisioning in order to avoid overcooling the entire data center. Operating Platform. Hardware resources are often allocated based on a worst-case scenario that may happen with a low frequency. As a result, complete farms may be as much as 90 percent underutilized. Read Mark Pohtos article on SQL Server consolidation (page 35) to learn more about virtualization and other consolidation tactics. Sustainable Intelligence. An Energy Usage Profile (EUP) is an essential tool for measuring energy consumption in various domains such as hardware, operating systems, users, and applications, as the Software Architect of the Future explains in the article by Steve Stevanovich and coauthors (page 24). Application Development. Solution architects also have an opportunity here, as coauthors Dan Rogers and Ulrich Homann point out in Application Patterns for Green IT (page 16). Green computing discussions today tend to focus on the platform, hardware, and data centers. However, application inefficiencies, such as suboptimal algorithms and inefficient usage of shared resources causing contentions, are originators of higher CPU usage and, therefore, energy consumption. The Cloud. In their article on green design principles (page 9), Kevin Francis and Peter Richardson also cover utility computing-based delivery models. Insofar as this these models consolidate organizations, consumption has the potential to be remarkably reduced as the Internetscale data centers in which services are hosted can make efficient use of shared resources (servers, storage, cooling mechanisms, and so forth). Now and in the future, green computing will be a key challenge for businesses and presents a leadership opportunity for all architects. It is an exciting time to be an architect. Celebrating the relaunch of the Architect MVP (Most Valuable Professional) program, we interviewed Udi Dahan (Architect MVP for four years now) in our Architecture Journal Profile (page 22). We hope you enjoy these thoughtful articles on green computing. We invite you to visit the Microsoft Environmental Sustainability portal at http://www. microsoft.com/environment/, and as always, we welcome your feedback at editors@architecturejournal.net.
The information contained in The Architecture Journal (Journal) is for information purposes only. The material in the Journal does not constitute the opinion of Microsoft Corporation (Microsoft) or United Business Media Limited (UBM) or Microsofts or UBMs advice and you should not rely on any material in this Journal without seeking independent advice. Microsoft and UBM do not make any warranty or representation as to the accuracy or fitness for purpose of any material in this Journal and in no event do Microsoft or UBM accept liability of any description, including liability for negligence (except for personal injury or death), for any damages or losses (including, without limitation, loss of business, revenue, profits, or consequential loss) whatsoever resulting from use of this Journal. The Journal may contain technical inaccuracies and typographical errors. The Journal may be updated from time to time and may at times be out of date. Microsoft and UBM accept no responsibility for keeping the information in this Journal up to date or liability for any failure to do so. This Journal contains material submitted and created by third parties. To the maximum extent permitted by applicable law, Microsoft and UBM exclude all liability for any illegality arising from or error, omission or inaccuracy in this Journal and Microsoft and UBM take no responsibility for such third party material. The following trademarks are registered trademarks of Microsoft Corporation: Active Directory, BizTalk, Exchange, Hyper-V, Microsoft Dynamics, MSN, SharePoint, Silverlight, SQL Server, Visual C#, Visual Studio, Windows, Windows Server and Windows Vista. Any other trademarks are the property of their respective owners. All copyright and other intellectual property rights in the material contained in the Journal belong, or are licensed to, Microsoft Corporation. You may not copy, reproduce, transmit, store, adapt or modify the layout or content of this Journal without the prior written consent of Microsoft Corporation and the individual authors. Copyright 2008 Microsoft Corporation. All rights reserved.
Diego Dagum
Environmental Monitoring Leaders cannot manage what they cannot measure. Therefore, an organization needs good environmental measurement solutions. They need to use environmental monitoring to measure consumption and output, and to develop actionable metrics and forecasting. The following technology exists for measuring energy consumption and thermal output for data center elements: circuit meters (data center zone area or group of racks) power strip meters (group of systems or rack) plug meters (one physical system) base board controller energy consumption metering (one physical system) external thermal sensor metering (predefined floor or rack area) internal server thermal metering (one physical system). Extensible Architecture An architecture that considers environmental impact should be extensible. Due to the proprietary nature of most environmental metering interfaces from separate vendors, IT architects should aggregate these communication models into extensible communication architecture. As new metering interfaces and technologies evolve, the solution can be extended as well as normalized to reduce complexity. To design an efficient environmental metering environment, it is important to assemble a functionally decomposed environment that leverages existing services. Proprietary energy API services. Most vendors have their own proprietary API model to interface with the metering devices. Because energy metering architectures differ with many data centers, larger organizations may have more than one proprietary interface environment. It is important to set up a reliable design standard that reaches across data centers and technologies. Environmental consumption communication bus. Because of diverse proprietary environmental metering interface systems (as well as versioning changes issues), organizations should assemble a common communication bus to assemble the environmental monitoring solution into a common interface model for different metering and reporting systems. Environmental consumption data aggregation zone. This is a common data collection repository designed for frequent updates. This area is the collection point for environmental data across data centers. Configuration management database environment (CMDB). As the names suggests, CMDB environments store mostly static (or infrequently updated) system configuration information. It is important to be able to associate this information with metering systems to understand the impact of configuration decisions on environmental metrics. GHG/environmental measurement standards. Most organizations have or are in the process of defining the algorithms for measuring GHG impact. This equation usually depends on the source and amount of energy utilized. However, environmental life cycle assessment models could expand in scope as cap and trade programs mature.
3
CMDB Carbon Footprint Measurement Standards (LCA) circuit meters (usually focused on a zone or group of racks) power strip meters (usually focused on group of servers or rack) plug meters (usually focused on one physical server) server energy consumption metering (one physical server)
Power API X
Power API Y
Power API Z
Cooling PDU
Cooling PDU
Cooling Servers and Comm. Equip. PDU Servers and Comm equip
Data Center A
Data Center B
Data Center C
Often, this data depends on the organizations environmental life cycle assessment to lock down the scope of impact on metering parameters. However, it is important to keep these equations loosely coupled with the existing environmental metering environment. This allows the organization to adapt as metering standards change Custom data center data sources. In designing a common environmental metering environment, there often are unique data sources that are important for the solution. Examples include the price and source of energy for that specific data center, operational logistics data, and common data center performance data. It is usually best to keep these systems separate with some common interface standards rather than grouping them together.
Environmental impact presentation model.This is the presentation aggregation point for different user personas (Figure 1). While the architectural principles are the same, the architect can leverage many different design options to accomplish the task.
Presentation Services
e-commerce Service
Application Deployment Services System Provisioning Services Instrumentation & Monitoring Services Patch Management Services
System SKUs
Establishing a focused set of system stock keeping units (SKUs) for each tier and layer area will help you to enforce energy efficiency and consumption standards, as well as environmental impact standards for your organization. For example, when considering hardware purchases, ACPI 3.0 Systems can use advanced power management capabilities from Windows Vista and Windows Server 2008 to reduce energy consumption. For the server, consider reducing or eliminating redundant power supplies and acquiring the most efficient power supplies available. Optimizing the Infrastructure Platform Traditional modeling promotes component diagrams and physical machines between tiers. However, architects need additional information to The Architecture Journal #18
Messaging Services
Loadbalancing Service
Figure 4: Decomposing an n-tier architecture between tiers and systems service areas for focused environmental optimization
Systemic Qualities Solution Oriented Qualities Manifest Performance Availability Reliability Usability Accessibility Security Evolutionary Scalability Extensibility Reuseability Portability Availability Security Client Architecting for Your Operations Developmental Qualities Buildability Testability Understandability Balance Operational Qualities Maintainability Serviceability Recoverability Security Understandability Opex Investment Mgmt Capex Investment Mgmt Environmental Impact and Highlight make informed decisions about environmental optimization. Architects often elect for more redundancy to improve performance, availability, and scalability. While this can improve some specific systemic qualities, a culture of excessive redundancy can lead to problems. One of those problems is complexity. A small increase in architecture complexity can yield unintentional energy consumption results in large scale solutions. This is one reason why many large-scale environments use significantly simplified designs (it also usually decreases operational brittleness). Energy consumption pressures and environmental impact needs are other incentives for architects to minimize complexity. Decomposing the Infrastructure Environment To reduce the impact of key systems in the architecture, the infrastructure should be decomposed into finer grain areas for environmental focus (Figure 4). By examining each tier (Client, Presentation, Business, and Resource), the team can analyze architecturally significant decision points to identify environmentally sustainable best practices for their organization. To determine environmental impact optimization for the overall platform architecture, it is important that each tier be examined by: Solution environment Operating system environment Physical system environment. Each architectural tier can be divided into five system service areas of focus: Physical services Execution services Operating services Application services Solution services. System Service Areas Presentation Business Info Resource Solution Execution Environment Operating Execution Environment Physical Execution Environment
Solution Services Application Services Operating Services Execution Services Physical Services
multiple cores), attached devices, and allows advanced capabilities for hibernation and sleep. Also, administrators can use group policies to throttle back the maximum CPU load to reduce energy consumption when needed. Operating execution environment. To leverage advanced energy efficient computer hardware, the operating environment must be capable of using the new ACPI 3.0 hardware functionality, and it must deliver advanced performance and power management capabilities for the user and administrator. The operating execution environment is the configuration and standardization of the operating system and the supporting utilities. It is crucial to leverage the most aggressive power savings capabilities possible while accomplishing computing goals of the organization. When setting up a standardized configuration, minimize the number of running system services to reduce energy consumption. Note: Software vendors have developed various solutions that can selectively turn client systems on and off to minimize energy use. Application services environment. To reduce the amount of resources a client must use to run a fully installed application, architect teams can leverage client application virtualization from solutions such as Microsofts
Figure 5: Energy consumption approaches on the client tier
Application Services
Solution Services
Client Tier Optimization There are many ways to optimize a client environment to save energy and reduce environmental impact (Figure 5). Client physical execution environment. Acquiring an Energy Star 4.0 system which recognizes ACPI 3.0 power management capabilities from Windows Vista allows the operating system to manage power for processors (and The Architecture Journal #18
Energy Star 4 ACPI 3.0/Pwr Mgmt Capable The Most Efficient Power Supply Possible
UC SI
SI
UIP
UC
UIP
UC SI
UIP
UC SI
IIS 7.0 .Net 3.5, PHP Perl, CGI, JavaScript, NLB 5 Instances DMZ Unstrusted Control Point WS08 64-bit 5 Instances
Application Services
Custom
LAMP
Application Services
DNS
IIS 7
Use only the guest operating systems needed. Use System Center Virtual Machine Manager (SCVMM) to manage using only the guests needed. Enforce capacity planning rules to prevent virtual server sprawl. Leverage 64-bit capability with virtualization capabilities. Minimize operating system service footprint.
WS08 64-bit 12 Guests Hyper-V 64-bit 2 sets of 2 Trunking GigE Cards, 1 GigE Card (Mgmt)
2 cpu/2GB RAM
Physical Services
5 HP DL580 G5s
Minimize power supplies for stateless tiers, use bigger boxes that can be expanded in the future without using more environmental resources. The machine should be ACPI 3.0 capable. Get the most efficient power supplies possible.
5 Instances
3 Instances
Physical Services
Only allocate processing, memory and I/O capabilities needed for the short term. Excessive allocation utilizes unnecessary energy consumption and environmental resources.
Only allocate processing, memory and I/O capabilities needed for the short term. Excessive allocation utilizes unnecessary energy consumption and environmental resources.
4 cpu/2GB RAM
DAS RAID 5
DAS RAID 5
3 HP DL580 G5s
Minimize power supplies for stateless tiers, use bigger boxes that can be expanded in the future without adding more physical elements. Only use what is needed. The machine should be ACPI 3.0 capable. Get the most efficient power supplies possible.
4 Drive Capacity
Chasis Services
4 Drive Capacity
16 I/O Slots
1 of 2 Pwr Supplies
16 I/O Slots
1 of 2 Pwr Supplies
Application Virtualization solution for client systems and remote client interface solutions from new Windows Server 2008 Terminal services. However, this takes careful planning and works in a focused set of scenarios. It is important to carefully meter the full GHG and energy consumption tradeoffs for the actual deployment. Software environment. Power-aware WPF applications can use less powerintensive presentation experience based on the power state of the client. Also, some are aggregating application development best practices to minimize energy resource consumption on the client environment. From Load Balancing to Load Aggregation and Optimization Typical N-Tier design is often plagued by competing and siloed budget allocations. This design creates unnecessary duplication and produces extensive energy consumption waste in the organization.
Most organizations use multiple n-tier designs with many underutilized servers. This approach consumes more energy and increases the organizations carbon footprint. Aggregating tier areas reduces capital and operating costs, energy consumption, and environmental impact, and it simplifies management with consistent builds across the organization. Consolidating separate n-tier solutions often takes unique approaches for specific tier areas. In the next sections, we will investigate common approaches for each tier area. Presentation Tier Optimization The presentation tier represents those data center services which provide and manage a consolidated server-based user experience for users (Figure 6). The traditional example is the Web server; other examples include common portals to Wireless Access Protocol (WAP) gateways. It is in this tier that server sprawl can happen quickly as scalability demands room to
Chasis Services
SQL SRV 08 T-SQL XQuery,.NET Resource Governor Filestream Resource Tier Control Point System Service Areas 3 Instances
Operating Services
Application Services
Minimize the SQL-Server 2008 services to use the fewest resources on the server necessary.
Leverage advanced power management in Windows Server 2008. Leverage 64-bit capability. Minimize operating system service footprint.
3 Instances
Only allocate processing, memory, and I/O capabilities needed for the short term. Excessive allocation utilizes unnecessary energy consumption and environmental resources. Dont overstuff the server with unnecessary resources. Use bigger boxes that can be expanded in the future without adding more physical elements. Only use what is needed. The machine should be ACPI 3.0 capable. Get the most efficient power supplies possible.
4 cpu/2GB RAM
4 Drive Capacity
16/IO Slots
3 HP DL580 G5s
What is the energy consumption per node / per tier at predicted loads? Can the architecture be translated into specific environmental metrics per the organizations policy on environmental life cycle assessments? How does this architecture affect the energy consumption and environmental impact of both supporting data center systems and business operational activity? Often, architects focus too much of their time on answer-based patterns. The basic formula is: In a given condition, do this. While each answer by itself can be effective, combined, these architectural answer patterns can lead to unusable or unstable solutions. This is the reason that architects are increasingly leveraging questionbased patterns to study the holistic impact of architectural decisions. What are the consistently good environmental impact questions to address? As environmental impact analysis becomes increasingly
7
Physical Services
2 Power Supplies
Execution Services
IIS 7.0 .Net 3.5, PHP Perl, CGI, JavaScript, NLB 5 Instances
DNS Custom
IIS 7 LAMP
Application Services
WS08 64-bit 12 Guests Hyper-V 64-bit 2 sets of 2 Trunking GigE Cards, 1 GigE Card (Mgmt)
2 cpu/2GB RAM
4 cpu/2GB RAM
4 cpu/2GB RAM
5 Instances
3 Instances
3 Instances
4 Drive Capacity
16 I/O Slots
16 I/O Slots
Chasis Services
16 I/O Slots
1 of 2 Pwr Supplies
1 of 2 Pwr Supplies
5 HP DL580 G5s
3 HP DL580 G5s
3 HP DL580 G5s
important, it will be crucial to leverage question-based analysis technique. (For more information on question-based architectural impact analysis frameworks, see Perspective Based Architecture Reference, listed in Resources.)
2 Power Supplies
Energy Star 4 ACPI 3.0/Pwr Mgmt Capable The Most Efficient Power Supply Possible
4 Drive Capacity
4 Drive Capacity
DAS RAID 5
DAS RAID 5
Environmental impact and energy consumption are quickly becoming crucial systemic qualities for IT architectural design considerations. As this happens, it will be important for architects to understand this new systemic quality well and document successful patterns to analyze and design environmentally sustainable solutions in the future. By focusing environmental objectives and systemically analyzing the infrastructure with proper design rigor, architects can effectively lead environmentally sustainability IT projects with a higher probability of success.
Resources
Perspective Based Architecture References http://msdn2.microsoft.com/en-us/library/bb245776.aspx http://www.perspectivebasedarchitecture.com
Summary The biggest challenge facing the environment today is global warming, caused by carbon emissions. About 98 percent of CO2 emissions (or 87 percent of all CO2 equivalent emissions from all greenhouse gases) can be directly attributed to energy consumption, according to a report by the Energy Information Administration (see Resources). Many organizations today are speaking openly about a desire to operate in a green manner, publishing principles for environmental practices and sustainability on their corporate Web. In addition, many companies are now paying (or will pay in the near future) some kind of carbon tax for the resources they consume and the environmental impact of the products and services they produce, so a reduction in energy consumed can have a real financial payback. In this article, we focus on reduction in energy consumption over the full equipment life cycle as the prime motivator for green application design, with energy reduction as the best measure of green-ness. Our sole motivation is reducing energy consumption, without regard to economic impact. However, we do observe that improving energy efficiency will also reduce economic costs, as energy costs are a significant contributor to the life-cycle cost of a data center, but this happy coincidence is not explored further in the paper.
the organizations core principles to ensure that the work done by development teams furthers the organizations larger goals. Therefore, we need architectural principles from an environmental perspective that can be aligned with an organizations environmental principles.
which we describe as increasing levels of maturity, shown in Table 1. We Starting at Home Level 0 assert that higher levels of virtualization maturity correspond to lower Level 0 (Local) in the virtualization maturity model means no energy consumption, and therefore architectures based on higher levels virtualization at all. Even with no virtualization, there is plenty of scope of maturity are greener than those at lower levels, which we discuss for energy savings. Traditional design and development approaches further on. may lead to applications that are less efficient than they could be. Level 0 (Local) means no virtualization at all. Applications are all There are also a number of other design issues that can be readily resident on individual PCs, with no sharing of data or server resources. recognized in applications, and therefore, a set of rules, or principles, Level 1 (Logical Virtualization) introduces the idea of sharing can be recommended to be implemented by architects and developers applications. This might be, for example, through the use of for all applications. departmental servers running applications that are accessed by many client PCs. This first appeared in the mainstream as mainframe and then Enable power saving mode: Most PCs are idle for the majority of client/server technology, and later with more sophisticated N-tier time, and theoretically can be turned off when idle. This can generate structures. Although not conventionally considered virtualization, in fact, enormous energy savings. This has some implications for application it is arguably the most important step. Large organizations typically have design, as applications designers need to consider the platform (client a large portfolio of applications, with considerable functional overlaps and/or server) going to sleep and waking up. For example, if a client or between applications. For example, there may be numerous systems server goes to sleep while an application user session is still active, what carrying out customer relationship management (CRM) functions. are the session timeout implications and policies when the platform Level 2 (Data Center Virtualization) is concerned with virtualization wakes up? of hardware and software infrastructure. The basic premise here is that individual server deployments do not need to consume the hardware Principle: Always design for transparent sleep/wake mode. resources of dedicated hardware, and these resources can therefore be shared across multiple logical servers. This is the level most often Examples of power-saving features that all applications should enable associated with the term virtualization. The difference from Level 1 is include: that the hardware and software infrastructure upon which applications/ servers are run is itself shared (virtualized). For server infrastructure, this Testing to ensure that applications do not restrict a computer from is accomplished with platforms such as Microsoft Virtual Server and entering sleep mode. VMware among others, where a single physical server can run many Testing to ensure that an application can execute successfully when a virtual servers. For storage solutions, this level is accomplished with computer has left sleep mode. Storage Area Network (SAN) related technologies, where physical storage Making sure that applications do not unnecessarily hold network devices can be aggregated and partitioned into logical storage that appears to servers as dedicated storage but can be managed much more efficiently. The analogous concept in networking Table 2: Technology aspects for virtualization at this level is the Virtual Private Network (VPN) where shared networks are configured to present a logical private and secure Technology Aspects Virtualization network much more efficiently than if a dedicated network Maturity Name Server Storage Network were to be set up. Level 0 Local Standalone PC Local disks None Level 3 (Cloud virtualization) in the virtualization maturity Client/Server, File server, LAN, model extends Level 2 by virtualizing not just resources Level 1 Departmental N-tier DB server Shared services but also the location and ownership of the infrastructure Server Level 2 Data Center SAN WAN/VPN through the use of cloud computing. This means the virtual virtualization infrastructure is no longer tied to a physical location, and can Level 3 Cloud Cloud platform Cloud storage Internet potentially be moved or reconfigured to any location, both
10
Cloud computing provides the next big thing in computing some interesting architectural constructs, some great potential from a monetary aspect, and a very real option to provide a more environmentally friendly computing platform.
a large portfolio of applications, with considerable functional overlaps between applications. For example, there may be numerous systems carrying out CRM functions. Moving to Level 1 (Logical Virtualization) is all about rationalizing the number of applications and application platforms where there is overlapping or redundant functionality, and increasing the use of common application services so that shared application components can be run once rather than duplicated multiple times. For large organizations, this will produce much bigger payoffs than any subsequent hardware virtualization. The best way to do this is to have a complete Enterprise Architecture, encompassing an Application Architecture identifying the functional footprints and overlaps of the application portfolio, so that a plan can be established for rationalizing unnecessary or duplicated functions. This may be accomplished by simply identifying and decommissioning unnecessarily duplicated functionality, or factoring out common components into shared services. As well as solving data integrity and process consistency issues, this will generally mean there are fewer and smaller applications overall, and therefore, less resources required to run them, lowering the energy/emissions footprint and at the same time reducing operational costs. The increased use of shared application services ensures that common functions can be centrally deployed and managed rather than unnecessarily consuming resources within every application that uses them.
Server Efficiency
Servers are more energy efficient per unit of work done when run at higher utilization. This is because even though each processor consumes more electricity when it is working harder, there is a base level of power that is used regardless of what a computer is doing. Increasing the utilization does not increase power consumption at the same rate. Moreover, most servers operate under quite low utilization. Therefore there are huge gains to be had from using up spare server capacity. As described in Windows Server 2008 Power Savings (see Resources), multiple virtual machines can run on a single physical machine without consuming significantly more power than would have been consumed if that machine was operating as a standalone server. This means that for comparable levels of throughput, you can add virtual machines at very low power cost, up to the load limits of your equipment. So long as there is excess peak CPU capacity, the savings continue to scale with the number of servers you are able to virtualize. According to the Windows Server 2008 document, Running 4 virtual machines means saving the equivalent power output of three physical servers; running 10 virtual machines means saving the equivalent power output of 9 physical servers.
In addition, physical computers take up more space (even if they are blades) and need more cooling than their virtualized equivalents. Additional hardware is a considerable waste of power and resources if it can be avoided.
Table 1: Power usage comparison between OOB installations of Windows Server 2003 and Windows Server 2008
100% Watts (% of maximum) 90% 80% 70% 60% 50% 40% 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% Workload (% of maximum throughput)
Windows Server 2003 Windows Server 2008
11
Principle: Eliminate dedicated hardware infrastructure, and virtualize servers and storage to obtain energy economies of scale and improve utilization
12
The lowest-hanging fruit in the transition to virtualization are in test, development, and other infrequently used computers. Moving these machines into a single virtual environment reduces the physical footprint, heat produced and power consumed by the individual servers.
The placement and design of the cloud data center The architecture of the cloud platform The architecture and development approach of the applications that are hosted. When a customer elects to purchase electricity from a supplier, in most cases it is possible for the customer to elect to buy green electricity, and in doing so, it is possible to verify just how green that electricity is. Hopefully, your organization has made a decision to buy green power. In the same vein, you should make an informed decision about which cloud provider to use. That is not our purpose here as this article is being written when cloud services are evolving. We can, however, outline the environmental facets of cloud data center design that an organization should evaluate in selecting a platform. Firstly, the location of the data center is important. All other things being equal, a data center in a relatively hot climate such as Central Australia will require far more resources to cool than a data center that is located in a colder environment, like Iceland. Of course, there may be other considerations such as access to other green mechanisms for site cooling the point is that the characteristics of a site can help reduce the energy footprint substantially. Similarly, a location near renewable power sources, such as hydro or wind power allows for a significant reduction in carbon emissions. Different vendors are approaching the design of their data centers in different ways. Different approaches that can be used to reduce power consumption in data centers include: Buying energy-efficient servers Building energy efficient data centers that use natural airflow, water cooling (ideally using recycled water and cooling the water in an efficient manner) Efficient operation by running lights out, by moving load to the cooler parts of the data center and by recycling anything that comes out of the data center, including equipment. Some data center operators already publish statistics on their power usage, such as Google. These operators use an industry standard for measuring the efficiency of a data center through the ratio of power used to run IT equipment to the amount of power used to run the data center itself (PUE). As this space grows, it is expected that other organizations will do the same, allowing a comparison to be made. Another area that can be considered is the technical architecture of the cloud platform, as different organizations provide different facilities and these facilities can determine the efficiency of the application and therefore impact the efficiency of the overall platform. Some cloud vendors, for example, provide services that are controlled by the vendor; such is the case with SaaS vendors. In this case it is up to the architect of the calling application to ensure the efficiency of the overall architecture.
13
Embodied Energy
Embodied energy refers to the quantity of energy required to manufacture, and supply to the point of use, a product, material or service. When considering the energy/emissions impact of IT equipment, the embodied energy of each element must be considered as well as the operational energy consumption for that equipment. Embodied energy is significant. About 80 percent of the overall emissions over the complete product life cycle for a laptop are attributable to embodied energy, only 20 percent relate to in-use energy consumption. For a desktop PC and monitor about 70 percent is attributable to embodied energy. Embodied energy for a server is lower, about 25 percent of the life cycle emissions, but is still significant and must be considered. We assert that larger servers are more efficient in terms of the embodied energy per unit of capacity, compared to the equivalent number of smaller servers. Therefore, apart from any direct energy consumption savings associated with reducing the number of servers, there will be a reduction in embodied energy in reducing the number of servers through virtualization. Embodied energy means there can be a big sacrifice in deploying an application in a data center if it subsequently gets migrated to the cloud (meaning the embodied energy of the original deployment hardware is thrown away). A driving factor in moving through the virtualization levels from an energy point of view is to consider the embodied energy implications of moving up the levels. If you have to purchase a lot of new hardware to move from one level to the next, the embodied energy in these additions may negate the benefits in operational savings. This is why it is critical to consider the embodied energy as part of the entire lifecycle energy footprint during application design, and in selection of deployment architecture.
If you have to purchase a lot of new hardware to move from one level to the next, the embodied energy in these additions may negate the benefits in operational savings. This is why it is critical to consider the embodied energy as part of the entire life cycle energy footprint during application design, and in selection of deployment architecture.
Getting a Return on the Embodied Energy Costs of Buying a New Virtualization Server
We define the following: N the number of servers to be virtualized on a single new physical server B embodied energy ratio (embodied energy of new server divided by total energy consumption of that server over its life cycle) E efficiency factor (energy consumption of a single new server with capacity equivalent to the original N servers divided by energy consumption of N original servers, assuming the same technology and utilization, for the projected life) T technology factor (energy consumption of new servers per unit CPU capacity divided by energy consumption of old servers per unit CPU capacity) U = utilization factor (utilization of old servers divided by utilization of new server ) To pay back the cost of embodied energy and realize a net gain, you need: E x U x T < (1 - B) If a typical B value is 25 percent, then total improvement factors needs to be better than 0.75. This is easy to achieve since even if the technologies of old and new servers are similar (T= 1) and there is no efficiency gains (E=1) you would still expect U to be lower than 0.5 if N is greater than 2 since nearly all servers are grossly underutilized. Thus as soon as you can virtualize more than two servers you can probably justify the embodied energy of buying a new server over the life cycle of that server, from an energy point of view.
14
Conclusion
There is a compelling need for applications to take environmental factors into account in their design, driven by the need to align with organizational environmental policies, reduce power and infrastructure costs and to reduce current or future carbon costs. The potential reduction in energy and emissions footprint through good architectural design is significant. The move to more environmentally sustainable applications impacts software and infrastructure architecture. The link between the two is strong, driving a need for joint management of this area of concern from infrastructure and software architects within organizations. These issues should be considered at the outset and during a project, not left to the end. An interesting observation is that our principles also align well with the traditional architectural drivers. Does this mean that energy reduction can be used as a proxy for all the other drivers? An architecture designed solely to reduce energy over the full lifecycle would seem to also result in a good architecture from a broader perspective. Can we save a lot of time and effort by just concentrating solely on energy efficiency above all else?
Resources
Emissions of Greenhouse Gases in the United States 2006, Energy Information Administration ftp://ftp.eia.doe.gov/pub/oiaf/1605/cdrom/pdf/ggrpt/057306.pdf The Architecture Journal #18
Summary Energy is an increasingly scarce and expensive resource. This reality will continue to have a profound effect on how IT solutions are designed, deployed, and used, particularly at the data center level. While virtualization and other power-saving technologies may go part of the way to solving the problem, virtualizing inherently inefficient applications has obvious limits. This paper presents ideas for how to design powerefficient applications. Reducing the resources required to get work done will soon not only save companies money by reducing the need to build new data centers, it will be an absolute necessity for continued growth.
reduce the amount of energy they use. However, todays most utilized approaches primarily focused on infrastructure optimization may be too narrow to deal with the power challenges of tomorrow. Methods of optimizing infrastructure usage are required that run the entire ecosystem, spanning the disciplines of application architecture and design, data center management, and IT operations.
Theory of Constraints
A useful starting point is Dr. Goldratts Theory of Constraints (TOC), familiar to many readers. Essentially, TOC stipulates that identifying and managing system-level constraints (or interdependencies) is a more effective route to optimization than trying to optimize each subsystem individually. Originating in factory production management, TOC has been extended to general application and serves us well as an introduction to green IT. The most relevant principle of TOC here is throughput optimization, which assumes that you achieve maximum throughput by controlling system bottlenecks that is, by arranging bottlenecks in the system so that they maximize the possible throughput of the available resources. In the case of IT, the constraints are infrastructure components servers, images, virtual machines, memory, bandwidth, and so on that control the speed with which valuable business output can be produced.
The Problem
Companies around the world are either already facing, or are close to reaching, hard limits in the amount of power they can afford or are allowed to consume. In Figure 1, we see that server management and administration costs appear to consume the largest part of data center costs, and we would think of them as the limiting factors in data center growth. However, if you cap the power spend, it draws a box around the growth chart, with power becoming the limiting factor and that is exactly what the survey data on the right of the figure shows. With world governments looking at energy and the U.S. Congress mulling capping data center expenditures as a part of gross national power, available power and cooling are indeed key constraints to future growth. To deal with these constraints, organizations are attempting to limit or
$100 $50 $0 96 97 98 99 00 01 02 03 04 05 06 07 08 09 10 Rate of Server Management and Power/Cooling Cost Increase (Source: IDC) 10 0
0%
16
in the future developers will be forced to expend significant additional time optimizing application power consumption, simply because this costs less than exceeding the limits on consumption. Envisioned application usage success as a design tenet. Most solutions today are designed around a hypothetical end state rather than as an organic system that grows to meet demand. For example, a company with 150,000 users may deploy a SharePoint solution with 50 GB of disk space for each user. The solution design, capacity, and deployment plan assume success that is, that all 150,000 users will actually collaborate and use their 50GB of disk space immediately. Figure 2 shows a typical load profile for a fictitious usage of a deployed application/solution with load ramping up over two years. Extra capacity may be reassuring, but it is typically wasteful: Resources power, storage, and so forth are being allocated for the ultimate usage profile on Day One of the solution deployment rather than on a just-in-time basis that conserves precious resources and saves costs. What is required? And when is it required?. In the mid-90s, Microsoft IT used to run an HR application with a separate payroll solution that required substantial number of servers servers that ran for only two days per month and sat idle the rest of the time. Frugal managers pointed this out, but the IT staff didnt feel comfortable reusing the systems for other tasks. Given that everyone likes getting paid, the IT folks won every time. Today, this has changed. The first response is no longer, Can we add another computer or data center? Instead, the approach is, Can we design it to use fewer resources? To do that, fluctuations in capacity demands need to be well understood that is, one needs to ask, What is required when? Design by seat of your pants (SOYP). Planning by SOYP is a sure way to introduce inefficiency into a system. Yet even major installations are often designed today using what is fundamentally guesswork based on past experience and vague capacity data. The combination of input factors
generally leads to a solution design that is targeted at peak load plus n% [20% < n < 50%]. The same algorithm used to plan project timelines gets applied to capacity because nobody wants to be the one that messes up the project by underestimating. Belt-and-Suspenders solution design approach. Early client/server books taught us to be over-cautious. Because our system solutions were not quite as robust as needed, we therefore went to great lengths to avoid risk, embarrassment, or exposure: If the belt should break, the suspenders will keep the pants on. In the application design arena, we devised application and infrastructure partners with multiple recovery solutions for every possible failure. The phrase single point of failure became the impetus for countless spending sprees: three Web servers where two would do, two load balancers because the one might just smoke someday, two databases on clustered, redundant storage area networks (SANs), and so on. The need for recovery and robustness solutions doesnt go away, but needs to be balanced with environmental objectives of the organization. As power use grows in importance, application architects will be required to pay more attention to balanced designs we cant count on virtualization or hardware advancements to keep the focus off of our discipline. Everyone will have to pitch in for more energy-efficient IT.
With the law of synchronicity challenged by power constraints, we have to ask what optimizations will allow us to provide desired services while running applications and systems at ever-lower cost. As Figure 3 shows, the levers are energy spend, service units available, and service units consumed. The way to read this figure is to recognize that it is a four dimensional graph. (In this rendering, the cost unit is the data center. If your scale is based on smaller units, adjust appropriately.) The small blocks represent scale units, meaning that they represent the fixed capacity gained as a result of a fixed amount of capital spent. You cannot add less than one unit, although you could vary the size of the units added. The lesson is that capacity does not move up in smooth fashion to Figure 3: Servers use vital resources whether on or off. match demand but rather in graduated jumps, leaving a gap between service units consumed and energy spend. The overall Energy Spend spend is your key optimization factor. You need to run them You can: Increase DC count full the corollary to the IT departments mantra of turn Hold # DC them off. To maximize energy efficiency, more work must be Decrease # DC accomplished without simply adding units. With a corresponding
Increase Capacity Hold capacity steady Decrease Capacity You can: Increase DC size Hold DC size Decrease DC size With a corresponding Increase power $$ No change Increase flexibility at a cost of faster to full
Tactics
Now that we understand what drives optimization and what the application architecture and design-specific challenges are that stand in the way of this optimization, it is time to look at things we can actually do to effect energy efficient design. Measure, measure, measure Without the ability to gather and analyze data on the behavior of systems and their components, optimization is guesswork. The following guidelines are from a Microsoft-internal paper by James Hamilton summarizing learning from our large-scale Internet properties: Instrument everything. Measure every customer interaction and transaction that flows through the system and report anomalies. Runners (user simulations) are useful but insufficient. Code instrumentation (alerts, warnings, and status) should be done in conjunction with operations during development. Ensure that alerting can be modulated dynamically during live operations. Support configurable logging that can optionally be turned on or off as needed to debug issues. Deploying new builds to enable monitoring during a failure is very dangerous. Implement ways to easily monitor the health of your component in production. Record all significant actions. Every time your system does something important, particularly on a network request or modification of data, log what happened. This includes the user command and the systems response. This record helps debugging immensely. Even more importantly, you can build mining tools to discover critical information such as what kinds of queries users are making (which words, how many words, and so on). A simple approach is best. Decide which results you want measured, and then measure them. Dont settle for approximations or statistical sampling alone. The key to successful measurement is using throughput measures instead of point-in-time samples. A useful tool to support your efforts is the logging application block of the Enterprise Library released by the Microsoft patterns & practices team. This building block, among others, can support instrumentation investments in application code.
Component
Component
Component
Component
Feature Role
Feature
Workload
Workload
Solution Product
18
Dependencies The model could be too rich for some applications, but the basic concept of roles is familiar to most developers. Even a one-role application is typically dependent on other roles (a database, for example) or interacts with other roles or applications (such as a Web site interacting with an ERP system). In traditional client/server applications, however, the relationships are hidden in the compiled bindings. To enable predictable and automated resource management, these dependencies must be surfaced as modeled elements included with the application bits. The taxonomy in Figure 4 describes composition and dependencies for a single server or workload. Most solutions in todays data centers are distributed and involve multiple tiers. In Figure 5, we add dimensions to the model allowing us to describe dependencies across servers and tiers. Server/Workload and Server Role are the same as in the Windows Server taxonomy in Figure 4, enabling us to seamlessly join the models. Application: a logical representation of the exposed application or functionality exposed. Physically, applications expose endpoints of some kind HTTP/HTTPS, TCP/IP and so on. Applications can also express dependencies on other applications for example, SharePoint requires SQL Server and Active Directory. Site: represents a deployment of functionality into a data center or data center room. An application can have many sites associated with it. Server group: represents a grouping of servers with common attributes, such as high availability (network load balancing or failover cluster). An application can have any number of server groups to express tiers contained within a site. This kind of information allows the operations team to understand critical resource dependencies and usage. It also enables automated provisioning of resources aligned with functional and non-functional requirements as well as operational patterns such as user or transaction load at any given point in time. The application architects job is to structure the application ito allow functional elements to be deployed on demand, just-in-time, whether this is within a single server or across multiple servers. We believe that this provides operators with the flexibility to optimize for total spend no matter which energy purchasing model is in effect. It also enables operators to clearly understand and differentiate required functionality and dependencies within applications and across applications. In this way, the deployment will meet the user requirements with minimal usage of resources. The Architecture Journal #18
50,000 users
Initial Size
Growth Unit A Capacity Driver : # of users +1 SharePoint App Ser ver Ser ver
RPS 99 Farm configuration 3 by 1 RPS 115
Max Growth
Monitoring counters in the operational configuration and monitoring environment trigger growth (or shrink) provisioning once the specific capacity driver hits 80% of speciified value: Growth based upon RPS (growth type A): initial size 99 RPS; counter is set to 80 RPS Growth based upon content db size (growth type B): initial size 0.8 TB; counter is set to 0.7 TB
Example Here is an example using SharePoint. Lets assume a fictional SharePoint Server deployment for our much-beloved Contoso manufacturing company. The desired end state is supposed to be reached in 2010, as business units across the globe adopt the solution. Scale-units and growth drivers for the solution are shown in Table 1. Figure 6 shows the scale-units that grow the deployment based on the growth drivers identified in Table 1 as well as the eventual maximum deployment. The solution is initially deployed as an end-to-end solution with two SharePoint application server instances and one SQL Server instance. While the graphic appears to show sequential triggering, the growth drivers are independent of each other, although the deployment of one scale-unit might affect some other aspects of the deployed solution. Putting it all together To examine the effectiveness of this approach, lets combine some of the ideas weve discussed and revisit the model we used earlier to discuss scale-out units and capacity planning. Look at the scale labeled Service Units Consumed, represented by the red line on the right hand side of the graph in Figure 3. At time T-0, the data center has been built and no capacity is being used. We begin to consume the resources available in the data center and as time passes, use outstrips the capacity. The area below the purple line is used capacity. The area above the purple line is unused capacity. Effectively managing unused capacity means real power savings.
not only track application health but understand capacity drivers and capacity consumption. With those core elements, computing resources (and therefore power) can be throttled based on how well the solution is meeting its service level agreement (SLA). If it is performing within the necessary parameters, spare capacity can be shut down. This is the core scenario driving a massive industry shift toward virtualization. Its amazingly complex, requiring more control and more accurate models (capacity models, consumption models, monitoring on multiple dimensions, safety margins, and power plans, to name a few) than weve ever seen in software systems. Even if your work is not measured in units the size of data centers, the challenge remains: Use less to get the same amount of work done. This is where the architectural partitioning of applications becomes critical. Today, the problem is one of excess resources: Find the unused ones and turn them off. It is a problem that can be solved by IT pros in the trenches. In the future, more will not even be an option. Only designers and architects can solve that problem and its one that must be solved before software is ever deployed or even built. Instead of building applications that rely on synchronicity the get more to get more approach that uses virtualization to solve the problem of waste in off-peak hours we can drive the wave to the optimization side of the resource equation by enabling the applications that are used in the business to consume resources as fully and effectively as possible. Instead of thinking ,buy a lot of computers, constrain the problem by asking yourself how to get the job done on a third or a quarter you think is necessary. This is the world that will be a reality in the next 20 years a world where five servers worth of software has to be virtually scheduled onto two computers worth of
Virtualization
For application architects, virtualization is not the starting point for greener IT it is a tool that helps efficient applications use fewer resources. At the start of capacity growth, virtualization enables us to match hardware resources more precisely to user needs. This reduces power spend by reducing provisioned but unused hardware capacity. In the future, virtualization will allow you to shut down excess resources that are already in place. Such a solution requires switchable, computer-controlled power circuitry; dynamic network configuration; and software designed to scale up and down in parts that can be composed and separated as necessary. The solution must be linked to and driven by monitoring systems that
20
Table 1: Scale Units and Growth Drivers for Example SharePoint Deployment
Growth Driver Number of active users putting pressure on responses per second 1 TB limit on size of all content databases for a single SQL Server instance Scale-Unit SharePoint application server SQL Server instance
Futures
Store and forward, queue and resume Architects must design applications the parts of which can function independently without losing the ability to share data and generate work product in the proper order. Returning to the example of the payroll system that is only active two days in a month, our challenge is to find a way to use those resources during the other 28 days. Instead of dedicated software configurations on fixed hardware, we need to design applications which can be stored on the virtual shelf in pieces, ready to be pulled out and activated in various combinations just-in-time. Achieving this requires a powerful, flexible set of control software. The control software and the application have to work together to track and profile loads across functional components (such as server roles) as well as topology (such as sites and server groups). We have to track and profile static usage, as well as dynamic usage, introducing time as a key resource management dimension. Figure 7 shows a simplified load profile over a 24-hour period. Using time enables us to break the synchronicity principle and increase the service output despite a fixed resource budget. Portfolio management Managing individual applications is a critical step in the right direction. However, the real power is in static and dynamic resource management across the entire the portfolio of applications that provide the desired service output. The control software has to be enabled to track resource usage, identify scale-units that can be managed on a scheduled basis (that is, not running at all times) or scale up and down dynamically based on the managed load profile across all applications. Properly factored, documented, and instrumented applications are the key to this new dimension of management which will enable us to optimize resources in ways we have not yet seen in distributed environments.
Conclusion
Application architects can design distributed systems for more effective resource management. First, we can align well-defined optimization goals with factorization. Scale-units enable us to group and align well-factored solutions with minimized deployments without compromising the overall deployment architecture. Scale-units combined with instrumentation will enable control software like System Center to manage a portfolio of applications based on the established optimization goal and approach. These capabilities are not far off. In a world with absolute limits on power consumption, the sooner we can bring them to bear, the better.
Resources
Measuring National Power in the Postindustrial Age, Ashley J. Tellis et. al, RAND Corporation, 2000 http://www.rand.org/pubs/monograph_reports/MR1110/ Wikipedia - Theory of Constraints http://en.wikipedia.org/wiki/Theory_of_Constraints
10
12
14
16
18
20
22
24
The Architect Most Valuable Professional (MVP) program at Microsoft has recently been relaunched after a short recess of a few months. Our featured guest for this issues profile has been recognized as a Microsoft Solutions Architect MVP many times over: Udi Dahan is a free thinker, SOA and IT authority, and celebrated simplist
After high school I got my first paid programming job working for one of the faculty at the university. There was no lead developer, just a professor telling me what he wanted the application to do, and me doing it. That direct connection to what users want, need, and think has permeated the rest of my career and helped me develop the business and communication skills that are critical to the success of an architect. Since then, Ive always been working in close collaboration with end users looking for ways to make systems work for them, rather than the other way round. That strong connection to the business was definitely a defining factor. AJ: What advice would you share to those who want to be recognized for his/her abilities as an architect? UD: First and foremost, you have to know your stuff. Beyond reading endlessly on software architecture, design, patterns, technology, and development methodologies, you need to actually do it, and that means coding as well. To be recognized, one needs to be successful, and that includes being perceived as successful. You cant escape from the organizational politics, and since architects rarely have any real organizational power, success means working with and through other people in the organization. Often, this means giving up some ego in order to create win-win scenarios that all stakeholders can buy in to. AJ: Looks like its not enough to be an architect but we must also make others take notice. In that sense, you have done an admirable job. Youve long been publicly acknowledged you are frequently enlisted to speak at conferences (Dr. Dobbs, TechEds everywhere, QCon, just to mention a few). Do you have any advice to share with other architects who aspire to but dont know how to become a luminary? UD: Luminary is quite the title to live up to and Im not sure Im there yet. I can say that if you want to be publicly recognized you have to do publicly visible activities like writing for magazines, blogging, and speaking at conferences. Interestingly enough, the written and oral communication skills that help architects be successful in their own organization are the same skills that will drive their recognition publicly. AJ: The architect role requires understanding current and future technical trends to get the best for the business benefit how do you stay up to date? UD: On top of the voracious reading I mentioned, going to conferences is just as critical. Hearing from industry leaders about which trends
AJ: Who are you, and what do you do? UD: My name is Udi Dahan, and Im an independent consultant focusing primarily on enterprise development and service-oriented architecture. While the majority of my work is with Fortune 500 enterprises on large, multi-year projects, I also help smaller companies in their technology choices and architectural decisions. On top of my regular consulting work, I speak at international developer conferences, lead an open source project (www.nServiceBus.com), and run a fairly popular blog. AJ: Many of our readers know you as The Software Simplist. Can you tell us how you went from Udi Dahan the individual to Udi Dahan the Software Simplist? UD: When I was working at my last consulting firm, as a part of the rebranding effort, each senior consultant was to be given a unique title, something that would differentiate them from other consultants. I was pretty busy when all of this was going on, so I asked one of my friends in the marketing department to find something for me. My only request was that it be simple. When he came back after the weekend with The Software Simplist, I kind of liked it and it grew on me. After that, it just stuck. AJ: So tell us about your origins as an architect. Did you start your IT career as a developer under the supervision of a lead developer or a project leader? What factors determined your destiny as an architect? UD: I guess I started my IT career at the age of 8, when I wrote my first program. My dad worked at the local university in the information systems department, so we had a computer at home, which wasnt very common at the time. When I asked him if he could get me some games for it, he promptly took me to the programming section at the library and gently explained that Id be writing my own games. From that point on, I never really stopped programming.
22
I started my IT career at the age of 8, when I wrote my first program.We had a computer at home, which wasnt very common at the time. When I asked [my dad] if he could get me some games for it, he gently explained that Id be writing my own games. From that point on, I never really stopped programming.
are important helps, but talking to other people and getting their perspective on what works and when is truly invaluable. As a speaker at many conferences, Im in a better position to hear this from other speakers, experts in their field. Also, my consulting practice lets me see the direction many verticals are moving in and which technical trends will best serve them. Regardless, however far along one is in their career, many of us are smarter than any of us your network will give you more knowledge and insight than you could possibly learn on your own. AJ: Thats true, however does this happen to you? it can be frustrating when youve tried to keep up-to-date on the latest technologies and trends, but after investing the considerable effort on the latest-and-greatest technologies (coding, watching webcasts, testing demos, and so forth), a dozen of new ones emerge from the pipeline (just look back to the last PDC). Do you have any recipe to efficiently deal with such avalanche? UD: There is indeed a continuous flood of information coming at developers today. Never has so much information been so readily available and accessible to so many. It turns out, though, that much of that information is about how something works, less about what problem it is intended to solve, and much less about which problems it isnt suited for. As an architect looking at choosing the right tool for the right job, I focus a lot more on the last two. Often, I go digging to find out why a tool isnt a good fit for a job. So, I guess my recipe is to mostly ignore the avalanche and tap my network to find out the stuff the avalanche wont tell you. AJ: Name the most important person you have ever met in this industry What made him/her so important? UD: Im really in no position to judge relative importance, but Id have to say the person that had the biggest impact on me was Charles Simonyi. I had the pleasure of cornering Charles over dinner at the Software Architecture Workshop in the northern mountains of Italy a couple of years ago. This was before he became an astronaut, but still, I wasnt exactly in the habit of eating dinner with billionaires. During those three hours, Charles shared with me his decades of experience and perspective, planting the seeds for much of my intention-focused design practices. Recently, Ive started presenting on these practices at conferences, showing how well they handle diverse concerns like validation, persistence, and service layers. It never ceases to amaze me how much practical value can grow from the seed of a quality idea. AJ: Is there anything you did that youd like to do differently if you could turn the clock back on your career? UD: One role that, in retrospect, I regret not taking was that of a tester. When I was just starting out, I had the choice of taking either
Udi Dahan is a Connected Technologies Advisor working with Microsoft on WCF, WF, and Oslo. He also serves as a member of the Patterns & Practices Advisory Board for the CAB and Prism, and has received Microsofts Most Valuable Professional award for four years running. He provides clients all over the world with training, Udi Dahan mentoring, and high-end architecture consulting services, specializing in service-oriented, scalable, and secure .NET architecture design. Udi is a member of the European Speakers Bureau of the International .NET Association, an author and trainer for the International Association of Software Architects and a founding member of its Architect Training Committee. He is also a Dr. Dobbs sponsored expert on Web Services, SOA, and XML. His blog covers service-oriented architecture and enterprise software development and can be found at http://www.UdiDahan.com.
a testing or development position. At the time, I viewed testing as something beneath development something junior people had to do before being able to move into development. Naturally, I took the position as a dev. Today, my in-depth understanding of development serves me well, helping me optimize the work of the dozens and hundreds of developers on my projects. Had I spent more time in the testing trenches, I feel that I might have been able to do more for the testers I work with today. AJ: What does Udi the Architects future look like? What do you hope to accomplish in the next few years? UD: As the Nobel Prize-winning physicist Niels Bohr said, Prediction is very difficult, especially if its about the future. Ill probably continue with my blog, speaking engagements, and the big three to five year projects Im consulting on today. I hope to take my open source project, NServiceBus, to the level of its peers in the Java space. Also, Im flirting with the idea of writing a book (after having contributed a couple of chapters in others), but thatll have to wait until my twoyear-old lets me get a full nights sleep. AJ: Thank you very much, Udi UD: My pleasure.
Resources
NServiceBus http://www.nservicebus.com/ Udi Dahan - the Software Simplist: a blog on Service-Oriented Architecture and Enterprise Software Development http://www.udidahan.com Wikipedia - Charles Simonyi http://en.wikipedia.org/wiki/Charles_Simonyi
23
Summary When measuring the effectiveness of application architecture, there are several key criteria by which it can be measured. First and foremost, is the architectures ability to fulfill the requirements. These requirements often include specific, measurable items relating to cost, scalability, testability, and so forth. In the future, two new measurable criteria will become critical to evaluating application architectures: energy consumption/cost and environmental impact. But as we will see, the future is now.
The location: your corporate server room. The time: present day. The event: an unexpected visit from the Software Architect of the Future.
charges, capacity charges, taxes, and all other fees), that means that the lightbulb costs roughly $0.0054 per hour to run (0.06 * 0.0897 = 0.0054). That may not seem like much but, if we were to leave that lightbulb on 24 hours a day, seven days a week, it would cost us $47.15 to run annually (0.0054 * 24 * 365 = 47.15). Now consider that each kilowatt-hour of electricity used also contributes approximately 2.3 pounds of CO2 to the atmosphere. So, using a few simple calculations we can state an annual cost ($47.15) as well as an annual environmental impact (1,208 pounds of CO2) for our little lightbulb. Going forward, we will be employing these formulae to calculate energy usage costs and environmental impact: kWh = Watts / 1000 Annual Energy Cost = kWh * 24 * 365 * cost per kWh Annual CO2 Emissions = kWh * 24 * 365 * pounds of CO2 per kWh For the purposes of this discussion, we will use the values of $0.0897 for cost per kWh and 2.3 for pounds of CO2 per kWh. These values may vary depending on where you live and how your electricity is generated.
There you sit, monitoring the performance of your latest line-of-business Unfortunately were not talking about lightbulbs, were talking about application freshly rolled out just 24 hours ago, when a strange visitor strolls servers. So how does the energy usage of the average server compare in. She begins asking you about your enterprise architecture. Instead of to that of a 60 W lightbulb? Well, unless youre running your company calling security, you decide this is a chance to show off how cutting edge on laptops, its much worse. According to research published by Dell your organization is. You hit all the buzzwords: C#, SQL Server, WPF, WCF, and Principled Technologies, a single Dell PowerEdge M600 blade server and SilverLight. It scales up and out, is accessible from mobile devices, it consumes an average of 383.75 W when idle and 454.39 W under stress slices and it dices. Excellent, the Architect replies, but what does your EUP (see Table 1). Keep in mind that this figure can go up or down depending look like? on workload. Using that baseline to recalculate our numbers, that one My EUP? Whats that? The Architect explains that in the future, an server costs $301.54 per year to run. It also produces 7,731.8 pounds of Energy Usage Profile (EUP) is a fundamental part of every application CO2. The picture gets even bleaker when you consider how many servers design through the use of a set of Energy Usage Profiles (EUPs), organizations of the future measure the ongoing Table 1: Sample Hardware Energy Usage Profile (in watts) energy costs and environmental impact of specific applications within the enterprise. Sit down, she intones, and Ill tell you all about it. Component Idle Power Usage Average Power Usage Maximum Power Usage
The Math
Before diving into specifics, a basic discussion of energy usage is in order. When measuring the electrical usage of any electronic component, simple math can be employed to assign a cost to that component. Lets begin with an example: the venerable 60 watt (W) incandescent lightbulb (common in your time but widely regarded as legacy hardware in the future). The electric company measures energy consumption in kilowatt-hours (kWh). Using our lightbulb as an example, if we were to leave it on for one hour, we would have consumed 60 watt-hours (or .06 kWh) of power (60/1000 = .06). Now say, for example, that the electric company charges $0.0897 per kilowatt-hour (excluding delivery
454.39
24
Dealing in averages may be fine if youre analyzing a large CD/DVD 40.30 362.66 data center but what about the energy usage of a specific applications architecture? Average power consumption is not good enough. We want to know how much power a single Remember that what is high priority in terms of performance improvement application uses and, while we cannot get to the exact number, we can may not always be high priority for energy usage reduction. For example, an get pretty close. The first step is building an energy usage profile for the operation that does a long write operation to a physical disk might be seen hardware. as a high priority performance issue. In terms of energy usage, however, this As mentioned previously, the manufacturers Web sites are a good operation might be low priority because the physical disk consumes less place to start. While the manufacturers figures can give you a good energy than the CPU. An operation that utilizes a large amount of CPU time approximation for best and worst case scenarios for the hardware, it cannot might be a higher priority. This is not to say that CPU-intensive operations tell you how much energy your particular application uses. In this case, we should be replaced at the cost of application performance. It simply gives need to measure. Luckily, inexpensive products are available that will help us a ranking system for determining which components of the application measure the energy consumption of your application. These products, used can be optimized to realize the largest cost savings. The hardware EUP will with a good set of application load tests, can make the energy consumption tell you which physical components of the hardware carry the most cost and picture much clearer. The key is to build a set of load tests that reflect both impact. Using hardware EUP, we know that CPU utilization carries the largest the average and peak loads for your application. The idle consumption can be used to calculate a baseline cost for the application. When doing nothing, a threeTable 4: Sample Application Energy Usage Profile (in watts) server application has an idle energy consumption of 354 W (.345 kWh). The hourly cost is $0.025875 and the annual cost is Power Usage Power Usage $226.67. Through our EUP, we can thus calculate the baseline Server Idle Power Usage at Average Load at Peak Load annual cost of the application. The measurements taken during Server 1 Application 304 425 525 average and peak application loads can then be used to Server 2 Database 304 425 525 calculate costs and impacts when the application is running at those levels (see Tables 4-6). Server 3 Web 304 425 525 Once an application-level EUP has been created, specific Total Power Usage 912 1,275 1,575 areas of the application can be targeted for improvement.
25
Table 6: Sample Application Energy Usage Cost Profile (in pounds CO2)
Server Server 1 Application Server 2 Database Server 3 Web Total Impact Idle Power Usage 6,125 6,125 6,125 18,375 Power Usage at Average Load 8,562.9 8,562.9 8,562.9 25,688.7 Power Usage at Peak Load 10,577.7 10,577.7 10,577.7 31,733.1
impact in terms of power usage, and should therefore be our first target. Tools such as Visual Studio 2008 Profiler can be used to determine precise CPU usage for specific components of the application. These tracking statistics can then be used to attack the high cost portions of the application. In other words, find the most expensive operations and optimize them to reduce CPU usage. The ultimate goal is to lower resource usage to the point where multiple applications can be hosted on the same set of servers. Server sharing can reduce the energy footprint of all the applications involved.
Conclusions
It is not just the Architect of the Future that can use the methods described in this article. You can (and should) consider the energy usage when designing an application. Part of being an Architect is understanding how every aspect of your application functions. Energy usage is another key aspect and an energy usage profile is the tool for understanding it. Having a useful energy usage profile means: Understanding your hardware and its energy usage. Understanding your operating system and its energy usage. Understanding your application and its energy usage. Understanding the external impacts of your application.
http://www.dell.com/downloads/global/products/pedge/en/pe_blades_ specjbb2005.pdf
Together, these areas of understanding combine to give you a total energy usage profile that you can act upon. More importantly, they give you a barometer for tracking the real cost of your application and the real gain of your optimization. The future of application architecture is looking greener.
Resources
Average Retail Price of Electricity to Ultimate Customers by End-Use Sector, by State, Energy Information Administration, October 3, 2008 http://www.eia.doe.gov/cneaf/electricity/epm/table5_6_a.html Frequently Asked Global Change Questions, Carbon Dioxide Information Analysis Center http://cdiac.ornl.gov/pns/faq.html Performance and Power Consumption on Dell, IBM, and HP Blade Servers, Principled Technologies, December 2007 The Architecture Journal #18
Only a fraction of the electricity consumed by a data center actually powers IT equipment such as servers and networking devices. The rest is used by various environmental control systems such as Computer Room Air Conditioning (CRAC), water chillers, and (de-)humidifiers, or simply lost during the power delivery and conversion process. The data center Power Usage Effectiveness (PUE), defined as the ratio of the total facility power consumption over the power used by the IT equipment, is a metric used by The Green Grid to measure a data centers overhead. A higher figure indicates greater energy overhead while a lower figure indicates a more efficient facility. For example, average data center has PUE 2, indicating that half of the total energy is used for IT equipment. However, the PUE can be as high as 3.5. One key reason for the high PUE is the lack of visibility in the data center operating conditions. Conventional wisdom dictates that IT equipment need excessive cooling to operate reliably, so the AC systems in many data centers Figure 1: An illustration of the cross section of a data center. Cold air is blown use very low set points and very high fan speed, to from floor vents, while hot air rises from hot aisles. Mixed air eventually returns to reduce the danger of creating any potential hot spot. the CRAC where it is cooled with the help of chilled water, and the cycle repeats. Furthermore, when servers issue thermal alarms, data center operators have limited means to diagnose the Hot problem and to make informed decisions other than Return air Cool T further decreasing the CRACs temperature settings. Racks Given the data centers complex airflow and CRAC thermodynamics, dense and real-time environmental (AC units) monitoring systems are necessary to improve their energy efficiency. The data these systems collect can help data center operators troubleshoot thermo-alarms, make Floor intelligent decisions on rack layout and server deployments, vent Floor plenum and innovate on facility management. The data can be Chilled water supply particularly useful as data centers start to require more
28
Figure 2: The thermal image of a cold aisle in a data center. The infrared thermal image shows significant variations on intake air temperature across racks and at different heights.
understand how energy is consumed in data centers as a function of facility design, cooling supply, server hardware, and workload distribution through data collection and analysis, and then to use this understanding to optimize and control data center resources. We report results from ~700 sensors deployed in a multi-mega-watt data center. This is one of the largest sensor networks in production use. Contrary to common belief that wireless sensor networks cannot maintain high data yield, RACNet provides over 99 percent data reliability, with 90 percent of the data being collected under the current soft real-time requirement of 30 seconds.
Facility layout: The rack, CRAC, and power distribution layout not only There are many data center designs, from ad hoc server cabinets to provide a basis for data presentation, but also affect cooling efficiency dedicated containers. However, most professional data centers use a and, ultimately, data center capacity. cold-aisle-hot-aisle cooling design. Figure 1 shows the cross section of Cooling system: The cooling system includes equipment such as the a data center room that follows this design. Server racks are installed CRAC, water chillers, air economizers, and (de-)humidifier which are on a raised floor in aisles. Cool air is blown by the CRAC system into the typically monitored by the building management system through a sub-floor and vented back up to the servers through perforated floor Supervisory Control and Data Acquisition (SCADA) system. The cooling tiles. The aisles with these vents are called cold aisles. Typically, servers in the racks draw cool air from the front, and blow hot exhaust air to the back in Figure 3: Overall architecture for the Data Center Genome system. Data collected from hot aisles. To effectively use the cool air, servers are arranged face-to-face in cold physical and cyber systems in data centers is correlated and analyzed to provide models and aisles. As Figure 1 illustrates, cool and hot tools for data center management and performance optimization. air eventually mixes near the ceiling and is drawn back into the CRAC. In the CRAC, the mixed exhaust air exchanges heat with chilled water, supplied by a chilled water Real-time Monitoring & Control pipe from water chillers outside of the facility. Usually, there is a temperature sensor Facility layout at the CRACs air intake. The chill water valve Data Data Presentation Archiving opening and (sometimes) CRAC fan speed Change Management are controlled to regulate that temperature Cooling systems to a set point. Data center operators have to balance Power Systems Capacity Planning two competing goals: minimizing the energy Data the CRAC consumes while at the same Staging time ensuring that server operation is not Tools: Analysis, Prediction, negatively affected by high temperatures. Dynamic Server Heat Distribution Optimization & Provisioning However, setting the CRACs parameters is Scheduling a non-trivial task, because the airflow and Genome Server Performance thermodynamics of a data center can be (Classes, labels, Fault Diagnostics/ correlations, dynamics, fairly complicated. The underlying reason Tolerance probabilities...) is that heat distribution depends on many factors such as chilled water temperature, Load Variations CRAC fan speed, the distances between
29
Data collected from various sources can be used to build models that correlate the physical and performance parameters. Thus derived, the Genome of data centers is a rich family of models, being useful for various purposes. Deriving and applying these models relies on building algorithms and tools for analysis, classification, prediction, optimization, and scheduling. The data and tools can be used by data center operators, facility managers, and decision makers to perform various tasks, such as: Real-time monitoring and control: Examples include resolving thermal alarms, discovering and mitigating hot spots, and adaptive cooling control. Change management: Given a small number of servers to be deployed, a data center operator can make informed decisions about their placement depending on the available space, extra power, and sufficient cooling. Capacity planning: Given a load growth model and an understanding of resource dependencies, one can analyze the capacity utilization over various dimensions to decide whether to install more servers into existing data centers, to upgrade server hardware, or to build new data centers to meet future business need. Dynamic server provisioning and load distribution: Server load can vary significantly over time. The traditional philosophy of static server provisioning and even load distribution will cause the data center to run at the worst-case scenario. Recent studies show significant energy saving benefits by consolidating servers and load. Controlling air cooling precisely to meet dynamic critical power
Genomotes
Genomotes are sensor motes we specifically developed for the DC Genome project. To meet the requirements of low cost of ownership, we chose IEEE 802.15.4 wireless technology over wired and WiFi (see Resources). Wireless nodes give the advantage of easy installation and ammunition to network administrative boundaries. Compared to WiFi, 802.15.4 radio is lower power, has a simpler network stack, and require fewer processing cycles. Thus we are able to reduce total cost by using simpler microcontrollers. Although other similar wireless sensor designs are available on the market (such as SUNSPOT, Tmote, and SynapSense nodes), Genomotes are customized to simplify the installation process and reduce the number of wireless nodes in the network without sacrificing flexibility and scalability. Specifically, as shown in Figure 4, we designed two classes of Genomotes, master motes and slave sensors. A Genomote master has a CC2420 802.15.4 radio, 1 MB flash memory, and a rechargeable battery. It is typically installed at the top of a rack. In addition to the radio, it has a RS232 socket. Each slave node has two serial ports, which are used to connect multiple slaves to the same head, forming a daisy chain that spans the height of a rack. Slave sensors are equipped with various sensors, such as temperature, humidity, and so on. Since they share the same serial communication The Architecture Journal #18
Figure 4: MSR Genomotes with the relative size of a U.S. quarter; master mote (left) and slave sensor (right).
30
Figure 5: Data yield percentage from 174 wireless nodes (696 sensors) in a production data center. It shows the minimum, 5th percentile, median, 95th percentile, and maximum hourly yield from all sensors.
115 110 105 100 Percentage 95 90 85 80 75 70 65 0 10 20 30 40 Hours 50 60 Median 5 percentile 95 percentile min max 70 80
Our system faces several challenges for reliable data collection. Low power wireless radios like IEEE 802.15.4 are known to have high bit-error rates compared to other wireless technologies. At the same time, data centers impose a tough RF environment due to the high metal contents of servers, racks, cables, railings, and so on. Furthermore, the high density of wireless nodes in RACNet several dozen within the same communication hop increases the likelihood of packet collisions.
changes. Using multiple channels reduces the number of nodes on each channel, reducing the chances for packet collision. Adaptive bidirectional collection tree: On each wireless channel, a collection tree is dynamically built to adapt to link quality changes. Due to the large number of nodes in a one-hop communication range, viable links are abundant. Choosing the right links for high quality communication is key to improving hop-to-hop success rates. Coordinated data retrieval: Thanks to the flash memory on board, each master node caches data locally before it is retrieved. To avoid losing data due to packet collision, data is polled by the base station, rather than pushed by the sensors. Only one data retrieval stream exists on an active channel at any given time. Figure 5 shows the data collection yield over three days from 174 wireless master motes, driving 522 additional sensors. The data yield is computed as the ratio between the actual collected data entries and the theoretical result of 120 samples per sensor per hour. It is shown that over 95 percent of the sensors give higher than 99 percent data yield constantly. (The over 100 percent data yield is an artifact of in-network time synchronization: When local time proceeds faster and must occasionally be adjusted back to the global time, multiple samples are taken at roughly the same time stamp.) Figure 6 further shows the data collection latency, defined as the time differences between when the data is sampled and when they are
protocol, different kinds of sensors can be mixed and matched on the same chain. Without a radio, external memory, nor battery, slaves are about half the cost of the master motes. The master periodically collects the slaves measurements using a simple polling protocol and stores them in its local flash. DC Genome gateways then periodically retrieve stored measurements from each master using a reliable Data Collection Protocol (rDCP). A chain of four nodes can be powered at any mote via a single servers USB port, thanks to the low power circuit design. This hierarchical design has several benefits. First, separating data acquisition and forwarding means that the master can work with slaves covering different sensing modalities. Second, because the ratio of slaves to masters is high, simplifying the slaves design minimizes the overall deployment cost, especially for large-scale networks. Finally, the design reduces the number of wireless nodes in the network that compete for limited bandwidth, while allowing individual racks to be moved without tangling wires.
Figure 6: Data collection latency distribution of 10,000 data samples using three wireless channels.
10
20
30
40
50
60
More
Delay (seconds)
31
Figure 7: Heat map of a cold aisle and a hot aisle, generated from sensor data.
entered into the DC Genome central database. When using three wireless channels concurrently, over 90 percent of sensor data is collected before the 30 second deadline. These unprecedented results show that a wireless sensor network can be used to reliably collect environmental data in data centers with low hardware cost and easy installation and maintenance.
Figure 8: Intake air temperature from a row of ten racks, labeled from 1 to 10, during a thermal runaway event. Each rack has three sensors at the top, middle, and bottom, respectively. Temperature changes depend on locations.
32
Rack7 (middle)
T+3 In-take Air Temperature T+3 In-take Air Temperature
Rack1 (middle)
T t T t+2
T t T t+2
thermal runaway transients through simulations is difficult because their accuracy depends on the thermal properties of IT equipment, which are difficult to obtain. On the other hand, RACNet collected actual thermal runaway data during an instance when a CRAC was temporarily shut down for maintenance. Figure 8 plots the temperature evolution at various locations across a row of ten racks during the maintenance interval. The CRAC was turned off for 12 minutes. The midsections normally the coolest regions experienced rapid temperature increases when the CRAC stopped. In contrast, temperature changed moderately at the two ends of the row, especially at the top and bottom of the rack. This is because those racks have better access to room air, which serves as a cooling reserve. This is an important finding because large temperature changes in a short period of time can be fatal to hard drives. For example, 20oC/hr is the maximum safe rate of temperature change for the Seagate SAS 300GB 15K RPM hard drive, according to its specifications. Notice that, in the middle of rack 7, the rate of temperature change is almost 40oC/hr in the first 15 minutes of CRAC shutdown. This implies that storage intensive servers need to be placed carefully if the data center has a high risk of losing CRAC power. Thermal stability challenges in dynamic server provisioning Dynamic server provisioning and virtualization can effectively adjust the number of active servers based on server work load, reducing the total energy consumption during periods of low utilization. Given that many servers are functionally equivalent, which servers should be shut down to minimize energy consumption? Moreover, can turning off servers result in uneven heat generation and cause thermal instability? We answer these questions by performing sensitivity analysis over the collected measurements. Assume as is true for many commodity servers that a servers fan speed is constant over time, independent of the servers workload. Then, the difference, T, between the exhaust temperature and the intake temperature is proportional to the amount of heat a server generates. Ideally, a CRAC responds to the generated heat and provides cold air to the rack intake. So, the greater T is, the lower the in-take air temperature should be. Figure 9 presents the results from one such example. The figures show scatter plots between T and intake air temperatures at middle sections of racks 1 and 7, as well as linear trend lines. The corresponding R2 metrics show how well the linear regressions are. We observe that the CRAC responds to the temperature changes at rack 7 much better than those at rack 1. In fact, an increase of T at rack The Architecture Journal #18
1 is uncorrelated with its in-take air temperature. Such CRAC sensitivity variations create additional challenges for dynamically shutting down servers. Consider a scenario in which locations A and B rely on the same CRAC to provide cool air. However, the CRAC is extremely sensitive to servers at location A, while not sensitive to servers at locations B. Consider now that we migrate load from servers at location A to servers at location B and shut down the servers at A, making TA = 0. The CRAC then believes that there is not much heat generated in its effective zone and thus increases the temperature of the cooling air. However, because the CRAC is not sensitive to TB at location B, the active servers despite having extra workload have insufficient cool air supply. Servers at B are then at risk of generating thermal alarms and shutting down.
Conclusion
The RACNets presented in this paper is among the first attempts to provide fine-grained and real-time visibility into data center cooling behaviors. Such visibility is becoming increasingly important as cooling accounts for a significant portion of total data center energy consumptions. This practical application challenges existing sensor network technologies in terms of reliability and scalability. The rDCP protocol tackles these challenges with three key technologies: channel diversity, bi-directional collection trees, and coordinated data downloading. This is the first reported result of maintaining higher than 99 percent data yield in production sensor networks. Collecting cooling data is a first step toward understanding the energy usage patterns of data centers. To reduce the total data center energy consumption without sacrificing user performance or device life, we need an understanding of key operation and performance parameters power consumption, device utilizations, network traffic, application behaviors, and so forth that is both holistic and fine-grained. With such knowledge, we will be able to close the loop between physical resources and application performance.
Acknowledgement
DC Genome is a multi-year collaboration between Microsoft Research and Microsoft Global Foundation Services. The authors would like to thank Darrell Amundson, Martin Anthony Cruz, Sean James, Liqian Luo, Buddha Manandhar, Suman Nath, Bodhi Priyantha, Rasyamond Raihan, Kelly Roark, Michael Sosebee, and Qiang Wang, for their direct and indirect contributions to the project.
33
Wireless sensor networks for structural health monitoring, S. Kim et. al, 4th ACM Conference on Embedded Networked Sensor Systems (SenSys 2006), Boulder, Colo., November 2006 http://portal.acm.org/citation.cfm?id=1182889
In addition to environmental sustainability benefits, SQL Server consolidation also presents clear business benefits, such as: Reduce operating and capital expenses. New hardware has far greater computing power than hardware that is nearing end-of-life. Newer hardware generally requires less power and cooling. Environmental sustainability. For example, lower power and cooling requirements are the primary areas where the SQL Server Utility addresses environmental concerns, but an overall reduction in data center space will also contribute over the long term. Provide business continuity, scalability, and availability. Requirements do not change for the SQL Server Utility; the goal is to find opportunities to standardize and to improve best practices in these areas. Provide a standardized server build library. New technologies such as Hyper-V open new opportunities for standardization. Part of the vision of the SQL Server Utility is to eliminate or streamline many of the manual steps needed to build an application environment. This can be achieved by establishing Hyper-V guests which are built with standard software configuration, including the operating system, SQL Server, tools, and approved configurations which can be provided for use in different phases of the software development life cycle.
Initial Situation
Currently, the Microsoft IT application portfolio consists of about 2,700 applications. There are approximately 100,000 databases on 5,000 SQL Server Instances, most of which are on dedicated hosts. Approximately 20 percent of those hosts reach end-of-life each year and are replaced. Average CPU utilization across these hosts is below 10 percent, indicating significant opportunity for host consolidation. Fortunately, the landscape for SQL Server consolidation has changed dramatically over the past few months. New technologies such as Windows Server 2008, SQL Server 2008, Hyper-V, System Center Virtual Machine Manager, System Center Operations Manager, improved storage technologies and more powerful servers provide greater opportunities for consolidation than ever before. In addition to server consolidation, other virtualization opportunities exist. Those benefits are not the focus of this article but are described under General Benefits later in this article.
Opportunities
When it comes to protecting the environment, everyone must demonstrate social responsibility and initiative. Microsoft IT has been engaged in related activities for several years. The efforts have targeted data centers, various layers of the application stack as well as specific server workloads. Major consolidation efforts have included RightSizing, Storage Utility, Compute Utility, File Server Utility, and recently, the SQL Server consolidation initiative. Each effort has significantly reduced the data center footprint and has contributed to environmental sustainability. Areas of opportunity targeted by the SQL Server consolidation initiative include: Energy efficient hardware Hardware consolidation Intelligent allocation of hardware resources
Desired Situation
The objective is to design and deploy a SQL Server Utility service to reduce operating and capital expenses through consolidation and multi-tenancy. The SQL Server consolidation initiative will be based on the already
35
successful shared service models of Storage Utility, Compute Utility, and File Server Utility. Each of these utilities has contributed to standardization of the Microsoft IT infrastructure, and each provides a more predictable and reliable platform for other applications and services. The Storage Utility and Compute Utility will be discussed in more detail later but are both important to the SQL Server Utility design. Not all SQL Server instances will be good candidates for consolidation. Initially, this solution will be developed with the most typical OLTP databases in mind. Multi-tenancy scenarios will also be supported for those customers who only want a single database. We expect that consolidation will be appropriate for thousands of instances and that multi-tenancy will be appropriate for hundreds of databases. In fiscal year 2009, the goal is to engineer and provide a SQL Server Utility that will reduce dedicated single instance SQL Server hosts by 10 percent and position Microsoft IT for continued consolidation.
Solution Mindset
The solution mindset requires executive sponsorship, data-driven discussion, coherent storage and computing foundations, and an articulated consolidation strategy. Executive sponsorship. Executive commitment to maximize data center resource utilization and promote environmental sustainability is critical. Several activities described in this section provided the foundation needed for consolidation. None of these activities would have been likely to succeed without executive sponsorship and investment. A data-driven discussion. Microsoft IT developed the RightSizing initiative to ensure effective utilization of servers in the data center and in managed labs. Because significant underutilization occurs, one of the initiatives first tasks was for Microsoft IT to identify underutilized servers that might be good candidates for virtualization (for more information on RightSizing, see Resources). The Capacity Management team relies on RightSizing data. To accurately compare the performance of server platforms of varying architectures, Microsoft IT has developed a Compute Unit (CU) formula for each server platform that utilizes an industry standard, architectureagnostic, benchmark suite from the Standard Performance Evaluation Corporation (SPEC). The SPEC benchmarks are developed in such a way to allow a repeatable test with strict result submission requirements. The Microsoft IT CU formula uses a baseline (not peak) benchmark that measures the rate of integer calculation work a server platform can perform in a given amount of time. The servers available for purchase today represent a massive increase in performance over systems available in the past. Todays 2-way server provides the equivalent computing power of a 4-way from 12 to 18 months ago and even matches the Compute Unit capabilities of a four-year-old 8-way server. By collecting information about current hardware and processor utilization, the RightSizing team can make
recommendations on how to maximize server utilization. Data center servers are underutilized, with an overall average CPU utilization of ~9.75 percent. As new server platforms are introduced with performance capabilities far surpassing their predecessors, this already low CPU utilization number will continue to fall. Table 1 and Figure 1 depict current processor utilization for a sample set of servers in Microsoft IT. A temperature was assigned to each consumption category for reference in RightSizing discussions. These numbers indicate substantial opportunity for host consolidation. Storage foundation. The Storage Utility service provides shared or dedicated SAN storage to which data center servers can connect. The service provides the SAN storage and all hardware required to connect a server to the SAN, as well as all maintenance and management functions, but does not provide the server itself. An effect of the Storage Utility was that instead of engineering and purchasing small, medium, large servers with anticipated DAS for SQL Server and other server types, Microsoft IT was able to modify the standard builds so that minimal DAS was included in the purchase. This means that application support teams no longer had to anticipate disk capacity over the life of the server which usually resulted in underutilization. Computing foundation. The Compute Utility strategy abstracts the services provided by hardware at Microsoft data centers. Rather than having a business unit address its computing requirements by purchasing a server, in this approach, a business group provides its computing capacity requirements, and Microsoft IT then determines whether a virtual or physical server can meet those requirements and provides the service. The Compute Utility strategy sought to create this level of abstraction for business groups to encourage them to purchase computing power and storage without worrying about the server hardware. Other utilities such as the File Server utility rely on RightSizing data and reside on Storage and Compute Utilities. SQL Server consolidation will further contribute to environmental sustainability and will also rely on these utilities. Consolidation strategy. There are multiple approaches to database consolidation. More common approaches include instance consolidation and host consolidation. In instance consolidation, databases from multiple SQL Server instances are consolidated under fewer instances, and considerations range from CPU, memory, and I/O subsystem management to sort/collation sequences to endpoint usage. In host consolidation, the host is partitioned (typically with Hyper-V or Windows System Resource
349
2146
2151
2197
36
Manager) and a larger number of instances are placed on each host. Each method of consolidation has its own considerations but many areas are much simpler to manage in a host consolidation approach. Microsoft IT has compared consolidation approaches and has selected host consolidation for its ability to meet our consolidation objectives while introducing minimal risk. Since host consolidation still requires shared resources such as CPU, memory, IO, and network, selection of a manageable and flexible host partitioning method will have a significant impact on day-to-day operations. The General Benefits section of this article describes some important advantages of using Hyper-V compared to Windows System Resource Manager and multiple named instances. All SQL Server Utility offerings will leverage layers of the existing Microsoft IT utility stack (Figure 2). Later phases of the consolidation initiative will consider other forms of consolidation as well as multi-tenancy. Host consolidation requires that resources on a single host be managed to ensure that each instance receives predictable and reliable memory, processor, network, and I/O. Windows System Resource Manager and Hyper-V host partitioning technologies were evaluated; Hyper-V was selected for its manageability, scalability, and standardization benefits. Since Hyper-V on Windows 2008 scales to a maximum of four processors per guest (two processors for Windows 2003), consolidation of physical SQL Server instances will also be used to consolidate instances that require more than four processors. Physical SQL Server instances will be less manageable than virtual instances but will provide a consistent, proven approach to consolidation until Hyper-V scales to more than four processors. The approach to host consolidation primarily targets servers that are approaching end-of-life. This provides minimal service disruption (since server replacement would occur with or without consolidation). Multi-tenancy instances will also be deployed on Hyper-V and will be scaled to maximize host resources. As server and virtualization technologies improve, the Hyper-V approach to multi-tenancy will provide increasingly improved manageability and scalability. Figure 3 depicts six end-of-life servers with 30 compute units each being replaced by equivalent Hyper-V guests on a single server. Figure 4 depicts SQL Server Utility offerings that cover different tenant needs. Hyper-V will be used to partition host resources for those tenants who need up to four processors and named instances either on a shared or dedicated server will be used for those who require additional processor or memory resources. As Hyper-V, hardware, and other technologies evolve, more and more tenant needs will be met using Hyper-V. Table 2 shows the standard Hyper-V guest configurations that will be used in the SQL Server Utility.
Figure 3: Host Partitioning with Virtual Instances on Hyper-V or Physical Instances on WSRM
Dedicated Hosts (30 Compute Units Each) Consolidated Hosts (30 Compute Units Each)
37
Offerings
Computing power
Dedicated Host
Virtual Machine Manager Library, a standard build library, developed by Microsoft IT, with consistent Windows Server and SQL Server installation and configuration is another key manageability improvement for consolidation with Hyper-V which will allow IT developers, testers, and production support teams to ensure a consistent experience across phases of the Software Development Life Cycle. Imagine replacing less efficient build processes with a standardized and possibly automated deployment process. Colleagues with many years of experience in development and production support express excitement when contemplating the increased environmental consistency and stability offered by this approach. Relocation of a virtual SQL Server instance is simpler and lower risk than the method of building a server, installing Windows Server and SQL Server then migrating databases to the new physical SQL Server instance. Basic database administration tasks for the consolidated SQL Server environment will continue to leverage the backup utilities that were written by Microsoft IT (see the September 2007 article on SQL Server Automation Scripts in SQL Server Magazine). Data Protection Manager has been deployed within Microsoft IT and adoption for SQL Server backups is on the roadmap for this initiative. Finally, the snapshot feature of Hyper-V will improve the ability to deploy and roll back host changes. You simply take snapshots at key points in your change deployment so that, instead of having to start from scratch and rebuild a server, you have the option to roll back. While there is overhead associated with taking guest snapshots, as a tactical deployment tool, Hyper-V snapshots have advantages over a manual roll back. Performance requirements and abilities in the consolidated environment are also very similar to the previous environment. Since the Storage Utility had been implemented prior to SQL Server consolidation, a track record of performance from the storage layer already exists. In the consolidated environment, SQL Server operations teams will still be able to provide I/O performance expectations to the Storage Utility team and will be able to obtain Hyper-V guests with sufficient processor and memory from the Compute Utility team. Here are a few performance guidelines that are used in this consolidation effort: 1. Crawl, walk, run. Dont go for the maximum host consolidation ratio right away. Begin with the smaller workloads, validate your
38
deployment, and refine the plan. Maximize your resource utilization in phases after establishing and evaluating your actual utilization. 2. Use Hyper-V pass-through disk or fixed Virtual Hard Disks (VHDs) for storage (Figure 6). Fixed VHDs offer some manageability benefits but 2008-2009 provide slightly lower performance. Moving a Primary guest to another host, for example, is simplified Focus when using VHDs. 3. Do not overcommit processors for SQL Server guests. Begin with one logical processor for one physical processor. Verify your performance and refine your configuration as needed. At some point, this may include overcommitment, but begin without overcommitment to manage risks. 4. Avoid the use of emulated devices in Hyper-V. Favor synthetic devices which provide better performance and lower processor overhead. 5. Establish an operating level agreement (OLA) with performance requirements for your storage provider if they are a separate service. Microsoft IT SQL Server Utility has requirements for 1ms average disk/second read/write for log and 8ms for OLTP data. Since Windows 2008 Hyper-V guests may use a maximum of four processors, native SQL instance consolidation is planned for workloads that require more than four processors. Native SQL instance resource management can be effectively accomplished using both SQL Server configuration and Windows System Resource Manager. Once Hyper-V scales to more than four processors, SQL instances that require more processing power will be deployed and managed on Hyper-V. (The recently published Running SQL Server 2008 in a Hyper-V Environment - Best Practices and Performance Recommendations offers more detailed Hyper-V guidance; see Resources.) Predictability/repeatability can be improved by developing and adopting a configuration and deployment strategy that spans multiple phases of your software development life cycle. In todays environment developers, testers and production support teams build servers using standard install bits for the operating system, SQL Server, and additional tools. This time-consuming approach can sometimes result in inconsistencies between environments. These inconsistencies can ultimately result in unanticipated or unpredictable behavior once an application is deployed into production environments. Using Hyper-V guests that are preconfigured with standard builds that the SQL Server Utility team expects will reduce or eliminate inconsistencies across the software development life cycle. Reliability was a key concern for SQL Server consolidation tenants. The concern was that consolidated workloads and configurations would interfere with one another and that changes made for one application/ tenant would impact others and cause additional application downtime.
Witness
SAN
Hyper-V provides operating system isolation so production support teams can prioritize their upgrade activities without dependencies on other application support teams. This greatly improves flexibility when it comes to test, change, and release; and improves overall reliability for applications due to fewer conflicts. Scalability and Capacity Management are easier with virtualization. RightSizing teams and capacity management teams have greater agility when it comes to sizing up or down. If a tenant requests a medium-sized two-processor guest with 4 GB of memory, but after deployment, learns that they underestimated their resource requirements, it is a simple matter to add memory and processors to the guest, even if it means relocating
Switch
Sw
itc
the guest to a host with available resources. This flexibility to reconfigure and relocate Hyper-V guests means that IT teams no longer have to overpurchase hardware resources which will result in less underutilization of data center resources. SQL Server instances that require more than four processors will be in scope for consolidation but will be consolidated using physical rather than virtual instances. Windows System Resource Manager will be used in cases where multiple physical instances share a single host. Physical hosts will be dedicated to specific tenants for improved SLA management, security and customer satisfaction. As Hyper-V supports increased numbers of processors, more databases will be appropriately hosted in virtual instances. Physical Resource Optimization (PRO). Using System Center Virtual Machine Manager 2008 and System Center Operations Manager 2007, administrators can assess historical performance data and intelligently place new SQL Server guests to optimize physical resource utilization and distribute workloads. Security presents one of the greatest concerns. Microsoft IT production support teams have traditionally had access to host configurations. They are responsible and accountable for changes made to hosts and though changes are made through established change control processes, these teams wish to maintain the level of access and control that theyve had historically. The Hyper-V approach to host partitioning provides production support teams with the flexibility to schedule, test, and apply changes and security patches in a timely manner. Other methods of host partitioning, such as Windows System Resource Manager, meant that each instance on any given host would need to be on the same build of Windows Server and may need to coexist with other tenants who would likely have different service level agreements, maintenance windows, priorities, and application business cycles. Other partitioning methods also introduce security questions for data access, service account usage, certificates, logins/roles, and access to the operating system and hardware. Service Monitoring and Control changes for this project are minimal in early phases. Monitoring requirements are somewhat increased by introducing an additional layer for virtualization, but since virtualization has been broadly adopted by other platform layers such as for file servers and Web servers, service monitoring and control is expected to
39
LUN/Partition
Annual Recycle Cost at 6:1 Consolidation $50,0000 $40,0000 $30,0000 $20,0000 $10,0000 $0 Legacy SQL Utility $18,000,0000 $16,000,0000 $14,000,0000 $12,000,0000 $10,000,0000 $8,000,0000 $6,000,0000 $4,000,0000 $2,000,0000 $0
Legacy
SQL Utility
become a standardized and effective part of our environment. Monitoring General Benefits services currently provided using System Center Operations Manager 2007 The Table 3 shows the benefits of consolidation on Hyper-V guests by the Microsoft IT Enterprise Monitoring Team for the preconsolidation compared to using native instances of SQL Server. environment will also be leveraged by the SQL Server Utility. The SQL Server Utility team believes that availability monitoring for databases and SQL Conclusion Server services are a fundamental requirement for this service offering. Effective resource utilization within the data center has a significant impact Therefore, adoption of a database availability reporting/scorecard system on the global efforts to protect our environment. Beginning with the and for improving the System Center Operations Manager SQL Server server build, and on through transportation to the data center, rack space management pack rules are in scope for early project phases. Another product that will be used to ensure consistent and Figure 8 Streamlining Processes with Hyper-V optimal configuration is System Center Configuration Manager. Using this product with Desired Configuration Management, detection of configurations which have deviated or drifted from the known good and approved configurations will be much easier. SQL Engineering Provisions Guest Images Additional tools and configurations are layered on Guest Images Supportability is important to application owners. The SQL Plan Consistent process and adoption of platform improvements Server Utility project will not deploy unsupported configurations. We will, however, anticipate future supported configuration scenarios and posture accordingly. Dev/Test Leverages Guest Images
Results
Consolidation in the Data Center Operating costs are expected to drop sharply but not as dramatically as power and space. That is primarily because, even though we will have fewer physical servers, there will still be a cost associated with managing the Hyper-V guests. Annual operating costs for the SQL Server utility are expected to be $11 million/year lower than previously. A typical end-of-life SQL Server host in the Microsoft data center occupies 6.8 rack units. Servers provided by the Compute Utility team occupy less than 1 rack unit and provide enough computing power to host five or six instances of SQL Server. This comes to a savings of over 33,000 rack units or about 700 racks! This number does not even take into account that the DAS being replaced by SAN also comes with significant savings.
Build
Eliminates OS Build Process Eliminates SQL Build Process Faster time to build
Stabilize
Dev/Test Leverages Guest Images May opt to scale up or down to alternate guest configuration (Small, Medium, Large) or go with dedicated. Greater predictability due to consistent guest image across SDLC phases Production deployment from Guest Images (environment will be consistent with that of Dev and Test) Business Continuity Environment based on Guest Images or cloned from Production baseline (at deployment and change) Guest snapshots may be used for change management deploy/rollback scenarios Relocate Image for Scalability Image may be duplicated for troubleshooting and problem management Guest may be duplicated and archived for future use Improved Capacity trending with VMM
Deploy
Operate
40
Table 3: SQL Server Utility System Qualities Hyper-V and Physical SQL Server Instances
System Quality Manageability Manageability Manageability Manageability Manageability Manageability Security Scalability Scalability Performance Availability Business Continuity Supportability Feature Ability to build and provide canned environment Deploy/Rollback Benefits End-to-End (development through production) use Simple migration to new host during server retire/replacement Simplicity for Instance scale up Simplicity for cloning a production environment (e.g. to Test) Transparent to accomplish same level of security as with a dedicated host? Dynamic sharing of processor resources Processors Supported per environment Acceptable Performance Clustering Option (Future ability for SQL Server on Hyper-V) Supports SQL Business Continuity features? SQL 2005 and 2008 CSS Support (not yet with SQL Server clustering) Hyper-V YES YES YES YES YES YES YES YES 4 YES YES YES YES SQL Inst. NO NO NO NO NO NO NO YES >32 YES YES YES YES
utilization, power, cooling, and finally, to the eventual end-of-life recycle, each server deployed or not deployed has an impact on efficient resource utilization and ultimately on the environment. Executive sponsorship is crucial to enterprise-wide consolidation projects. It is not difficult to make a business case for consolidation, particularly when you consider data center power and rack space benefits. The socialization, evangelism, and budget controls that executive sponsorship provides are vital to deployment and adoption. Today, finding opportunities to consolidate various IT layers and functions is easier than ever before. Windows Server 2008, Hyper-V, and SQL 2008 are a few of the products that are truly game changers when it comes to effective resource utilization and consolidation. The Microsoft IT SQL Server Utility project is currently in progress and is expected to make a substantial impact on environmental sustainability while achieving many other virtualization and consolidation benefits.
http://sqlcat.com/whitepapers/archive/2008/10/03/running-sql-server2008-in-a-hyper-v-environment-best-practices-and-performancerecommendations.aspx SQL Server Magazine SQL Server Automation Scripts (September 2007) http://www.sqlmag.com/Article/ArticleID/96463/SQL_Server_Automation_ Scripts.html Standard Performance Evaluation Corporation http://spec.org
Resources
Data Center Energy Forecast http://svlg.net/campaigns/datacenter/docs/DCEFR_report.pdf Microsoft IT RightSizing - Identifying Server Candidates for Virtualization http://technet.microsoft.com/en-us/library/cc700692.aspx Microsoft IT Showcase Virtualization Whitepaper http://technet.microsoft.com/en-us/library/cc713312.aspx Report to Congress on Server and Data Center Energy Efficiency (Public Law 109-431) http://www.energystar.gov/ia/partners/prod_development/downloads/ EPA_Datacenter_Report_Congress_Final1.pdf Running SQL Server 2008 in a Hyper-V Environment Best Practices and Performance Recommendations
098-110485
18
subscribe at www.architecturejournal.net