From owner-freebsd-current@FreeBSD.ORG Sun Nov 21 21:43:26 2010 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 C42B5106566C for ; Sun, 21 Nov 2010 21:43:26 +0000 (UTC) (envelope-from eirnym@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 287698FC08 for ; Sun, 21 Nov 2010 21:43:25 +0000 (UTC) Received: by bwz2 with SMTP id 2so5744283bwz.13 for ; Sun, 21 Nov 2010 13:43:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=pi6XE1B/UWuIgZUePsmlqJ5tFhbv/cGIHToeVqE77go=; b=XCw+dW/IHz7pZyiNi6C2BSa7dW4Lv10nGQiE7QOhb0/mACaYuyHSL+EqPVt4SWCOR6 rdWy8uYyiaFzwlVwLq/7dUt+rSyZzhGhU2KMjfDF7UqICa4paKksJZPmg4uqD+gXhv/I M/+oBbfQzfj6e1G7DknDEvFMGImzCzlcOvDTQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=lN1IzlFg6Te+JM30jW+8Md85Y6cPQMsS9yOySlYJubcuJDcAZ+r0GnHu2g5LEgUVey FG0g9SDxDgGtznWQPjKjXDvnY3voBzmu6RqS3IqfQu2VdE7O196LcC49WNJcqednm7DH jUjqB2mQ/HhTQOF+rD6ceH6AEiG78GTLOH6UM= Received: by 10.204.127.94 with SMTP id f30mr4535710bks.1.1290375803616; Sun, 21 Nov 2010 13:43:23 -0800 (PST) MIME-Version: 1.0 Received: by 10.204.123.131 with HTTP; Sun, 21 Nov 2010 13:43:03 -0800 (PST) In-Reply-To: References: From: Eir Nym Date: Mon, 22 Nov 2010 00:43:03 +0300 Message-ID: To: Ivan Voras Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-current@freebsd.org Subject: Re: tmpfs out of space (ZFS related?) 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: Sun, 21 Nov 2010 21:43:26 -0000 On 22 November 2010 00:22, Ivan Voras wrote: > I got a curious error today while starting PostgreSQL, complaining about > "out of space" errno while creating lock file on /tmp. > > /tmp on this machine is mounted as tmpfs and indeed, here is the statisti= c: > > biggie:/# df -i > Filesystem =C2=A0 =C2=A01M-blocks =C2=A0Used =C2=A0Avail Capacity iused = =C2=A0 =C2=A0 ifree %iused Mounted > on > /dev/mfid0s1a =C2=A0 =C2=A0 =C2=A09912 =C2=A05193 =C2=A0 3926 =C2=A0 =C2= =A057% =C2=A0306079 =C2=A0 1012831 =C2=A0 23% =C2=A0 / > devfs =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0 =C2=A0 = =C2=A0 0 =C2=A0 =C2=A0 =C2=A00 =C2=A0 100% =C2=A0 =C2=A0 =C2=A0 0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 0 =C2=A0100% =C2=A0 /dev > fdescfs =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0 =C2=A0 =C2=A0 = 0 =C2=A0 =C2=A0 =C2=A00 =C2=A0 100% =C2=A0 =C2=A0 =C2=A0 4 =C2=A0 =C2=A0 11= 092 =C2=A0 =C2=A00% /dev/fd > tmpfs =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0 =C2=A0 = =C2=A0 0 =C2=A0 =C2=A0 =C2=A00 =C2=A0 100% =C2=A0 =C2=A0 =C2=A0 9 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 0 =C2=A0100% =C2=A0 /tmp > tank =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 376044 =C2=A0 =C2=A0 0 376= 044 =C2=A0 =C2=A0 0% =C2=A0 =C2=A0 =C2=A0 4 770138347 =C2=A0 =C2=A00% =C2= =A0 /tank > tank/ports =C2=A0 =C2=A0 =C2=A0 376658 =C2=A0 614 376044 =C2=A0 =C2=A0 0%= =C2=A0145919 770138347 =C2=A0 =C2=A00% > /usr/ports > tank/mysql =C2=A0 =C2=A0 =C2=A0 376073 =C2=A0 =C2=A029 376044 =C2=A0 =C2= =A0 0% =C2=A0 =C2=A0 102 770138347 =C2=A0 =C2=A00% > /var/db/mysql > tank/pgdata90 =C2=A0 =C2=A0400469 24425 376044 =C2=A0 =C2=A0 6% =C2=A0 = =C2=A01047 770138347 =C2=A0 =C2=A00% > /tank/pgdata90 > > On the other hand, "top" reports this: > > last pid: 79667; =C2=A0load averages: =C2=A00.08, =C2=A00.68, =C2=A00.77 = =C2=A0 =C2=A0up 1+09:12:13 > 00:11:33 > 44 processes: =C2=A01 running, 43 sleeping > CPU: =C2=A00.0% user, =C2=A00.0% nice, =C2=A00.0% system, =C2=A00.0% inte= rrupt, =C2=A0100% idle > Mem: 13M Active, 46M Inact, 15G Wired, 232K Cache, 1458M Buf, 8358M Free > Swap: 1024M Total, 1024M Free > > Note the "8358M free" report. > > The server has ZFS and was doing IO intensive database work on it; the 8 = GB > free memory comes from PostgreSQL being restarted and freeing the memory > (but failing to start again...). > > Starting PostgreSQL gets me this message: > Nov 22 00:18:24 biggie postgres[79696]: [1-1] FATAL: =C2=A0could not writ= e lock > file "/tmp/.s.PGSQL.5432.lock": No space left on device > > This is 8-STABLE amd64. > > Running "touch /tmp/abc" works, and creates a file. Running "echo abc > > /tmp/abc" doesn't return an error but *doesn't write anything to the file= *, > just creates a directory entry. > > The status doesn't change over time, i.e. "df" on tmpfs always shows "0 > free". > Which type of MFS do you use? I think you shold use "swap-backed" for your /tmp, not "malloc-based". Last type is only for in-kernel file system. > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org= " >