Glad to hear it and thanks for the update Rogier. Best, Seth
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Rogier Oorburg Sent: Tuesday, September 16, 2008 7:43 AM To: [email protected] Subject: [flexcoders] Re: LCDS and real-time performance Thank you very much for your reply, it helped us a lot. We were able to process all of the required updates within one second, by changing the framerate-property of the client-application to a value beyond the 60 fps. By using a browser where the flashplayer is not locked at max 60 frames, like firefox 3, we were able to process a lot more messages per second. This way we could even achieve our goal of displaying 1000 updated objects per second. Thank you all for your help. Maybe it could be of some help to others to switch browsers to be able gain a performance boost like described above. Rogier --- In [email protected], Seth Hodgson <[EMAIL PROTECTED]> wrote: > > Hi Rogier, > > The core RTMP code in the player throttles the processing of inbound RTMP data, so there's an upper bound on the number of received messages that will be dispatched per frame on the client. This is done to prevent wedging playback in the player. If I generate a burst of 100 messages that are pushed to a subscribed Flex client over an RTMP connection, the duration on the client between processing the first and last message in my ActionScript handler is ~190ms. Scale that to 400 messages and I'm up closer to 800ms. This has nothing to do with the underlying network IO or AMF serialization/deserialization - and it's a feature, not a defect. If you ramp the server generated burst size up to a large value (say 1000 or 10K) and monitor low level network traffic, you can see that writing the data to the player is quick, but dispatch of all those messages into ActionScript is slower because of this core throttling in the player. > > The player generally is rendering at around 24 frames/sec. If you're sending 400+ updates per second that's way beyond the player's UI refresh rate, and way past a monitor's refresh rate, so there's no way to even render updates at that rate. > > What you want to do in this scenario is throttle the number of updates/messages you're pushing per second. Perhaps the simplest way to do this would be to lower the sampling rate at your update source. If this is a Flex client using DataService, try turning off auto-commit, and only committing changes on a wider interval - like 10 or 25 times per second rather than 400+ times. > > Seth > > From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Rogier Oorburg > Sent: Monday, August 25, 2008 11:31 PM > To: [email protected] > Subject: [flexcoders] Re: LCDS and real-time performance > > > Thanks for the reply... > > I'm sure the server-side logging is not the problem, the same effects > are seen without the server writing all this information. > Even if we only do client-side logging we still get the same results. > I think we ruled out the database being a bottleneck by using the > Actionscript-adapter on the server, which again gets us the same > results. > That is why I still think our bottleneck is in the RTMP/AMF > communication and this is backed-up by the server-side logging. > > Does anybody have experience with performance issues using RTMP/AMF? > > Greetings, > Rogier > > --- In [email protected]<mailto:flexcoders%40yahoogroups.com>, "seth_hodgson" <shodgson@> > wrote: > > > > Hi Rogier, > > > > You shouldn't place any weight on timing metrics captured while the > > server has debug level logging enabled. The IO overhead to output > > all the debug level logging to a console or log file will > > drastically skew your numbers. > > > > I'd recommend running your test wihtout debug level logging and > > capturing timing data at the client; say by keeping track of deltas > > between each message/update received. > > > > Be careful that your own logging at the server isn't acting as a > > bottleneck, and the database could definitely become a bottleneck > at > > high rates of updates. > > > > Seth > > > > --- In [email protected]<mailto:flexcoders%40yahoogroups.com>, "Rogier Oorburg" > > <rogier_oorburg@> wrote: > > > > > > Hi Jeff, > > > > > > Thank you for your reply. > > > I have gathered some more logging information in this mail. To > > maybe > > > make clearer where all the time is spent. > > > Is there a way to set the packet-size (or 'chunk' size?) to be > > able > > > to send rather large messages (or a lot of small ones) more > > > efficiently? Or could there be some other cause for this slow > > > communication between client and server? > > > > > > Thanks, hope these loggings shed some light on the situation... > > > > > > [LCDS] 08:06:40.406 [DEBUG] [SocketServer.General] Thread[my-nio- > > > server-WorkerThread-2,5,main] Connection '9194103' starting a > read. > > > [LCDS] 08:06:40.406 [DEBUG] [Protocol.RTMP] Thread[my-nio-server- > > > WorkerThread-2,5,main] chunk input stream processing 1 bytes. > > > [LCDS] 08:06:40.406 [DEBUG] [Protocol.RTMP] Thread[my-nio-server- > > > WorkerThread-2,5,main] chunk input stream processing 7 bytes. > > > [LCDS] 08:06:40.406 [DEBUG] [Protocol.RTMP] Thread[my-nio-server- > > > WorkerThread-2,5,main] chunk input stream processing 128 bytes. > > > [LCDS] 08:06:40.406 [DEBUG] [Protocol.RTMP] Thread[my-nio-server- > > > WorkerThread-2,5,main] chunk input stream processing 1 bytes. > > > [LCDS] 08:06:40.406 [DEBUG] [Protocol.RTMP] Thread[my-nio-server- > > > WorkerThread-2,5,main] chunk input stream processing 128 bytes. > > > [LCDS] 08:06:40.406 [DEBUG] [Protocol.RTMP] Thread[my-nio-server- > > > WorkerThread-2,5,main] chunk input stream processing 1 bytes. > > > [LCDS] 08:06:40.406 [DEBUG] [Protocol.RTMP] Thread[my-nio-server- > > > WorkerThread-2,5,main] chunk input stream processing 128 bytes. > > > > > > ... > > > > > > [LCDS] 08:06:40.421 [DEBUG] [Protocol.RTMP] Thread[my-nio-server- > > > WorkerThread-2,5,main] chunk input stream processing 1 bytes. > > > [LCDS] 08:06:40.421 [DEBUG] [Protocol.RTMP] Thread[my-nio-server- > > > WorkerThread-2,5,main] chunk input stream processing 57 bytes. > > > [LCDS] 08:06:40.421 [DEBUG] [SocketServer.General] Thread[my-nio- > > > server-WorkerThread-2,5,main] registering read interest for > > > Connection '9194103'. > > > [LCDS] 08:06:40.421 [DEBUG] [SocketServer.General] Thread[my-nio- > > > server-WorkerThread-2,5,main] Connection '9194103' finished a > > read. > > > 8192 bytes were read. > > > [LCDS] 08:06:40.421 [DEBUG] [SocketServer.General] Thread[my-nio- > > > server-Reactor1,5,main] unregistering read interest for > > > Connection '9194103'. > > > [LCDS] 08:06:40.421 [DEBUG] [SocketServer.General] Thread[my-nio- > > > server-WorkerThread-2,5,main] Connection '9194103' starting a > read. > > > [LCDS] 08:06:40.421 [DEBUG] [Protocol.RTMP] Thread[my-nio-server- > > > WorkerThread-2,5,main] chunk input stream processing 71 bytes. > > > [LCDS] 08:06:40.421 [DEBUG] [Protocol.RTMP] Thread[my-nio-server- > > > WorkerThread-2,5,main] chunk input stream processing 1 bytes. > > > [LCDS] 08:06:40.421 [DEBUG] [Protocol.RTMP] Thread[my-nio-server- > > > WorkerThread-2,5,main] chunk input stream processing 128 bytes. > > > ... > > > [LCDS] 08:06:40.468 [DEBUG] [Protocol.RTMP] Thread[my-nio-server- > > > WorkerThread-2,5,main] chunk input stream processing 1 bytes. > > > [LCDS] 08:06:40.468 [DEBUG] [Protocol.RTMP] Thread[my-nio-server- > > > WorkerThread-2,5,main] chunk input stream processing 64 bytes. > > > [LCDS] 08:06:40.468 [DEBUG] [SocketServer.General] Thread[my-nio- > > > server-WorkerThread-2,5,main] registering read interest for > > > Connection '9194103'. > > > [LCDS] 08:06:40.468 [DEBUG] [SocketServer.General] Thread[my-nio- > > > server-WorkerThread-2,5,main] Connection '9194103' finished a > > read. > > > 8192 bytes were read. > > > [LCDS] 08:06:40.468 [DEBUG] [SocketServer.General] Thread[my-nio- > > > server-Reactor1,5,main] unregistering read interest for > > > Connection '9194103'. > > > [LCDS] 08:06:40.468 [DEBUG] [SocketServer.General] Thread[my-nio- > > > server-WorkerThread-2,5,main] Connection '9194103' starting a > read. > > > [LCDS] 08:06:40.468 [DEBUG] [Protocol.RTMP] Thread[my-nio-server- > > > WorkerThread-2,5,main] chunk input stream processing 64 bytes. > > > [LCDS] 08:06:40.468 [DEBUG] [Protocol.RTMP] Thread[my-nio-server- > > > WorkerThread-2,5,main] chunk input stream processing 1 bytes. > > > [LCDS] 08:06:40.468 [DEBUG] [Protocol.RTMP] Thread[my-nio-server- > > > WorkerThread-2,5,main] chunk input stream processing 128 bytes. > > > ... > > > [LCDS] 08:06:40.468 [DEBUG] [Protocol.RTMP] Thread[my-nio-server- > > > WorkerThread-2,5,main] chunk input stream processing 0 bytes. > > > [LCDS] 08:06:40.468 [DEBUG] [SocketServer.General] Thread[my-nio- > > > server-WorkerThread-2,5,main] registering read interest for > > > Connection '9194103'. > > > [LCDS] 08:06:40.468 [DEBUG] [SocketServer.General] Thread[my-nio- > > > server-WorkerThread-2,5,main] Connection '9194103' finished a > > read. > > > 4321 bytes were read. > > > [LCDS] 08:06:40.515 [DEBUG] [SocketServer.General] Thread[my-nio- > > > server-Reactor1,5,main] unregistering read interest for > > > Connection '9194103'. > > > [LCDS] 08:06:40.515 [DEBUG] [SocketServer.General] Thread[my-nio- > > > server-WorkerThread-2,5,main] Connection '9194103' starting a > read. > > > [LCDS] 08:06:40.515 [DEBUG] [Protocol.RTMP] Thread[my-nio-server- > > > WorkerThread-2,5,main] chunk input stream processing 1 bytes. > > > [LCDS] 08:06:40.515 [DEBUG] [Protocol.RTMP] Thread[my-nio-server- > > > WorkerThread-2,5,main] chunk input stream processing 128 bytes. > > > ... > > > etc. > > > etc. > > > [LCDS] 08:06:40.671 [DEBUG] [SocketServer.General] Thread[my-nio- > > > server-WorkerThread-2,5,main] Connection '9194103' finished a > > read. > > > 4321 bytes were read. > > > [LCDS] 08:06:40.718 [DEBUG] [SocketServer.General] Thread[my-nio- > > > server-Reactor1,5,main] unregistering read interest for > > > Connection '9194103'. > > > [LCDS] 08:06:40.718 [DEBUG] [SocketServer.General] Thread[my-nio- > > > server-WorkerThread-2,5,main] Connection '9194103' starting a > read. > > > [LCDS] 08:06:40.718 [DEBUG] [Protocol.RTMP] Thread[my-nio-server- > > > WorkerThread-2,5,main] chunk input stream processing 1 bytes. > > > [LCDS] 08:06:40.718 [DEBUG] [Protocol.RTMP] Thread[my-nio-server- > > > WorkerThread-2,5,main] chunk input stream processing 97 bytes. > > > [LCDS] 08:06:40.718 [DEBUG] [Endpoint.RTMP] Thread[my-nio-server- > > > WorkerThread-2,5,main] received message TCMessage [ Type: > > MsgCmdEx, > > > Stream ID: 0] > > > [LCDS] 08:06:40.890 [DEBUG] [Endpoint.RTMP] Deserializing > AMF/RTMP > > > request > > > > > >

