Re: Memory usage on debian
Hans Wilmer wrote:
> On Sat, Jan 25, 2003 at 12:27:08AM -0500, Jason McCarty wrote:
>
> > Hope this interests somebody besides myself ;)
>
> Well, it does :) What is the difference between 'cached' and
> 'buffers'? I wanted to know that since long, but never found out.
Well, after digging through the kernel sources (such fun!), I think I
figured that out. "cached" is files that have been read from disk, but
aren't currently opened by any processes. "buffers" is the same, except
it counts opened files instead.
It seems like there's still a couple of free-able megabytes unaccounted
for, even after counting what's in /proc/slabinfo. Probably more cached
kernel info.
> What wonders me it the memory usage of Xfree86. It seems that with
> versions before 4.x, the memory usage was related to the programs that
> were running. But since 4.x, the X server claims large amounts of
> memory, seemingly the more the longer it runs:
>
>
> 20:22:57 up 67 days, 1:19, 11 users, load average: 0.00, 0.00, 0.00
> 81 processes: 80 sleeping, 1 running, 0 zombie, 0 stopped
> CPU states: 0.0% user, 0.2% system, 0.0% nice, 99.8% idle
> Mem: 514300K total, 507304K used, 6996K free, 30196K buffers
> Swap: 423784K total, 339748K used, 84036K free, 93220K cached
>
> PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND
> 27053 lee 9 0 34484 33M 1348 S 0.0 6.7 0:10 mutt
> 492 root 7 -10 560M 15M 836 S < 0.0 3.1 219:38 XFree86
Hmm, I would guess that the actual memory X is using is SIZE-512, so the
actual usage would be 48M. I have a 64MB video card, and X maps it as 4
times the actual size, so that my SIZE is 270M, but X really only uses
14M. That doesn't mean X doesn't leak, of course ;-) The problem might
just be that resource leaks in X programs cause memory leaks in the X
server.
Jason
Reply to: