2 Replies Latest reply on Aug 27, 2008 2:38 PM by (corneliu_creanga)

    LCDS and real-time performance

      Hi,

      Recently we have started an experiment on our benchmark-LAN where we have several Windows XP PCs running test programs. One of the PCs is the data-injector (Flex) which pushes changes every second, one is the LCDS2.6 server running on Tomcat and one PC is running the client application (Flex) in which the changes are visible every second.
      This experiment should determine if Flex using LCDS is a viable option for our real-time systems.
      There is very little network-traffic and CPU-usage on all PCs is very low, yet the system is able to handle only 400 changes every second.

      Using our own logger we see that about 400ms pass between the injector committing the changes and the server synchronizing the database. Another 400ms are needed to get all the changes to the other client so it can merge the changes and display them.

      By examining the built-in server-side logging of LCDS, it becomes clear that a lot of time is spent in the sending and receiving of messages over RTMP:

      [LCDS] 16:25:10.578 [DEBUG] Thread[my-rtmp-SocketServer-WorkerThread-1,5,main] Connection '19658898' starting a read.
      ...
      [LCDS] 16:25:10.937 [DEBUG] Deserializing AMF/RTMP request
      ...
      [LCDS] 16:25:10.968 [DEBUG] Before invoke service: data-service
      ...
      [LCDS] 16:25:11.156 [DEBUG] After invoke service: data-service; execution time = 172ms
      ...
      [LCDS] 16:25:11.171 [DEBUG] Serializing AMF/RTMP push x 400
      ...
      [LCDS] 16:25:11.390 [DEBUG] Committed transaction
      ...
      [LCDS] 16:25:11.421 [DEBUG] After invoke service: data-service
      reply: Flex Message (flex.messaging.messages.AcknowledgeMessage)
      ... etc. etc.

      As you can probably see the communication starting at the first entry up to the start of deserialization already takes approx. 400ms.. the processing of all the changes 172.
      The pushing of all the changes again takes about 400ms. If we can eliminate these two bottlenecks LCDS would be the perfect candidate to use in our new systems.

      We have tried everything we can think of, but nothing seems to help.
      Is it the RTMP protocol or a server or socket setting, or the way the server handles multithreading? Is there some JVM setting we don't know about?

      Any pointers and help would be appreciated!

      Greetings,
      Rogier Oorburg