From owner-freebsd-fs@FreeBSD.ORG Wed Oct 5 09:55:27 2011 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 22789106566C; Wed, 5 Oct 2011 09:55:27 +0000 (UTC) (envelope-from gleb.kurtsou@gmail.com) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id 702848FC1A; Wed, 5 Oct 2011 09:55:26 +0000 (UTC) Received: by eyg7 with SMTP id 7so1945590eyg.13 for ; Wed, 05 Oct 2011 02:55:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=9NDCaG4dktuQcGJB/LyMjdF+QQqO+uVK/+zsJABJ6Wg=; b=FaWYA915jhgvIrN477G7zTkbWdYnzZTeppo2BDV2L7WvxnJh1lBBifGdnF+DOavnQk 1dgRkHs//I0itQARoMu5zeYXZmVbdnh6rDrlwOt6gMpjd5688q+QxPfwBMDpL4YTfXZ4 X+fd9Ia6pdi5wasrTrtYXJMKV5e3kYizaZu4M= Received: by 10.213.8.144 with SMTP id h16mr1791673ebh.57.1317806883685; Wed, 05 Oct 2011 02:28:03 -0700 (PDT) Received: from localhost (150-109-35-84.ipact.nl. [84.35.109.150]) by mx.google.com with ESMTPS id y1sm34826813eea.1.2011.10.05.02.28.01 (version=SSLv3 cipher=OTHER); Wed, 05 Oct 2011 02:28:02 -0700 (PDT) Date: Wed, 5 Oct 2011 12:26:04 +0300 From: Gleb Kurtsou To: Olivier Smedts Message-ID: <20111005092603.GA1874@tops> References: <20111002020231.GA70864@icarus.home.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: "freebsd-fs@freebsd.org" , Ivan Voras Subject: Re: is TMPFS still highly experimental? 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: Wed, 05 Oct 2011 09:55:27 -0000 On (04/10/2011 16:19), Olivier Smedts wrote: > 2011/10/4 Xin LI : > > On Mon, Oct 3, 2011 at 2:36 PM, Olivier Smedts wrote: > > [...] > >> Try reducing the swap size to less than the RAM size. No "configuration > >> issue", try with some RAM + swap that should fit all. > > > > But it's not ZFS+tmpfs specific, it can happen anywhere when memory > > and swap is not sufficient.  Of course tmpfs and ZFS should play more > > well together but it's pretty much a "you get what you paid for" > > situation IMHO. > > But there's a problem in this configuration and when memory and swap > are sufficient (swap free, some RAM free). tmpfs size drops to 0 > because it does not seem to calculate the free size correctly. If > there is sufficient RAM (some RAM free), sufficient swap (all free) > but less swap than RAM, and wired memory usage is high (ZFS ARC), > tmpfs size drops to 0. Free RAM is a bit tricky with virtual memory and overcommit support all over the place. There are at least 3 memory hungry subsystems: buffer cache, ZFS ARC, tmpfs. For the first two there is defined maximum size and they can be shrunk in low memory situations. Tmpfs grows as much as it can trying to calculate "free" memory available. Another difference is that tmpfs can't be shrunk in low memory situation. I proposed a patch changing tmpfs memory allocation: - Define maximum file system size (RAM/2 by default) - Don't try to check if free memory available, check free swap instead and allocate more aggressively, i.e. allocate until swap or file system limit is reached. Patch: http://marc.info/?l=freebsd-fs&m=129747367322954&w=2 https://github.com/glk/freebsd-head/tree/tmpfs Thanks, Gleb. > > One thing I can not yet reproduce, but sounds like a serious issue is > > that when system have sufficient RAM available, ZFS reports 0 in free > > space...  If there is a test case for that then that's definitely > > something we need to solve sooner. > > > > Cheers, > > -- > > Xin LI https://www.delphij.net/ > > FreeBSD - The Power to Serve! Live free or die > > > > -- > Olivier Smedts                                                 _ >                                         ASCII ribbon campaign ( ) > e-mail: olivier@gid0.org        - against HTML email & vCards  X > www: http://www.gid0.org    - against proprietary attachments / \ > >   "Il y a seulement 10 sortes de gens dans le monde : >   ceux qui comprennent le binaire, >   et ceux qui ne le comprennent pas." > _______________________________________________ > freebsd-fs@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-fs > To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org"