Possible memory leak?
#1
Having watched the spare memory on the PC drop from 1.2GB down to 50Meg while doing nothing but watching AVI files with XBMC.

I've started poking around on the system to confirm it's not anything else, but assuming it does come back to AVI playback on XBMC what additional information beyond that in the sticky would be useful so I can grab as much as possible on one go?
Reply
#2
Is this with or without FS buffers? 'cause linux will eat all your spare RAM without telling you. Your best bet is to actually watch XBMC's memory usage in top.
Reply
#3
FS Buffers? Can you tell me what I should be looking at for that?

I'll double check the top captures I've left running but nothing abnormal was showing against xbmc.bin. I'll double check with ps as well.

Are you thinking that the OS may be leaking the memory underneath XBMC? Wouldn't I see that watching the same file with MPlayer though?
Reply
#4
Edit: (Or not - how do you edit on this forum?) For reference, I'm running an SVN build from yesterday on Ubuntu Hardy 32 bit with 2GB of memory.
Reply
#5
No I'm saying whatever you're looking at may not be subtracting filesystem buffers, so what you're seeing is the OS caching files not memory leaking. It looks like the gnome system monitor displays actual memory usage, so you can watch that as apposed to top.
Reply
#6
OK, that makes sense.

Gnome reckons the system is only using about 0.5GB. Meanwhile checking with free shows a massive 1.3GB cached:
Code:
HTPC:~/temp$ free
             total       used       free     shared    buffers     cached
Mem:       2067132    1784240     282892          0      67424    1295172
-/+ buffers/cache:     421644    1645488
Swap:      6056464          0    6056464

Rechecking the regular top dumps also shows that although we hit a 50meg backoff of some kind on the free memory available, swap usage never even started. Should have noticed that before (sorry!). Time to go digging around to limit that file cache - anything that would benefit from caching on my machine really doesn't need that much memory!

TBH, I only even started looking at this as XBMC was core dumping on an AVI file - I'm putting that down to a bad pack though as it only affects 1 file.

Todays lesson is: Trust the XBMC devs Big Grin
Reply
#7
The kernel will forfeit the buffers if anything else needs memory. It's actually a good thing to keep the commonly accessed files cached, just a little deceiving the way it's presented with memory usage. IIRC there is a file in /proc or /sys that will increase "swapiness."
Reply
#8
althekiller Wrote:The kernel will forfeit the buffers if anything else needs memory. It's actually a good thing to keep the commonly accessed files cached, just a little deceiving the way it's presented with memory usage. IIRC there is a file in /proc or /sys that will increase "swapiness."


OT
What's amusing is that Vista does the same thing and everyone bitches that it's using too much memory <sigh>
/OT

Curious, what do folks think is the min and max memory we ought to be running for XBMC on a fairly slimmed Ubuntu?
Openelec Gotham, MCE remote(s), Intel i3 NUC, DVDs fed from unRAID cataloged by DVD Profiler. HD-DVD encoded with Handbrake to x.264. Yamaha receiver(s)
Reply

Logout Mark Read Team Forum Stats Members Help
Possible memory leak?0