From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 3/4] add ksm kernel shared memory driver Date: Wed, 12 Nov 2008 00:49:09 +0200 Message-ID: <491A0BE5.1050407@redhat.com> References: <1226409701-14831-1-git-send-email-ieidus@redhat.com> <1226409701-14831-2-git-send-email-ieidus@redhat.com> <1226409701-14831-3-git-send-email-ieidus@redhat.com> <1226409701-14831-4-git-send-email-ieidus@redhat.com> <20081111150345.7fff8ff2@bike.lwn.net> <491A0483.3010504@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Jonathan Corbet , linux-kernel@vger.kernel.org, linux-mm@kvack.org, kvm@vger.kernel.org, aarcange@redhat.com, chrisw@redhat.com To: Izik Eidus Return-path: Received: from mx2.redhat.com ([66.187.237.31]:40773 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751243AbYKKWtD (ORCPT ); Tue, 11 Nov 2008 17:49:03 -0500 In-Reply-To: <491A0483.3010504@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Izik Eidus wrote: >> Any benchmarks on the runtime cost of having KSM running? >> > > This one is problematic, ksm can take anything from 0% to 100% cpu > its all depend on how fast you run it. > it have 3 parameters: > number of pages to scan before it go to sleep > maximum number of pages to merge while we scanning the above pages > (merging is expensive) > time to sleep (when runing from userspace using /dev/ksm, we actually > do it there (userspace) The scan process priority also has its effect. One strategy would be to run it at idle priority as long as you have enough free memory, and increase the priority as memory starts depleting. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.