tmpfs is zero bytes (no free space), maybe a zfs bug?

Gleb Kurtsou gleb.kurtsou at
Sat Feb 12 01:20:07 UTC 2011

On (10/02/2011 16:56), Bruce Cran wrote:
> On Wed, 19 Jan 2011 11:09:31 +0100
> Attila Nagy <bra at> wrote:
> > I hope somebody can find the time to look into this, it's pretty
> > annoying... 
> It's also listed as a bug on OpenSolaris:

Could you try my patch I've mentioned above in the thread:

I've reproduce test scenario in OpenSolaris bug report and it worked as
expected for me.

System: amd64, 4GB RAM, ~5GB swap


# mount -t tmpfs -o size=$((5*1024*1024*1024)) none /mnt
# dd if=/dev/zero of=test bs=1m count=$((3*1024))
# dd if=test of=/dev/zero bs=1m
# dd if=test of=/dev/zero bs=1m
# dd if=test of=/dev/zero bs=1m

top statistics:
Mem: 429M Active, 272M Inact, 2889M Wired, 96K Cache, 1328K Buf, 196M Free
Swap: 5120M Total, 5120M Free
ZFS seems to consume most of RAM

# cp test /mnt

top statistics:
Mem: 2808M Active, 247M Inact, 623M Wired, 104M Cache, 1328K Buf, 5052K Free
Swap: 5120M Total, 619M Used, 4501M Free, 12% Inuse
ZFS cache has shrinked, swap increased, most of tmpfs remains in memory

# df -h /mnt
Filesystem    Size    Used   Avail Capacity  Mounted on
tmpfs         5.0G    3.0G    2.0G    60%    /mnt


> -- 
> Bruce Cran
> _______________________________________________
> freebsd-fs at mailing list
> To unsubscribe, send any mail to "freebsd-fs-unsubscribe at"

More information about the freebsd-stable mailing list