Patent ID: 8046468

Claim:
A method for allocating resources in a virtual desktop environment, the method comprising: making a prediction for future demand by a plurality of processes running on a first host and a second host, the prediction being based on each process demand history and on removing past process demand glitches, including defining the process demand history on which the prediction is based by identifying any past process demand glitch and by including stable periods while excluding any identified past process demand glitch between the stable periods; selecting a candidate process for movement, the candidate process being one of the plurality of processes; performing a cost and benefit analysis for moving the candidate process from the plurality of processes from the first host to the second host based on the prediction, the cost and benefit analysis being specific to the candidate process; and executing a move of the candidate process when the cost and benefit analysis recommends the move; wherein removing past process demand glitches further includes, finding a glitch in process demand as an unstable period between first and second stable periods, including identifying the glitch by comparing adjacent samples of process demands to identify unstable samples and then grouping the unstable samples for determining whether a group of the unstable samples is a glitch, and removing the glitch in process demand when a load of the second stable period is within a demand variation threshold from a load of the first stable period, such that the prediction is based on a combination of the first and second stable periods after removal of the glitch.