From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dor Laor Subject: Better qemu/kvm defaults (was Re: [RFC PATCH 0/4] Gang scheduling in CFS) Date: Thu, 29 Dec 2011 18:07:24 +0200 Message-ID: <4EFC903C.3030509@redhat.com> References: <20111219083141.32311.9429.stgit@abhimanyu.in.ibm.com> <20111219112326.GA15090@elte.hu> <87sjke1a53.fsf@abhimanyu.in.ibm.com> <4EF1B85F.7060105@redhat.com> <877h1o9dp7.fsf@linux.vnet.ibm.com> <20111223103620.GD4749@elte.hu> <4EF701C7.9080907@redhat.com> <87vcp4t45p.fsf@linux.vnet.ibm.com> <4EF838BD.60406@redhat.com> Reply-To: dlaor@redhat.com Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Nikunj A Dadhania , Anthony Liguori , qemu-devel , kvm-devel To: Avi Kivity Return-path: Received: from mx1.redhat.com ([209.132.183.28]:25794 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752113Ab1L2QH3 (ORCPT ); Thu, 29 Dec 2011 11:07:29 -0500 In-Reply-To: <4EF838BD.60406@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 12/26/2011 11:05 AM, Avi Kivity wrote: > On 12/26/2011 05:14 AM, Nikunj A Dadhania wrote: >>> >>> btw you can get an additional speedup by enabling x2apic, for >>> default_send_IPI_mask_logical(). >>> >> In the host? >> > > In the host, for the guest: > > qemu -cpu ...,+x2apic > It seems to me that we should improve our default flags. So many times users fail to submit the proper huge command-line options that we require. Honestly, we can't blame them, there are so many flags and so many use cases its just too hard to get it right for humans. I propose a basic idea and folks are welcome to discuss it: 1. Improve qemu/kvm defaults Break the current backward compatibility (but add a --default- backward-compat-mode) and set better values for: - rtc slew time - cache=none - x2apic, maybe enhance qemu64 or move to -cpu host? - aio=native|threads (auto-sense?) - use virtio devices by default - more? Different defaults may be picked automatically when TCG|KVM used. 2. External hardening configuration file kept in qemu.git For non qemu/kvm specific definitions like the io scheduler we should maintain a script in our tree that sets/sense the optimal settings of the host kernel (maybe similar one for the guest). HTH, Dor