From owner-freebsd-fs@FreeBSD.ORG Mon Oct 12 09:12:19 2009 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ECDA4106566B; Mon, 12 Oct 2009 09:12:19 +0000 (UTC) (envelope-from kmatthew.macy@gmail.com) Received: from mail-gx0-f214.google.com (mail-gx0-f214.google.com [209.85.217.214]) by mx1.freebsd.org (Postfix) with ESMTP id 596868FC15; Mon, 12 Oct 2009 09:12:19 +0000 (UTC) Received: by gxk6 with SMTP id 6so8242788gxk.13 for ; Mon, 12 Oct 2009 02:12:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:subject:mime-version :content-type:from:in-reply-to:date:cc:message-id:references:to :x-mailer; bh=qPAtTmvWEnXUYXeap5SZYKOzu4wzfajcEikLxQPF0Ok=; b=xua7Z9Iy9G9Zn1Fc9u8u7ivqF4hyRyyH6rIroVlBMp8QX4V2w08nbwJhf7OeFow7dv DLxMlKGR4yQcMesXchl9OSfan2wCj3IkGj9FSDV+gvAzkD/tnWi1GAphmU7PCEViDT2c HTBTxCTH4u8gYNQLhusvTsY/DcDHam4piwkOk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :message-id:references:to:x-mailer; b=S21lTLNghfIuzW+IrAULqtq6PDFOpc74jF0bEa5EyJ9Tb8d1Al05euLTiMQWHYbYJh Kl/0z2MrtlCgalODtKE2xhlMH4Lxn5iRiEKW857xdfmdpuPIKAP/cKjFfOQNnZSKGyFi GtwCwtDPCkEU4tkAu+YvW8Z5zoC+S7CyXWe2I= Received: by 10.101.146.11 with SMTP id y11mr5193477ann.33.1255338738759; Mon, 12 Oct 2009 02:12:18 -0700 (PDT) Received: from ?192.168.1.113? ([76.102.48.254]) by mx.google.com with ESMTPS id 23sm2205558yxe.12.2009.10.12.02.12.17 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 12 Oct 2009 02:12:18 -0700 (PDT) Sender: Matthew Macy Mime-Version: 1.0 (Apple Message framework v1076) From: "K. Macy" In-Reply-To: <4AD2E998.8090409@fsn.hu> Date: Mon, 12 Oct 2009 02:12:15 -0700 Message-Id: References: <4AC1E540.9070001@fsn.hu> <4AC5B2C7.2000200@fsn.hu> <20091002184526.GA1660@garage.freebsd.pl> <4ACDA5EA.2010600@fsn.hu> <4ACDDED0.2070707@fsn.hu> <20091008160718.GB2134@garage.freebsd.pl> <4AD2E118.2050202@fsn.hu> <47C0A3F4-6431-49E5-B780-FA162946C288@freebsd.org> <4AD2E998.8090409@fsn.hu> To: Attila Nagy X-Mailer: Apple Mail (2.1076) Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-fs@FreeBSD.org, Pawel Jakub Dawidek Subject: Re: ARC size constantly shrinks, then ZFS slows down extremely X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Oct 2009 09:12:20 -0000 >> >> Currently, the inactive page queue will grow until ARC is shrunk to >> arc_min. >> >> I think I'll probably spend some time making the ARC play better >> with the page cache this week. Unfortunately, under heavy memory >> pressure when competing with UFS the ARC will degrade to LRU, but I >> think that is still an improvement over the current static sizing >> with low and high water marks. > Will setting ARC's minimum size help here? (I will try) > > For me, it's OK, and I think it's generally not a problem, if > somebody uses UFS as well. > Is it possible to merge the memory management of the two, or they > are completely different beasts? To some degree it is possible to merge them by partly backing the arc from the page cache. This would allow for a fair amount of auto- tuning. However, it isn't possibly to completely merge them - the ARC is a virtual device block cache, UFS caches pages in the vm object based on their offset in the file. Thus it would never be possible to use blocks in the ARC for mmap - for applications that dirty file backed mmaped memory it will always be necessary to have two copies of the page, one in the vm object for the file and one in ZFS that maps to a block offset. It all makes a bit more sense if you understand that ZFS is a transactional object store with a posix file system interface.