From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <s.reiter@proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by lists.proxmox.com (Postfix) with ESMTPS id C319A77D5D
 for <pbs-devel@lists.proxmox.com>; Thu, 29 Apr 2021 10:06:56 +0200 (CEST)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
 by firstgate.proxmox.com (Proxmox) with ESMTP id B71C3185D0
 for <pbs-devel@lists.proxmox.com>; Thu, 29 Apr 2021 10:06:56 +0200 (CEST)
Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com
 [94.136.29.106])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256)
 (No client certificate requested)
 by firstgate.proxmox.com (Proxmox) with ESMTPS id 48BB5185C1
 for <pbs-devel@lists.proxmox.com>; Thu, 29 Apr 2021 10:06:56 +0200 (CEST)
Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1])
 by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 14A5D42636
 for <pbs-devel@lists.proxmox.com>; Thu, 29 Apr 2021 10:06:56 +0200 (CEST)
To: Dietmar Maurer <dietmar@proxmox.com>,
 Proxmox Backup Server development discussion <pbs-devel@lists.proxmox.com>
References: <1849352005.1381.1619627181675@webmail.proxmox.com>
From: Stefan Reiter <s.reiter@proxmox.com>
Message-ID: <a2cb6f41-0d90-a3bf-1b4e-d55dd1b3b5d7@proxmox.com>
Date: Thu, 29 Apr 2021 10:06:55 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
 Thunderbird/78.9.1
MIME-Version: 1.0
In-Reply-To: <1849352005.1381.1619627181675@webmail.proxmox.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-SPAM-LEVEL: Spam detection results:  0
 AWL 0.017 Adjusted score from AWL reputation of From: address
 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment
 NICE_REPLY_A           -0.001 Looks like a legit reply (A)
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches SPF record
Subject: Re: [pbs-devel] [PATCH proxmox-backup 2/3] RemoteChunkReader: add
 LRU cached variant
X-BeenThere: pbs-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox Backup Server development discussion
 <pbs-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pbs-devel>, 
 <mailto:pbs-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pbs-devel/>
List-Post: <mailto:pbs-devel@lists.proxmox.com>
List-Help: <mailto:pbs-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel>, 
 <mailto:pbs-devel-request@lists.proxmox.com?subject=subscribe>
X-List-Received-Date: Thu, 29 Apr 2021 08:06:56 -0000

On 28/04/2021 18:26, Dietmar Maurer wrote:
> 
>> +    /// Create a new instance.
>> +    ///
>> +    /// Chunks listed in ``cache_hint`` are cached and kept in RAM, as well as the last
>> +    /// 'cache_lru' accessed chunks (the latter via a mmap file).
> 
> Does that cache_hint really helps here?
> Have you tested without? If so, whats the difference?
> 

Again, performance testing is hard with this (I'll take a closer look at 
why as well), but in terms of hit rate the "hinted" cache is at about 
1-2% - we could probably reduce it's size.

Removing it entirely would probably not be good, as I think we use it to 
cache the zero-chunk as well IIRC?