PMS memory management problems(BUG)

For help and support with PS3 Media Server in general
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply.

PMS memory management problems(BUG)

Postby ExSport » Tue May 26, 2009 11:45 pm

Hello Shagrath
I made some more testing about memory usage when 2 simultaneous transcodings made by PMS at one time:
400 MB buffer used. (two PS3 used so in real up to 2x400=800MB used for buffer)
startup parameters: javaw -Xmx1198M -Djava.net.preferIPv4Stack=true -Djava.encoding=UTF-8 -jar pms.jar net.pms.PMS
Memory usage of javaw.exe process:
Code: Select all
PMS started:   65'244 kB used
test1.avi started:   528'688 kB used
test1.avi STOPPED:   341'452 kB used
test1.avi started:   543'884 kB used
test1.avi STOPPED:   85'804 kB used
test1.avi started:   529'068 kB used
test1.avi STOPPED:   347'924 kB used
test1.avi started:   544'108 kB used
test2.avi started:   1'000'068 kB used
test1.avi STOPPED:   1'000'568 kB used
test2.avi STOPPED:   741'564 kB used

1. It seams that PMS badly releases memory after buffer is not used
- in one case it frees memory from 65'244kB to 341'452kB only
- but in other case it releases memory up to 85'804kB
2. If two buffers are used and one is released(one video stops), PMS allocates mem for buffer which is not used anymore. It is released after all buffers are not used, not earlier(when both video stops) but only one of them NOT BOTH :?
Could be this behavior somehow optimized?
Many thanks
ExSport
 
Posts: 2168
Joined: Mon Jan 19, 2009 5:40 pm

Re: PMS memory management problems(BUG)

Postby shagrath » Wed May 27, 2009 12:55 am

how many time did you wait to get these values after stopping the video ?
shagrath
Project Lead
 
Posts: 2668
Joined: Wed Jan 14, 2009 1:39 pm

Re: PMS memory management problems(BUG)

Postby ExSport » Wed May 27, 2009 6:17 am

almost minute, maybe not enough... 8-)
But when one buffer was used and other stopped I am sure that buffer wasn't released up to time when both were stopped because for 5minutes one video already stopped and other one played but both buffers allocated memory up to both were stopped...
ExSport
 
Posts: 2168
Joined: Mon Jan 19, 2009 5:40 pm

Re: PMS memory management problems(BUG)

Postby ExSport » Wed May 27, 2009 10:22 pm

So...
Code: Select all
Two videos played = two 400MB buffers used ...... 1GB of used memory by javaw.exe process
One video stopped = one 400MB buffer used ....... 1GB used (after 20mitutes after one video was stopped)
2nd video stopped = no buffer used .............. 740MB used (after another 20minutes no change)
One video played = one 400MB buffer used ........ 740MB used (perhaps new buffer used already allocated memory before which wasn't released after all videos stopped)
Video stopped = no buffer used .................. 83MB used (memory freed in few seconds after video stopped)

Conclusion:
I repeated it few times and it seems that first buffer clearing is not sucessfull but second one is.
It means when I started and stopped only one video many times in cycle this is the result:
Code: Select all
80MB-->535MB-->350MB-->540MB-->90MB-->535MB-->350MB-->555MB-->98MB etc...
  | -->start-->stop--->start-->stop-->start-->stop--->start-->stop

Definitely there is something weird when onetime PMS will clear buffer almost fully but next time not and it happens periodically....
ExSport
 
Posts: 2168
Joined: Mon Jan 19, 2009 5:40 pm


Return to General Help and Support

Who is online

Users browsing this forum: Bing [Bot] and 20 guests