Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Nov 2010 00:43:03 +0300
From:      Eir Nym <eirnym@gmail.com>
To:        Ivan Voras <ivoras@freebsd.org>
Cc:        freebsd-current@freebsd.org
Subject:   Re: tmpfs out of space (ZFS related?)
Message-ID:  <AANLkTi=Aw3KQqeDy1Bxn7tJrsvOn-D=y-ChCOpVu4E8N@mail.gmail.com>
In-Reply-To: <icc2ih$e5t$1@dough.gmane.org>
References:  <icc2ih$e5t$1@dough.gmane.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 22 November 2010 00:22, Ivan Voras <ivoras@freebsd.org> 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=
"
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTi=Aw3KQqeDy1Bxn7tJrsvOn-D=y-ChCOpVu4E8N>