Abstract:
One or more measurements of processor utilization are taken. A utilization ceiling is calculated. One or more processing units (PUs) are added automatically if it is determined that the utilization ceiling is greater than an available PU capacity. One or more PUs are removed automatically responsive to determining that the utilization ceiling is at least one PU less than the available PU capacity.

Description:
BACKGROUND 
       [0001]    This invention relates generally to processing within a computing environment, and more particularly to the programmatic management of processor population. 
         [0002]    In a computing system provided with N functionally equivalent computer processing units (PUs), the workload running on the system will often consume less computational power than the N PUs can provide in aggregate. Quantitatively, this may be expressed as, “The system is less than N*100% utilized.” For example, if N=16, full utilization would be 1600%, and a workload that consumes only half of the available capacity would be said to run at 800% utilization. 
         [0003]    Multiprocessing-capable operating systems dispatching such workloads often distribute the workloads evenly over the N PUs. Continuing the above example, the dispatcher might run each of the 16 functionally identical PUs at 50% utilization, thereby providing the workload with sufficient power. 
         [0004]    In some computing systems, due to the overhead of managing multiple PUs, the processor cache structure of the machine, and the increasing need for operating system locking and mutual exclusion as multiprocessing level increases, such equitable distribution is not always the most efficient way to distribute such a workload. Returning again to the example, it might make more sense for the operating system kernel to run that 800% workload as 10 processors running at 80% utilization, with the remaining six processors idle. 
       BRIEF SUMMARY 
       [0005]    An embodiment includes a computer implemented method. The method includes taking one or more measurements of processor utilization. A utilization ceiling is calculated. One or more processing units (PUs) are added automatically if it is determined that the utilization ceiling is greater than an available PU capacity. One or more PUs are removed automatically responsive to determining that the utilization ceiling is at least one PU less than the available PU capacity. 
         [0006]    An additional embodiment includes a system. The system includes a computer processor configured to take one or more measurements of processor utilization. A utilization ceiling is calculated. One or more processing units (PUs) are added automatically if it is determined that the utilization ceiling is greater than an available PU capacity. One or more PUs are removed automatically responsive to determining that the utilization ceiling is at least one PU less than the available PU capacity. 
         [0007]    An additional embodiment includes a tangible storage medium readable by a processing circuit and storing instructions for execution by the processing circuit for performing a method. The method includes taking one or more measurements of processor utilization. A utilization ceiling is calculated. One or more processing units (PUs) are added automatically if it is determined that the utilization ceiling is greater than an available PU capacity. One or more PUs are removed automatically responsive to determining that the utilization ceiling is at least one PU less than the available PU capacity. 
         [0008]    A further embodiment includes a computer implemented method. The method includes taking one or more measurements of processor utilization. First and second utilization ceiling are calculated. One or more processing units (PUs) are automatically added if it is determined that the larger of the first utilization ceiling and the second utilization ceiling is greater than an available PU capacity. One or more PUs are automatically removed if it is determined that the larger of the first utilization ceiling and the second utilization ceiling is at least one PU less than the available PU capacity. 
         [0009]    Additional features and advantages are realized through the techniques of the present invention. Other embodiments and aspects of the invention are described in detail herein and are considered a part of the claimed invention. For a better understanding of the invention with advantages and features, refer to the description and to the drawings. 
     
    
     
       BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS 
         [0010]    Referring now to the drawings wherein like elements are numbered alike in the several FIGURES: 
           [0011]      FIG. 1  depicts a schematic diagram of a system for implementing programmatic management of processor population that may be implemented by an embodiment; 
           [0012]      FIG. 2  depicts a graph of processor unit utilization in an embodiment; 
           [0013]      FIG. 3  depicts a mathematical table of values that relates random variable values to percentage likelihoods that samples above those values will occur according to an embodiment; 
           [0014]      FIG. 4  depicts a process flow for programmatic management of processor population that may be implemented in an embodiment; and 
           [0015]      FIG. 5  depicts a process flow for programmatic management of processor population that may be implemented in an additional embodiment. 
       
    
    
     DETAILED DESCRIPTION 
       [0016]    An embodiment of the present invention provides for programmatic management of processor configuration. 
         [0017]    An embodiment includes calculating the mean processing load over time, along with the standard deviation. Based on the processing load&#39;s mean and processing load&#39;s standard deviation, and given a confidence percentage P specified by the system administrator, a load ceiling C is calculated that the actual load in the next interval is only P% likely to exceed. In an embodiment, to make this calculation the table in  FIG. 3  is used. For example, if the system administrator wants to manage for a 2% probability of failure, the ceiling C would be μ+2.06*σ. Then, based on how many CPUs are turned on at that point in time, it is determined whether more CPUs are needed in order to be able to handle C. If more CPUs are needed, then additional CPUs are turned on until the combination of CPUs is able to handle C. If fewer CPUs are needed to handle C, then the extra CPUs are turned off. 
         [0018]    Large computer systems operate under varying loads. Often, these computer systems are oversized in order to ensure that, under the highest expected demand, the system will have enough processing power to support the entire load. The processing power is provided by adding additional PUs to the computer system. A PU may include a single computer processor, or a computer core. In an embodiment, a PU is a logical processor. The processing load is typically spread across multiple PUs and, therefore, when the system is under less than a maximal load, each of the processors may have a significant amount of underutilized processing power. 
         [0019]    An operating system&#39;s task management system spreads the work among the processors, and by doing so, incurs processing overhead such as locking for mutual exclusion. In addition, as processing is transferred from PU to PU the associated cache data and instructions must be moved as well. In a large system, this overhead could be significant and may have a substantial impact on the overall system processing time. 
         [0020]    Some of the overhead may be mitigated manually by turning off PUs when the load on the system is anticipated to be low. This manual adjustment of PUs, however, cannot accommodate for unexpected bursts of processing volume, and therefore is of limited value. A more intelligent approach is to automatically turn PUs on and off as needed. This will substantially reduce the processor management overhead by running processes on the minimum set of PUs that will support the anticipated load, while having the capability to predict near future changes in the processing requirements, and thereby turning PUs on and off based on the overall system&#39;s anticipated needs. 
         [0021]    Turning now to  FIG. 1 , a system  100  for implementing programmatic management of processor population will now be described. In an embodiment, the system  100  includes a host system computer  102  executing computer instructions to: 1) run an application workload, and (2) to measure CPU utilization as input to programmatic management of the PU configuration, and (3) to turn on or turn off PUs according to projections of near-future needs for capacity. Host system computer  102  may operate in any type of environment that is capable of executing a software application. Host system computer  102  may comprise a high-speed computer processing device, such as a mainframe computer. In an embodiment, the host system computer  102  is part of an enterprise (e.g., a commercial business) that uses programmatic techniques to manage CPU configuration based on projected demand for CPU power. 
         [0022]    In an embodiment, the system  100  depicted in  FIG. 1  includes one or more client systems  104  through which users at one or more geographic locations may contact the host system computer  102 . The client systems  104  are coupled to the host system computer  102  via one or more networks  106 . Each client system  104  may be implemented using a general-purpose computer executing a computer program for carrying out the processes described herein. The client systems  104  may be personal computers (e.g., a lap top, a personal digital assistant, a mobile device) or host attached terminals. If the client systems  104  are personal computers, the processing described herein may be shared by a client system  104  and the host system computer  102  (e.g., by providing an applet to the client system  104 ). Client systems  104  may be operated by authorized users (e.g., programmers) for accessing applications executing on the host system  102 , such as web servers, database servers, etc. 
         [0023]    The networks  106  may be any type of known network including, but not limited to, a wide area network (WAN), a local area network (LAN), a global network (e.g., Internet), a virtual private network (VPN), and an intranet. The networks  106  may be implemented using a wireless network or any kind of physical network implementation known in the art. A client system  104  may be coupled to the host system computer  102  through multiple networks (e.g., intranet and Internet) so that not all client systems  104  are coupled to the host system computer  102  through the same network. One or more of the client systems  104  and the host system computer  102  may be connected to the networks  106  in a wireless fashion. In one embodiment, the networks  106  include an intranet and one or more client systems  104  executing a user interface application (e.g., a web browser) to contact the host system computer  102  through the networks  106 . In another embodiment, the client system  104  is connected directly (i.e., not through the networks  106 ) to the host system computer  102  and the host system computer  102  contains memory for storing data in support of programmatic management of processor population. Alternatively, a separate storage device (e.g., storage device  112 ) may be implemented for this purpose. 
         [0024]    In an embodiment, the storage device  112  includes a data repository with data relating to programmatic management of processor population by the system  100 , as well as other data/information desired by the entity representing the host system computer  102  of  FIG. 1 . The storage device  112  is logically addressable as a consolidated data source across a distributed environment that includes networks  106 . Information stored in the storage device  112  may be retrieved and manipulated via the host system computer  102  and/or the client systems  104 . In an embodiment, the storage device  112  includes one or more databases containing, e.g., configuration parameters, values, methods, and properties, as well as other related information as will be discussed more fully below. It will be understood by those of ordinary skill in the art that the storage device  112  may also comprise other structures, such as an XML file on the file system or distributed over a network (e.g., one of networks  106 ), or from a data stream from another server located on a network  106 . In addition, all or a portion of the storage device  112  may alternatively be located on a client system  104 . 
         [0025]    The host system computer  102  depicted in the system of  FIG. 1  may be implemented using one or more servers operating in response to a computer program stored in a storage medium accessible by the server. The host system computer  102  may operate as a network server (e.g., a web server) to communicate with the client systems  104 . The host system computer  102  handles sending and receiving information to and from the client systems  104  and can perform associated tasks. The host system computer  102  may also include a firewall to prevent unauthorized access to the host system computer  102  and enforce any limitations on authorized access. For instance, an administrator may have access to the entire system and have authority to modify portions of the system. A firewall may be implemented using conventional hardware and/or software as is known in the art. 
         [0026]    The host system computer  102  may also operate as an application server. The host system computer  102  executes one or more computer programs to provide the programmatic management of processor configuration. The host system computer  102  includes a processor management module  108 . As indicated above, processing may be shared by the client systems  104  and the host system computer  102  by providing an application (e.g., java applet) to the client systems  104 . Alternatively, the client system  104  can include a stand-alone software application for performing a portion or all of the processing described herein. As previously described, it is understood that separate servers may be utilized to implement the network server functions and the application server functions. Alternatively, the network server, the firewall, and the application server may be implemented by a single server executing computer programs to perform the requisite functions. 
         [0027]    In an embodiment, the processor management module  108  is executed on the host computer system along with the workload that is distributed across the PUs. In an additional embodiment, the processor management module  108  is executed on a separate computer system, which is not executing the workload. 
         [0028]    It will be understood that the programmatic management of processor population described in  FIG. 1  may be implemented in hardware, software executing on a general purpose computer, or a combination thereof. 
         [0029]      FIG. 2  depicts a graph of PU utilization in an embodiment. The PU utilization curve  202  indicates actual PU utilization over time. Based on the PU utilization curve  202  a utilization mean (μ)  204  is calculated. The utilization mean  204  is the mean PU utilization over the time calculated for the PU utilization curve  202 . Based on the PU utilization curve  202  and the utilization mean  204 , a standard deviation (σ) is calculated. It will be understood that the graph of  FIG. 2 , and the values in the graph are purposes of illustration only, and that embodiments are not limited to any specific values. Furthermore, the values themselves are calculated, however, the generation of a graph is not required, and the values themselves are used to determine PU requirements of the system. 
         [0030]      FIG. 3  depicts a mathematical table of values that relates random variable values to percentage likelihoods that samples above those values will occur. Column M indicates a number of standard deviations from the mean PU utilization calculated, for example, from the data of  FIG. 2 . The second column is the calculated probability that the utilization requirements of system will exceed the value in the column M. Therefore, according to the table of  FIG. 3 , there is a 16% probability that, during the following time interval, the PU utilization will exceed one standard deviation above the mean PU utilization. The number of PUs that are needed is projected using this probability value. In an embodiment, the risk that a given value M will be exceeded is measured against the risk that a user is willing to incur. For example, assuming that a user is willing to incur a 2% risk that the actual utilization will exceed M, then the number of PUs that will be brought online will need to be able to support the current mean processor utilization value plus 2.06 standard deviations. The PU count will therefore be adjusted accordingly, as will be discussed in more detail below. 
         [0031]    It will be understood that the values in the table of  FIG. 3  are purposes of illustration only, and that embodiments are not limited to any specific values. 
         [0032]    In an embodiment, the data and the probability calculations are produced at regular time intervals for the system as a whole. In an additional embodiment, the system comprises a number of heterogeneous PUs and, the data and probability calculations are produced for each type of PU. 
         [0033]      FIG. 4  depicts a process flow for programmatic management of processor population that may be implemented in an embodiment. In an embodiment, the process flow of  FIG. 4  is executed on a processor management module, such as the processor management module  108  of  FIG. 1 . At block  402 , current processor utilization is measured. In an embodiment, previous processor utilization values are cached, and the current processor utilization is added to the cache. At block  404 , the mean utilization for a time period X is calculated. In an embodiment, such as at system startup, for example, the mean utilization step waits to accrue data for the time period X. At block  406 , a standard deviation of the PU utilization data is calculated. At block  408 , the CPU load ceiling C is calculated that is only P % percent likely to occur, where P was chosen by the system administrator, and using the CPU load mean, the CPU load standard deviation, and the appropriate row value of  FIG. 3 . At block  410 , the calculated load ceiling is compared to the number of PUs currently online. If C is likely to exceed the number of PUs that are currently online, at block  412 , one or more additional PUs are brought online in order to meet the calculated ceiling C, and processing continues at block  402 . Otherwise, if C does not exceed the number of PUs that are online by, for example, a utilization threshold, then processing continues at block  414 , where it is determined if the calculated processing ceiling C is at least one PU less than the number of PUs currently online, i.e., if one or more PUs can be deactivated. If it is determined that one or more PUs can be deactivated, then at block  416 , one or more PUs is deactivated. Processing then continues at block  402 . 
         [0034]    Returning to block  414 , if C is not likely to be at least one PU less than the number of PUs currently online, then processing continues at block  402 . In an embodiment, the process flow of  FIG. 4  is used to compare the calculated ceiling C with the number of PUs currently online and adjust the number of PUs online of the system as a whole. In an additional embodiment, the system comprises a number of heterogeneous PUs, and the process flow of  FIG. 4  is executed for each of the various PU types. 
         [0035]      FIG. 5  depicts a process flow for programmatic management of processor population that may be implemented in an additional embodiment. In an embodiment, the process flow of  FIG. 5  is executed on a processor management module, such as the processor management module  108  of  FIG. 1 . At block  502 , current processor utilization is measured. In an embodiment, previous processor utilization values are cached, and the current processor utilization is added to the cache. At block  504 , the mean utilization for a time period X is calculated. In an embodiment, such as at system startup, for example, the mean utilization step waits to accrue data for the time period X. At block  506 , a standard deviation of the PU utilization data is calculated. At block  508 , the CPU load ceiling C is calculated that is only P% percent likely to occur, where P was chosen by the system administrator, and using the CPU load mean, the CPU load standard deviation, and the appropriate row value of  FIG. 3 . At block  510 , an alternate load ceiling C′ is chosen based on the magnitudes of the last two actual utilization observations and their difference. In other words, the alternate load ceiling C′ is (last sample)+(last sample minus the next to last sample). At block  512 , the greater of the load ceiling C and the alternate load ceiling C′ is determined (referred to herein as C″). At block  514 , C″ is compared to the number of PUs currently online. If the C″ is larger than the number of PU&#39;s currently online, at block  516 , one or more additional PUs are brought online in order to meet the processor ceiling C″, and processing continues at block  502 . Otherwise, if the C″ does not exceed the number of PUs currently online, then processing continues at block  518 , where it is determined if the calculated processing ceiling C″ is at least one PU less than the number of PUs currently online, i.e., if one or more PUs can be deactivated. If it is determined that one or more PUs can be deactivated, then at block  520 , one or more PUs is deactivated. Processing then continues at block  502 . 
         [0036]    Returning to block  518 , if C″ is not likely to be at least one PU less than the number of PUs currently online, then processing continues at block  502 . In an embodiment, the process flow of  FIG. 5  is used to compare the calculated ceiling C″ with the number of PUs currently online and adjust the number of PUs online of the system as a whole. In an additional embodiment, the system comprises a number of heterogeneous PUs, and the process flow of  FIG. 5  is executed for each of the various PU types. 
         [0037]    In an embodiment, either of the flows depicted in  FIGS. 4 and 5  may be modified by adding a constant value Z to the projected processor utilization values, thereby increasing the number of PUs by the projected value plus Z to create a processing buffer. 
         [0038]    Technical effects and benefits include reducing processor overhead by consolidating workloads on the minimum set of PUs required to process the workload. An additional benefit is the ability to predict, in real time, the needed processor population of a set of PUs, and the ability to increase the number of PUs to meet the projected workload. Yet another benefit is the ability to predict processor utilization across groups of heterogeneous PUs, for each group of PUs of a given type. 
         [0039]    The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the singular forms “a”, “an” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms “comprises” and/or “comprising,” when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. 
         [0040]    The corresponding structures, materials, acts, and equivalents of all means or step plus function elements in the claims below are intended to include any structure, material, or act for performing the function in combination with other claimed elements as specifically claimed. The description of the present invention has been presented for purposes of illustration and description, but is not intended to be exhaustive or limited to the invention in the form disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the invention. The embodiment was chosen and described in order to best explain the principles of the invention and the practical application, and to enable others of ordinary skill in the art to understand the invention for various embodiments with various modifications as are suited to the particular use contemplated. 
         [0041]    As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or computer program product. Accordingly, aspects of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment (including firmware, resident software, micro-code, etc.) or an embodiment combining software and hardware aspects that may all generally be referred to herein as a “circuit,” “module” or “system.” Furthermore, aspects of the present invention may take the form of a computer program product embodied in one or more computer readable medium(s) having computer readable program code embodied thereon. 
         [0042]    Any combination of one or more computer readable medium(s) may be utilized. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. 
         [0043]    A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. 
         [0044]    Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing. 
         [0045]    Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the “C” programming language or similar programming languages. The program code may execute entirely on the user&#39;s computer, partly on the user&#39;s computer, as a stand-alone software package, partly on the user&#39;s computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer may be connected to the user&#39;s computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet Service Provider). 
         [0046]    Aspects of the present invention are described above with reference to flowchart illustrations and/or schematic diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. 
         [0047]    These computer program instructions may also be stored in a computer readable medium that can direct a computer, other programmable data processing apparatus, or other devices to function in a particular manner, such that the instructions stored in the computer readable medium produce an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks. 
         [0048]    The computer program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. 
         [0049]    As described above, embodiments can be embodied in the form of computer-implemented processes and apparatuses for practicing those processes. In embodiments, the invention is embodied in computer program code executed by one or more network elements. Embodiments include a computer program product on a computer usable medium with computer program code logic containing instructions embodied in tangible media as an article of manufacture. Exemplary articles of manufacture for computer usable medium may include floppy diskettes, CD-ROMs, hard drives, universal serial bus (USB) flash drives, or any other computer-readable storage medium, wherein, when the computer program code logic is loaded into and executed by a computer, the computer becomes an apparatus for practicing the invention. Embodiments include computer program code logic, for example, whether stored in a storage medium, loaded into and/or executed by a computer, or transmitted over some transmission medium, such as over electrical wiring or cabling, through fiber optics, or via electromagnetic radiation, wherein, when the computer program code logic is loaded into and executed by a computer, the computer becomes an apparatus for practicing the invention. When implemented on a general-purpose microprocessor, the computer program code logic segments configure the microprocessor to create specific logic circuits. 
         [0050]    The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.