Received: from eggs.gnu.org ([2001:4830:134:3::10]:35722) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fnNlK-0005Ga-Ma for qemu-devel@nongnu.org; Wed, 08 Aug 2018 08:40:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fnNlH-0007YJ-EW for qemu-devel@nongnu.org; Wed, 08 Aug 2018 08:40:26 -0400 From: Alberto Garcia In-Reply-To: References: <20180808071051.30628-1-lbloch@janustech.com> <20180808071051.30628-5-lbloch@janustech.com> <28c19ef6-4e22-7509-f4b9-f683385933f7@janustech.com> Date: Wed, 08 Aug 2018 14:40:21 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v3 4/5] qcow2: Set the default cache-clean-interval to 30 seconds List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Leonid Bloch , qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Kevin Wolf , Max Reitz , Eric Blake On Wed 08 Aug 2018 02:17:47 PM CEST, Leonid Bloch wrote: > On 08/08/2018 02:57 PM, Alberto Garcia wrote: >> On Wed 08 Aug 2018 01:49:08 PM CEST, Leonid Bloch wrote: >>> On 08/08/2018 02:47 PM, Alberto Garcia wrote: >>>> On Wed 08 Aug 2018 09:10:50 AM CEST, Leonid Bloch wrote: >>>>> The default cache-clean-interval is set to 30 seconds, in order to lower >>>>> the overhead of the qcow2 caches (before the default was 0, i.e. >>>>> disabled). >>>>> >>>>> Signed-off-by: Leonid Bloch >>>> >>>> Reviewed-by: Alberto Garcia >>>> >>>>> +#define DEFAULT_CACHE_CLEAN_INTERVAL 30 /* seconds */ >>>> >>>> I wonder if it shouldn't be a bit higher, though. Isn't 30 seconds too >>>> low for a default? >>> >>> I also had this thought. What would you suggest? >> >> I don't know, 5 minutes at least. It should discard cache entries that >> haven't been used in a while. >> >> It my opinion the default should be for saving memory in VMs that are >> mostly idle. If the VM is more or less active I wouldn't want to clean >> cache entries that are used frequently. > > How about 10 minutes? Sounds good to me. Berto