Improving cloud efficiency with online learning