From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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) server-digest SHA256) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id D7AF86B93E; Wed, 17 Mar 2021 17:03:57 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id C3F8D88B9; Wed, 17 Mar 2021 17:03:27 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (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 B7FAD88A9; Wed, 17 Mar 2021 17:03:26 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 870D642774; Wed, 17 Mar 2021 17:03:26 +0100 (CET) Date: Wed, 17 Mar 2021 17:03:02 +0100 (CET) From: Dietmar Maurer To: Proxmox Backup Server development discussion , Thomas Lamprecht , Stefan Reiter , Proxmox VE development discussion Message-ID: <1616415645.211.1615996982921@webmail.proxmox.com> In-Reply-To: <9177e016-7e42-cee7-f948-887af087311c@proxmox.com> References: <20210303095612.7475-1-s.reiter@proxmox.com> <20210303095612.7475-6-s.reiter@proxmox.com> <570fbf9f-988c-c3a7-1475-ff0406ca590e@proxmox.com> <9177e016-7e42-cee7-f948-887af087311c@proxmox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Priority: 3 Importance: Normal X-Mailer: Open-Xchange Mailer v7.10.4-Rev20 X-Originating-Client: open-xchange-appsuite X-SPAM-LEVEL: Spam detection results: 0 AWL 0.110 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: Re: [pve-devel] [pbs-devel] [PATCH v2 proxmox-backup-qemu 05/11] access: use bigger cache and LRU chunk reader X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Mar 2021 16:03:57 -0000 What about using a memory mapped files as cache. That way, you do not need to care about available memory? > >> Maybe we could get the available memory and use that as hint, I mean as memory > >> usage can be highly dynamic it will never be perfect, but better than just ignoring > >> it.. > > > > If anything, I'd make it user-configurable - I don't think a heuristic would be a good choice here. > > Yeah, heuristic is not an good option as we cannot know how the system memory > situation will be in the future.