SVN 18601: slow memory leaks, still?..
#1
Hi,

I'm experiencing some weird thing: XBMC seems to be slowly leaking memory. After not restarting it for a week and watching 4-5 movies, the virtual memory usage grows from the initial 155M to 1450M (ie, tenfold).

Some people seemed to have experienced the same issue: http://forum.xbmc.org/showthread.php?tid=46464

I wonder if there is any fix to it? Eg, someone suggested to limit the log file size... What settings control that?... Also, in the post above the person noted that he had SAMBA running on the same server... So do I, though it's not under control of XBMC but a separate installation.

Any suggestions?

SVN #: 18601
OS: Ubuntu 8.04.2
uname -a: Linux eagle 2.6.24-23-generic #1 SMP Mon Jan 26 00:13:11 UTC 2009 i686 GNU/Linux

Thanks,

Vlad
Reply
#2
Just a thought, do you have any RSS feeds configured?
Reply
#3
Nope, none.... After running for another 2 days the memory consumption now has grown from 155M to 700M:

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1083 xbmc 20 0 710m 96m 36m S 17 2.9 433:13.14 xbmc.bin

I'll wait for another 2-3 days till the main linuxport branch is stabilized a bit (after the merge of VDPAU) and try to upgrade to the latest SVN revision. Will see if it makes a difference (I'm still running a 'pre-merge' build I believe).

Also, the log file is small - 2Mb and seems to be rolled over to the '.old' when it gets to 5Mb.

Vlad
Reply
#4
It gets rolled to .old when you restart XBMC.
42.7% of all statistics are made up on the spot

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#5
Oh, didn't know... In any case, the log file size is quite small - 1-2M - much less than memory utilization. Why in particular the _virtual_ memory utilization is so high?...
Reply
#6
VIRT isn't just RAM. That is what RES is.

I wouldn't worry too much about the VIRT unless you are seeing some problems.

VIRT -- Virtual Image (kb)
The total amount of virtual memory used by the task. It includes all code, data and shared libraries plus pages that have been swapped out.
42.7% of all statistics are made up on the spot

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#7
Here is a great explanation:

3. The difference among VIRT, RES, and SHR in top output
VIRT stands for the virtual size of a process, which is the sum of memory it is actually using, memory it has mapped into itself (for instance the video card's RAM for the X server), files on disk that have been mapped into it (most notably shared libraries), and memory shared with other processes. VIRT represents how much memory the program is able to access at the present moment.

RES stands for the resident size, which is an accurate representation of how much actual physical memory a process is consuming. (This also corresponds directly to the %MEM column.) This will virtually always be less than the VIRT size, since most programs depend on the C library.

SHR indicates how much of the VIRT size is actually sharable (memory or libraries). In the case of libraries, it does not necessarily mean that the entire library is resident. For example, if a program only uses a few functions in a library, the whole library is mapped and will be counted in VIRT and SHR, but only the parts of the library file containing the functions being used will actually be loaded in and be counted under RES.
42.7% of all statistics are made up on the spot

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#8
Hmm... all right. Thanks for the detailed explanation... Still weird that VIRT memory grows uncontrollably. Is it a normal thing? Never noticed that in other processes...
Reply
#9
It's probably just FS buffers. They persist until the system needs the RAM for something better at which point they're instantly and without exception revoked.
Reply

Logout Mark Read Team Forum Stats Members Help
SVN 18601: slow memory leaks, still?..0