Menu

#14 Why does aufs eat my memory?

open
nobody
None
5
2011-03-24
2011-03-24
Anonymous
No

Hi2all.
Iam tested on diff system and diff kernels.

cat /proc/mounts
rootfs / rootfs rw 0 0
udev /dev tmpfs rw,relatime,mode=755 0 0
/dev/sda2 / xfs rw,relatime,attr2,noquota 0 0
/proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
debugfs /sys/kernel/debug debugfs rw,relatime 0 0
devpts /dev/pts devpts rw,relatime,gid=5,mode=620 0 0
/dev/sda1 /boot ext3 rw,relatime,errors=continue,user_xattr,acl,data=writeback 0 0
/dev/sdb /mnt/g1/0 xfs rw,relatime,attr2,noquota 0 0
/dev/sdc /mnt/g2/0 xfs rw,relatime,attr2,noquota 0 0
/dev/md2 /mnt/backup_mirror_0001 xfs rw,noatime,nodiratime,attr2,inode64,logbufs=8,logbsize=256k,noquota 0 0
/dev/md0 /mnt/backup_mirror_0002 xfs rw,noatime,nodiratime,attr2,inode64,logbufs=8,logbsize=256k,noquota 0 0
/dev/md1 /mnt/backup_mirror_0003 xfs rw,noatime,nodiratime,attr2,inode64,logbufs=8,logbsize=256k,noquota 0 0
/dev/md3 /mnt/backup_mirror_0004 xfs rw,noatime,nodiratime,attr2,inode64,logbufs=8,logbsize=256k,noquota 0 0
/dev/md4 /mnt/backup_mirror_0005 xfs rw,noatime,nodiratime,attr2,inode64,logbufs=8,logbsize=256k,noquota 0 0
/dev/sda7 /db xfs rw,relatime,attr2,noquota 0 0
fusectl /sys/fs/fuse/connections fusectl rw,relatime 0 0
/dev/sdi /xino ext3 rw,relatime,errors=continue,data=writeback 0 0
none /mnt/backup_mirror_global aufs rw,relatime,si=586e167e8b86b525,create=mfs,sum 0 0

ls -lha /sys/module/aufs/*
total 0
drwxr-xr-x 2 root root 0 2011-03-24 12:40 .
drwxr-xr-x 3 root root 0 2011-03-24 12:40 ..
-r--r--r-- 1 root root 4.0K 2011-03-24 12:40 brs

ls -lha /sys/fs/aufs/*
/sys/fs/aufs/si_586e167e8b86b325:
total 0
drwxr-xr-x 2 root root 0 2011-03-24 12:41 .
drwxr-xr-x 5 root root 0 2011-03-24 12:41 ..
-r--r--r-- 1 root root 4.0K 2011-03-24 12:41 xi_path

/sys/fs/aufs/si_586e167e8b86b525:
total 0
drwxr-xr-x 2 root root 0 2011-03-24 12:41 .
drwxr-xr-x 5 root root 0 2011-03-24 12:41 ..
-r--r--r-- 1 root root 4.0K 2011-03-24 12:41 br0
-r--r--r-- 1 root root 4.0K 2011-03-24 12:41 br1
-r--r--r-- 1 root root 4.0K 2011-03-24 12:41 br2
-r--r--r-- 1 root root 4.0K 2011-03-24 12:41 br3
-r--r--r-- 1 root root 4.0K 2011-03-24 12:41 br4
-r--r--r-- 1 root root 4.0K 2011-03-24 12:41 xi_path

/sys/fs/aufs/si_586e167e8d7f5525:
total 0
drwxr-xr-x 2 root root 0 2011-03-24 12:41 .
drwxr-xr-x 5 root root 0 2011-03-24 12:41 ..
-r--r--r-- 1 root root 4.0K 2011-03-24 12:41 xi_path

uname -a
Linux butt1 2.6.32.32-0.1-default #1 SMP Mon Mar 14 12:33:30 MSK 2011 x86_64 x86_64 x86_64 GNU/Linux

CONFIG_AUFS_FS=y
# CONFIG_AUFS_BRANCH_MAX_127 is not set
# CONFIG_AUFS_BRANCH_MAX_511 is not set
CONFIG_AUFS_BRANCH_MAX_1023=y
# CONFIG_AUFS_BRANCH_MAX_32767 is not set
CONFIG_AUFS_SBILIST=y
# CONFIG_AUFS_HNOTIFY is not set
# CONFIG_AUFS_RDU is not set
# CONFIG_AUFS_SP_IATTR is not set
# CONFIG_AUFS_SHWH is not set
# CONFIG_AUFS_BR_RAMFS is not set
# CONFIG_AUFS_BR_FUSE is not set
CONFIG_AUFS_BR_HFSPLUS=y
CONFIG_AUFS_BDEV_LOOP=y
# CONFIG_AUFS_DEBUG is not set

When I write on the "global" mount my memory is gone.
# free -m
total used free shared buffers cached
Mem: 3895 309 3585 0 0 141
-/+ buffers/cache: 167 3727
Swap: 0 0 0

# dd if=/dev/zero of=test2
^C9697128+0 records in
9697128+0 records out
4964929536 bytes (5.0 GB) copied, 54.2538 s, 91.5 MB/s

# free -m
total used free shared buffers cached
Mem: 3895 3861 33 0 0 3693
-/+ buffers/cache: 167 3727
Swap: 0 0 0
# cat /proc/meminfo | grep Cache
Cached: 3646976 kB
SwapCached: 0 kB
# rm -rf test2
# free -m
total used free shared buffers cached
Mem: 3895 238 3656 0 0 71
-/+ buffers/cache: 166 3728
Swap: 0 0 0
# cat /proc/meminfo | grep Cache
Cached: 49656 kB
SwapCached: 0 kB

Discussion


Log in to post a comment.

MongoDB Logo MongoDB