Page 1 of 2
VLC CPU and memory consumption after long time playing
Posted: 15 Aug 2007 16:17
by kotao_78
HI ALL,
I encounter a VLC problem on CPU and memory consumption,
I used VLC play a mp3 repeatedly for about 12 hours , at first the CPU consumption is about 7% , memory consumption is about 13% , after 12 hours playing , the VLC CPU consumption and memory consumption increase to 12%~ 15% and 17% ~20%.
Is it normal ? I mean the CPU and memory consumption did not return to first time playing .
If not , can anybody point out what's the problem is or how to investigate the problem?
Best Regards,
Ke Tao
Re: VLC playing CPU and memory consumption
Posted: 16 Aug 2007 10:12
by kotao_78
The testing version of VLC is 0.85
Re: VLC playing CPU and memory consumption
Posted: 16 Aug 2007 11:13
by funman
please try with uptodate vlc, 0.8.6c
alternatively, try with a development nightly build trunk version (
http://nightlies.videolan.org )
Re: VLC playing CPU and memory consumption
Posted: 17 Aug 2007 04:48
by kotao_78
0.86's CPU consumption is lower than 0.85, but also increase slowly after long time playing.
From 4.6% to 10% after 15 hours playing.
Re: VLC CPU and memory consumption after long time playing
Posted: 20 Aug 2007 05:32
by kotao_78
Can anybody point out or suggest how to investigate this issue?
Maybe this reason is one of the following,
1.VLC internal error , some running thread do hard working after long time playing?
2.Third party library error , it cost too much CPU resource at that time?
3.System error , it running slow after long time running??
....
Re: VLC CPU and memory consumption after long time playing
Posted: 20 Aug 2007 08:53
by kotao_78
The starting command line is,
./vlc --plugin-path=/root/vlc/lib/modules --aout alsa --alsadev "hw:0,0" -I rc --file-caching 600 --cdda-caching 600 --http-caching 1200 --file-logging -vvvv --logfile /var/vlc.log --logmode text /root/html/dreams.mp3 -L
Re: VLC CPU and memory consumption after long time playing
Posted: 23 Aug 2007 09:53
by kotao_78
This is the sar log of VLC long time playing,
please refer to the link:
http://www.esnips.com/doc/f6e24adc-4960 ... log-of-vlc
Re: VLC CPU and memory consumption after long time playing
Posted: 05 Sep 2007 12:29
by kotao_78
Is it caused by too many malloc memory? I saw there a lots of malloc in fifo block and data block when playing. CPU is busy manage the memory after a long time playing.
Re: VLC CPU and memory consumption after long time playing
Posted: 08 Sep 2007 03:49
by kotao_78
I finally find the reason. It's stat module cause this issue.
Re: VLC CPU and memory consumption after long time playing
Posted: 10 Sep 2007 10:18
by Gujs
I have the same problem when streaming dvb-s channels. I found out that vlc memory and cpu usage are rising when my channel for dvb-s card become scrambled. And when it is free again memory usage stays at the number when channel became free again. It doesn't fall back to normal. When this repeats a number of times, vlc uses all memory and swap!
I am using vlc-trunk, and I didn't find any stat module in it!
Re: VLC CPU and memory consumption after long time playing
Posted: 10 Sep 2007 12:46
by funman
use --no-stats
kotao_78 could you open a ticket on that issue on trac.videolan.org/vlc so we don't forget about it ?
Re: VLC CPU and memory consumption after long time playing
Posted: 10 Sep 2007 14:33
by kusamochi
Hey kotao_78,
I have the same problem with the CPU consumption after playing MPEG2 on local and streaming for about 9 hours. The problem seems to occur faster and more noticeable when more frequent of switching files in a play list. I will try funman's --no-stats flag and see what happen, thx guys for finding this out.
mochi
Re: VLC CPU and memory consumption after long time playing
Posted: 11 Sep 2007 08:29
by Gujs
Argument --no-stats doesn't help in my case. When one of streaming channels become scrambled, vlc starts to consume more and more memory, until system gets really slow. I tested both versions and I came to conclusion that 0.8.6c is a lot better than 0.9.0, but still not without memory rising feature
.
Can it have something with libdvbpsi, because I compiled vlc with static linking to latest trunk of libdvbpsi.
Thanks!
Re: VLC CPU and memory consumption after long time playing
Posted: 11 Sep 2007 11:56
by kusamochi
Dear kotao_78,
Today I had 4 machines running vlc 0.8.6c from 8am for about 10 hours now, 1 as streaming, 2 watching stream and 1 local playback. with --no-stats the cpu problem is gone and stays normal
, without --no-stats I hardly run over 9 hours so I assume it is solved, thank you so much for the info.
And Gujs sorry --no-stats didn't help in your case
let you know if I can find anything to help
mochi
Re: VLC CPU and memory consumption after long time playing
Posted: 11 Sep 2007 12:57
by Gujs
Hi,
I was using vlc through JVLC. Now I tried vlc in command line and the problem is gone. Now I don't know if problem is in vlc library or in jvlc library.
If I would only know how to use vlc library in C to start dvb streaming and test this option to!
Re: VLC CPU and memory consumption after long time playing
Posted: 11 Sep 2007 15:02
by kotao_78
Dear All,
Let me detail why VLC(0.85 & 0.86) CPU consumption will increase after long time playing.
Please check stats.c(vlc/src/stats.c) GetCounter function,
I found "p_handler->i_counters" will be plus 10 after 1 song played , that implies the loop will take more time more and more , but unfortunately , GetCounter function is called by __stats_Update and __stats_Get , after long time playing , it will cost a lots of CPU at that loop.
Later I'd checked stats module is enable by libvlc.c:688(v0.86).
Anyway , I will raise a trac for it and wish it can be fixed next release.Thanks you all.
Ke Tao
Re: VLC CPU and memory consumption after long time playing
Posted: 11 Sep 2007 17:49
by funman
i don't get it, you mean p_handler->i_counters will increase indefinitely when playing for hours ?
and that doesn't explain memory consumption
thanks for the report anyway
Re: VLC CPU and memory consumption after long time playing
Posted: 12 Sep 2007 04:02
by kotao_78
Yes , p_handler->i_counters will increase continuously when playing for long time , at first its value is n , after one song played , its value changed to n+10 and .......
And the "i_index" variable will be more large in the "GetCounter" function , that implies the loop will take more time to get the index.
I think will should put the index at top of the array , not at tail.
Anyway , I suggest we should disable "stats" module as default , actually I didn't know how to use it
.
i don't get it, you mean p_handler->i_counters will increase indefinitely when playing for hours ?
and that doesn't explain memory consumption
thanks for the report anyway
Re: VLC CPU and memory consumption after long time playing
Posted: 28 Sep 2007 02:22
by th0r
All I can say (without logging at this point as I am using the ActiveX control in a HTML page) is, I am using Icecast to stream various music videos in ogg format, after each video has played and the next one has loaded, memory consumption grows by about 3/4 MB once a new video is played. The Icecast server has about 25 videos that repeat themselves. So after a few hours of playback, that's it?!?!?!
This surely isn't right. In the end my client machine actually runs out of memory and grinds to a halt.
But on the up side.... VLC is one of the best players that I have come across
VLC 0.8.6c (WIndows)
Re: VLC CPU and memory consumption after long time playing
Posted: 20 Sep 2009 04:27
by kotao_78
All I can say (without logging at this point as I am using the ActiveX control in a HTML page) is, I am using Icecast to stream various music videos in ogg format, after each video has played and the next one has loaded, memory consumption grows by about 3/4 MB once a new video is played. The Icecast server has about 25 videos that repeat themselves. So after a few hours of playback, that's it?!?!?!
This surely isn't right. In the end my client machine actually runs out of memory and grinds to a halt.
But on the up side.... VLC is one of the best players that I have come across
VLC 0.8.6c (WIndows)
see my response before.
Re: VLC CPU and memory consumption after long time playing
Posted: 26 Jan 2010 17:23
by ccastro
I have a couple Ubuntu servers streaming video from a dvb adapter 24/7, and one of them freeze a few days ago, trying to discover why i found that vlc use all the ram and swap until colapse (
http://pastebin.com/pastebin.php?dl=m59288c2c)
Now looking the graps of the other servers i take notice that it happend there too in diferent time, but luckely it release some memory after a day!! :S (
http://img638.imageshack.us/img638/3199 ... sunris.png)
any help would be apriciated.
11:19:35 up 56 days, 21:05, 1 user, load average: 0.12, 0.17, 0.17
Linux ATSC-DECO-4 2.6.27-7-server #1 SMP Fri Oct 24 07:20:47 UTC 2008 x86_64 GNU/Linux
VLC media player 0.8.6e Janus
0b:01.2 Multimedia controller: Conexant Systems, Inc. CX23880/1/2/3 PCI Video and Audio Decoder [MPEG Port] (rev 05)
Re: VLC CPU and memory consumption after long time playing
Posted: 26 Jan 2010 17:47
by RĂ©mi Denis-Courmont
VLC 0.8.6 has not been maintained for a long time. All calls for willing maintainers have gone unresponded, so don't expect any help.
Re: VLC CPU and memory consumption after long time playing
Posted: 13 Aug 2010 19:02
by ccastro
Im using vlc 1.0.5 now and the problem persist, after a week suddendly vlc uses all the swap and the system crash. Im using it to transmit HD video streams to igmp routers.
Linux BBD-5 2.6.27-7-server #1 SMP Fri Oct 24 07:20:47 UTC 2008 x86_64 GNU/Linux
VLC media player 1.0.5 Goldeneye
8 x pcHDTV HD-5500 Multimedia controller: Conexant Systems, Inc. CX23880/1/2/3 PCI Video and Audio Decoder [MPEG Port] (rev 05)
Mem: 4046184k total
Intel(R) Core(TM)2 Duo CPU E6400 @ 2.13GHz
Re: VLC CPU and memory consumption after long time playing
Posted: 14 Aug 2010 14:31
by kotao_78
You just disable stats module will be OK.
Re: VLC CPU and memory consumption after long time playing
Posted: 16 Aug 2010 17:29
by ccastro
im looking at "configure" script and i dont see any stats module, can u give any hint?
Thanks