Skip to main content
valse82
Participant
March 25, 2011
Question

How can I improve my FMS performance?

  • March 25, 2011
  • 1 reply
  • 3258 views

Hi...

I have two FMS 3.5 streaming servers... Both have Windows Server 2003 x64 with 16 GB of RAM...

I'm streaming from a common storage and my Application.xml file is like this:

<Application>
  <StreamManager>
    <VirtualDirectory>
      <!-- Specifies application specific virtual directory mapping for recorded streams.   -->
      <Streams>/;L:\media</Streams>
    </VirtualDirectory>
  </StreamManager>


  <DisallowedProtocols>rtmp,rtmps,rtmpt</DisallowedProtocols>


  <!-- Settings specific to runtime script engine memory -->
  <JSEngine>
    <!-- This specifies the max size (Kb.) the runtime can grow to before -->
    <!-- garbage collection is performed.                                 -->
    <RuntimeSize>20480</RuntimeSize>
  </JSEngine>
  <Client>
    <Bandwidth>
      <!-- Specified in bytes/sec -->
      <ServerToClient>2500000</ServerToClient>
      <!-- Specified in bytes/sec -->
      <ClientToServer>2500000</ClientToServer>
    </Bandwidth>
    <MsgQueue>
      <Live>
        <!-- Drop live audio if audio q exceeds time specified. time in milliseconds -->
        <MaxAudioLatency>2000</MaxAudioLatency>
        <!-- Default buffer length in millisecond for live audio and video queue. -->
        <MinBufferTime>2000</MinBufferTime>
      </Live>
      <Recorded>
        <!-- Default buffer length in millisecond for live audio and video, value cannot be set below this by Flash player. -->
        <MinBufferTime>2000</MinBufferTime>
      </Recorded>
      <Server>
        <!-- Ratio of the buffer length used by server side stream -->
        <!-- to live buffer.  The value is between 0 and 1.  To    -->
        <!-- avoid break up of audio, the ratio should not be more -->
        <!-- than 0.5 of the live buffer.                          -->
        <BufferRatio>0.5</BufferRatio>
      </Server>
    </MsgQueue>


     <!--OVERRIDE APPLICATION LEVEL-->
     <!-- Specifies the RTMP chunk size to use in all streams for this     -->
     <!-- application.  Stream content breaks into chunks of this size     -->
     <!-- in bytes.  Larger values reduce CPU usage, but also commit to     -->
     <!-- larger writes that can delay other content on lower bandwidth     -->
     <!-- connections.  This can have a minimum value of 128 (bytes) and     -->
     <!-- a maximum value of 65536 (bytes) with a default of 4096 bytes     -->
     <!-- Note that older clients may not support chunk sizes largee than     -->
     <!-- 1024 bytes. If the chunk setting is larger than these clients can     -->
     <!-- support, the chunk setting will be capped at 1024 bytes.          -->
     <OutChunkSize>3072</OutChunkSize>
     
     <!--OVERRIDE APPLICATION LEVEL-->
     <!-- An application can be configured to deliver aggregate messages to       -->
     <!-- clients that support them by setting the "enabled" attribute to "true". -->
     <!-- The server will attempt to send aggregate messages to these supported   -->
     <!-- clients based whenever possible.                                        -->
     <!-- When this setting is disabled, aggregate messages will always be broken -->
     <!-- up into individual messages before being delivered to clients.          -->
     <!--  The default is "true".                                         -->
     <AggregateMessages enabled="false"></AggregateMessages>
     
     <!--OVERRIDE VHOST LEVEL-->
     <AutoCloseIdleClients enable="true">     
          <CheckInterval>60</CheckInterval>
          <MaxIdleTime>1200</MaxIdleTime>
     </AutoCloseIdleClients>


  </Client>
</Application>

The Server.xml and fms.ini have default settings.

My RAM usage is always low... 1,1 GB... and also my CPU usage is low. The FMSCore.exe process reaches 630 MB usage and then stays at this level.

How can I use my server's RAM or have you any tips or suggestions to improve FMS performance with some special settings?

I tried to change this in fms.ini:

SERVER.FLVCACHE_MAXSIZE=500

to 1000 but the application crashes after it reaches 2GB of RAM.

Thanks in advance
best,

Marco

    This topic has been closed for replies.

    1 reply

    Participating Frequently
    March 26, 2011

    The crash is because fms 3.5 version is still 32-bit exe i.e. Fms processes would be 32-bit & any 32-bit process has 2gb limit on address space on windows

    valse82
    valse82Author
    Participant
    March 30, 2011

    Hi...

    I bought FMS 4 streaming edition...

    Now with 64x support I increased the SERVER.FLVCACHE_MAXSIZE to 6144 MB (I have 8GB system RAM) and the FMSCore process is now over 2GB.

    But what I don't understand is the FLVCacheSize parameter that I leave on 10... If I set 6GB of maximum size of FLV cache what is the percentage that FLVCacheSize refers to?

    Thanks

    Marco

    PS: With SERVER.FLVCACHE_MAXSIZE=6144 my FMSCore process is about 7200 MB in memory (90%)... with SERVER.FLVCACHE_MAXSIZE=5120my FMSCore process is about 6200 MB in memory (77%)... so the base FMSCore uses about 1 GB of system memory.

    Participating Frequently
    March 31, 2011

    First of all i think simply setting it to higher value would increase performance. Setting it too high might in fact hamper system performance too. So you need to set optimal value and also value which you think really would help you use case.

    When you say set it to 6GB and core process shows 7GB memory - are you really filling up that FLVCACHE of 6GB by playing heavy content and filling up the memory or are this values shown at the start or just after few minutes of start. If they show few minutes of start then i am might suspect there is something wrong (i am just suspecting - i migth be wrong). but please provide this info - it migth be helpful for me to take this forward.

    Also FLVCacheSize is ResourceLimit Parameter - its in % of your RAM - I will get more information on this because logically think it should cap on your setting of SERVER.FLVCACHE_MAXSIZE.