The only thing I have that gives any hint as to what is using memory is
/proc/meminfo and free .
total: used: free: shared: buffers: cached:
Mem: 660455424 653500416 6955008 0 5558272 56893440
Swap: 1091526656 48332800 1043193856
MemTotal: 644976 kB
MemFree: 6792 kB
MemShared: 0 kB
Buffers: 5428 kB
Cached: 40688 kB
SwapCached: 14872 kB
Active: 71176 kB
Inact_dirty: 26196 kB
Inact_clean: 14768 kB
Inact_target: 22428 kB
HighTotal: 0 kB
HighFree: 0 kB
LowTotal: 644976 kB
LowFree: 6792 kB
SwapTotal: 1065944 kB
SwapFree: 1018744 kB
Committed_AS: 229088 kB
total used free shared buffers cached
Mem: 644976 638200 6776 0 7168 42560
-/+ buffers/cache: 588472 56504
Swap: 1065944 56624 1009320
now, usually it's people complaining about all this cache being used in
ram and their system swapping despite this cache. But here it's
obviously a problem with buffers. I get a gradual increase in buffers
as time goes by and after 2 days it is at what it is at now, after X
crashed. I've restarted my normal array of programs I have running all
the time and ps and top both show very little memory being used by any
single program, nothing that could account for 560MB of buffers.
So where do these buffers come from and how can I find out? I'm
assuming it's a userlevel program causing all this buffer to be used but
then if that's the case, why does it not show up as being used by it in
ps ?
closing X doesn't seem to release all the buffer or even much, so I
assume it's something running as a daemon (mysql or apache or whatever)
but then again, they are using almost no memory at all according to ps
I see a growing dentry_cache, but why call it a cache when free shows it as being buffer?
This is related to my previous posts about this. Does anyone know what's going on here?
total used free shared buffers cached
Mem: 629 622 7 0 30 65
-/+ buffers/cache: 525 103
Swap: 1040 70 970
slabinfo - version: 1.1
kmem_cache 60 68 112 2 2 1
uhci_urb_priv 3 62 60 1 1 1
tcp_tw_bucket 0 60 128 0 2 1
tcp_bind_bucket 24 112 32 1 1 1
tcp_open_request 0 59 64 0 1 1
inet_peer_cache 0 0 64 0 0 1
ip_fib_hash 9 112 32 1 1 1
ip_dst_cache 73 120 192 4 6 1
arp_cache 2 30 128 1 1 1
blkdev_requests 6144 6150 128 205 205 1
devfsd_event 0 0 20 0 0 1
journal_head 884 3696 48 22 48 1
revoke_table 10 250 12 1 1 1
revoke_record 0 112 32 0 1 1
dnotify_cache 0 0 20 0 0 1
file_lock_cache 11 42 92 1 1 1
fasync_cache 2 202 16 1 1 1
uid_cache 4 112 32 1 1 1
skbuff_head_cache 160 200 192 10 10 1
sock 271 279 832 31 31 2
sigqueue 0 29 132 0 1 1
kiobuf 0 0 64 0 0 1
cdev_cache 32 295 64 4 5 1
bdev_cache 13 59 64 1 1 1
mnt_cache 21 59 64 1 1 1
inode_cache 35683 55398 512 7914 7914 1
dentry_cache 36016 70500 128 2350 2350 1
filp 2494 2520 128 84 84 1
names_cache 0 3 4096 0 3 1
buffer_head 24531 47190 128 1531 1573 1
mm_struct 83 100 192 5 5 1
vm_area_struct 4688 4770 128 157 159 1
fs_cache 82 118 64 2 2 1
files_cache 82 90 448 10 10 1
signal_act 96 102 1344 33 34 1
size-131072(DMA) 0 0 131072 0 0 32
size-131072 0 0 131072 0 0 32
size-65536(DMA) 0 0 65536 0 0 16
size-65536 1 1 65536 1 1 16
size-32768(DMA) 0 0 32768 0 0 8
size-32768 2 2 32768 2 2 8
size-16384(DMA) 0 0 16384 0 0 4
size-16384 6 8 16384 6 8 4
size-8192(DMA) 0 0 8192 0 0 2
size-8192 6 7 8192 6 7 2
size-4096(DMA) 0 0 4096 0 0 1
size-4096 52 61 4096 52 61 1
size-2048(DMA) 0 0 2048 0 0 1
size-2048 51 74 2048 26 37 1
size-1024(DMA) 0 0 1024 0 0 1
size-1024 89 96 1024 23 24 1
size-512(DMA) 0 0 512 0 0 1
size-512 59 64 512 8 8 1
size-256(DMA) 0 0 256 0 0 1
size-256 145 165 256 10 11 1
size-128(DMA) 4 30 128 1 1 1
size-128 2329 2460 128 79 82 1
size-64(DMA) 0 0 64 0 0 1
size-64 1662 3422 64 39 58 1
size-32(DMA) 4 59 64 1 1 1
size-32 6906 12862 64 160 218 1
total: used: free: shared: buffers: cached:
Mem: 660455424 652906496 7548928 0 31686656 97972224
Swap: 1091526656 74035200 1017491456
MemTotal: 644976 kB
MemFree: 7372 kB
MemShared: 0 kB
Buffers: 30944 kB
Cached: 68284 kB
SwapCached: 27392 kB
Active: 145192 kB
Inact_dirty: 84108 kB
Inact_clean: 22196 kB
Inact_target: 50296 kB
HighTotal: 0 kB
HighFree: 0 kB
LowTotal: 644976 kB
LowFree: 7372 kB
SwapTotal: 1065944 kB
SwapFree: 993644 kB
Committed_AS: 339068 kB