heap size when running as a service

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.

heap size when running as a service

Postby mario595 » Tue Jan 31, 2012 6:13 am


I7-920 @ 3.9 ghz
6 GB RAM @ 1600 ghz
2xSSD raid-0 windows drive
4xHD raid-0 movie file drive
Windows7 64bit
Gigabit network / Cat-6 cable
PS3MS 1.40.0
Java SDK 6.30

Recently I had trouble transcoding an MKV movie with subtitles using Mencoder. I kept running into buffer problems. I had to tweak things manually to get it to play without any problems. At the end of the day I had to do three things:

1) disable multiple cpu cores for Mencoder
2) reduce transcoder buffer max size to 450
3) increase the -Xmx768M parameter of PMS.bat to -Xmx1920M

I can't get that last step when the mediaserver is up as a service. There are two ways that I have found to do this. In wrapper.conf you are supposed to update the setting wrapper.java.maxmemory=. However if I choose value larger than 1768; then the media server can't start as a service. It gets the following error when trying to start:

" Windows could not start the PS3 Media Server on Local Computer. For more information, review the System Event Log. If this is a non-Microsoft service, contact the service vendor, and refer to service-specific error code 1. "

You can also add the parameter wrapper.java.additional.<x>=-Xmx1920M. However if I do that, the problems I was experiencing return. I think wrapper.java.maxmemory= defeats this parameter. It can also be set to 0 which will then use the Java default of 64MB. Setting it to 0 results in the same error message.

Anybody have an idea how to get a size of 1920M when starting as a service?
Posts: 62
Joined: Mon Nov 09, 2009 7:12 pm

Re: heap size when running as a service

Postby mario595 » Wed Feb 15, 2012 3:10 am

Ok, Please disregard this entire thread. I found problems in my testing. I also read up a bit more on heap sizes and Java. I can now transcode with a buffer of 600 and multiple cpu core Mencoder enabled.

No, there is no difference between passing the -Xmx parameter to Java in PMS.BAT vs increasing the heap via wrapper.java.maxmemory= when running under wrapper (as a service). My bad...

FYI, the reason I encountered problems when using large values is that there are limitations when running 32bit Java. To run java values greater than 1300 or so (either method) you have to switch to 64bit Java. The limit is dependant on your machine specs and which optional features of the media server you use. To run 64bit Java there is a simple update to do that using PMS.bat. To use 64bit Java when running as a service I think you have to simply modify the classpath in wrapper.conf but don't quote me on that. I didn't have to test 64bit Java. I don't run any plugins or media library. With my PC, I can set maxmemory to 1536 and use 32bit java just fine.

I am transcoding a 40GB mkv of Avatar right now that I made from my own Blu-Ray disc with subtitles and AC3 audio. Transcoding from AVC to MPEG2 at 10-30Mbps no problem. FF, REW, GOTO work fine. Life is good.
Posts: 62
Joined: Mon Nov 09, 2009 7:12 pm

Return to General Help and Support

Who is online

Users browsing this forum: No registered users and 23 guests