Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1032063AbdDTOBB (ORCPT ); Thu, 20 Apr 2017 10:01:01 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:34485 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031896AbdDTOA5 (ORCPT ); Thu, 20 Apr 2017 10:00:57 -0400 Subject: Re: about CPU QoS in KVM To: KVM list , "linux-kernel@vger.kernel.org" , cgroups@vger.kernel.org References: <33183CC9F5247A488A2544077AF19020DA237684@DGGEMA505-MBS.china.huawei.com> Cc: Gonglei , "Jason Wang (jasowang@redhat.com)" , "Huangweidong (C)" , linqiangmin@huawei.com, Rik van Riel From: Paolo Bonzini Message-ID: <8a5470cd-0cb2-5019-c7d3-7c407e6a6005@redhat.com> Date: Thu, 20 Apr 2017 16:00:50 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <33183CC9F5247A488A2544077AF19020DA237684@DGGEMA505-MBS.china.huawei.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1054 Lines: 27 Adding Rik. Paolo On 20/04/2017 15:32, Gonglei (Arei) wrote: > Hi all, > > Currently, KVM do the CPU resource reservation by the cgroup mechanism > which can't do entire accurate separation because the capacity of the Linux > scheduler. Take the public cloud as an example, some customers rent one vm > with 8 CPUs paid by enough money, they want to get enough response > speed on CPU scheduling. So we (the cloud platform providers ) reserve 1GHz > CPU resources by cgroup for those VM's vcpu/pcpu. > > But the actual effects can't meet those requirements because the cgroup is > limiting share usage of other processes in order to attach the reservation proportion, > but the scheduler can't assure that. This mechanism is different with Xen, > We can directly change the CPU weight on Xen hypervisor so that we can > get entire accurate control on CPU resources based on accurate capacity (upper limit), > share (weight) and reservation. > > So my question is do we have a good method to do CPU reservation in KVM? > > Thanks, > -Gonglei > >