From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bob Liu Subject: Re: tmem frontswap without swap file Date: Mon, 24 Feb 2014 11:32:44 +0800 Message-ID: <530ABD5C.10506@oracle.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Vasiliy Tolstov Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On 02/21/2014 12:35 PM, Vasiliy Tolstov wrote: > 2014-02-20 9:52 GMT+04:00 Vasiliy Tolstov : >> Hello. I have some problems with swap files in domU - i have ssd disks >> that caches all io and if user use swap, ssd may fail very often. >> Is that possible to use tmem frontswap without swap file at all? And >> transparently push swap pages to tmem? > > > Okay as i see it can;'t be possible. > Another question - is that possible to reserve tmem to domains at specific size? > For example i need to get 20Gb for one domain and 10Gb for another. > But if second domain very hungry it can't > eaten all memory > Two types of page can be stored in tmem: persistent_page and ephemeral_page. Persistent pages are swapped-out pages, whose date can't be dropped by tmem. The rule for persistent pages is: 'current_domain_pages + persistent_pages have to smaller than domain->max_pages'. Ephemeral pages are clean pagecache pages, those pages have a copy in disk already. The amount number of ephemeral pages are not limited, but XEN host will reclaim those pages if under memory pressure. There is a tmem parameter 'weight' which can be used to control how many ephemeral_pages should be reclaimed between domains. -- Regards, -Bob