From owner-freebsd-current@FreeBSD.ORG Fri Dec 18 08:49:49 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 065DA1065679 for ; Fri, 18 Dec 2009 08:49:49 +0000 (UTC) (envelope-from alexz@visp.ru) Received: from mail.visp.ru (srv1.visp.ru [91.215.204.2]) by mx1.freebsd.org (Postfix) with ESMTP id ADC178FC16 for ; Fri, 18 Dec 2009 08:49:48 +0000 (UTC) Received: from 91-215-205-255.static.visp.ru ([91.215.205.255] helo=zagrebin) by mail.visp.ru with esmtp (Exim 4.66 (FreeBSD)) (envelope-from ) id 1NLYWx-0000gf-DU for freebsd-current@freebsd.org; Fri, 18 Dec 2009 11:49:47 +0300 From: "Alexander Zagrebin" To: Date: Fri, 18 Dec 2009 11:49:47 +0300 Message-ID: <398F182D4FC14D43A1CFD89C4D69817C@vosz.local> MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: Acp/vwzdW4/7m1fFQAWi1WRgcxfirQ== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512 Subject: ZFS and UFS on the same box. Cache memory allocation issue. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Dec 2009 08:49:49 -0000 There is an interesting issue when UFS and ZFS filesystems coexists on the same box. ZFS and UFS independently allocates memory for its cache. Suppose we actively used UFS. UFS allocates almost all free memory for its cache. Its size can be indirectly evaluated with "inactive" memory size. Then we began to use ZFS. It seems that ZFS allocates memory for ARC _only_ from the "free" memory. But now there is almost no no "free" memory (UFS has eaten it). So ZFS operates very ineffectively due to very little ARC, which can be indirectly evaluated with "wired" memory size. To workaround this I've tried to run small program, that simply allocates, for example, 500MB of memory and frees it. As result UFS returns memory to "free" pool and ZFS can allocate it for ARC. It significantly increases ZFS performance. Is there an another workaround? -- Alexander Zagrebin