xfs
[Top] [All Lists]

Slab memory usage

To: xfs@xxxxxxxxxxx
Subject: Slab memory usage
From: Poul Petersen <petersen@xxxxxxxxxxx>
Date: Fri, 24 Apr 2009 16:01:18 -0700
I'm running Debian Lenny with kernel 2.6.26-1-amd64 and xfsprogs-2.9.8-1. I've been having a problem with the amount of slab memory that XFS seems to be consuming when running a rsync backup job, a du, or other file-system intensive programs. Below is an example of the output of slabtop and /proc/meminfo. I'm running a tool that monitors free memory space, and it starts generating alerts, though I don't blame it when the SLAB is running at 50% of memory!

When the process finishes, the memory usually frees up over a period of several hours. However, on a similar system, even 24 hours after the rsync job finished, the slab never freed up. On that machine, if I run:

echo 2 > /proc/sys/vm/drop_caches

Then the slab goes down to something more like 1% or 2% of system RAM. Any ideas what is causing this behaviour? And how I might alleviate it?

Thanks,

-poul

slabtop
=======

 Active / Total Objects (% used)    : 7684622 / 7875871 (97.6%)
 Active / Total Slabs (% used)      : 720661 / 720662 (100.0%)
 Active / Total Caches (% used)     : 105 / 176 (59.7%)
 Active / Total Size (% used)       : 2683658.81K / 2702989.38K (99.3%)
 Minimum / Average / Maximum Object : 0.02K / 0.34K / 4096.00K

  OBJS ACTIVE  USE OBJ SIZE  SLABS OBJ/SLAB CACHE SIZE NAME
1933952 1933787  99%    0.44K 241744        8    966976K xfs_inode
1933918 1933787  99%    0.56K 276274        7   1105096K xfs_vnode
1361008 1359980  99%    0.20K  71632       19    286528K dentry
1311360 1309586  99%    0.12K  43712       30    174848K size-128
1030770 1030548  99%    0.25K  68718       15    274872K size-256

/proc/meminfo
=============
MemTotal:      8265368 kB
MemFree:         54160 kB
Buffers:          4252 kB
Cached:         416880 kB
SwapCached:     166676 kB
Active:        4999204 kB
Inactive:       278028 kB
SwapTotal:     1951856 kB
SwapFree:      1761736 kB
Dirty:             324 kB
Writeback:           0 kB
AnonPages:     4855084 kB
Mapped:          12632 kB
Slab:          2883536 kB
SReclaimable:  2411420 kB
SUnreclaim:     472116 kB
PageTables:     870112 kB
NFS_Unstable:        0 kB
Bounce:              0 kB
WritebackTmp:        0 kB
CommitLimit:   6084540 kB
Committed_AS:  5172208 kB
VmallocTotal: 34359738367 kB
VmallocUsed:     90988 kB
VmallocChunk: 34359647323 kB
HugePages_Total:     0
HugePages_Free:      0
HugePages_Rsvd:      0
HugePages_Surp:      0
Hugepagesize:     2048 kB

<Prev in Thread] Current Thread [Next in Thread>