Re: [xSocket-develop] scalability and latency
Status: Inactive
Brought to you by:
grro
|
From: Gregor R. <gre...@go...> - 2008-04-05 05:35:08
|
Hi James, this is a typical scenario which should be supported by xSocket-http. Unfortunately, performance (scalability, latency, …) diagnostics & optimizations haven't been done for xSocket-http yet (for resource/time reasons). I would suspect, that the new module xSocket-http causes this undesired effects. I have to take a deeper look into this. Could you send me minimal code, that I'm able to run some test and make some diagnostics? Which platform do you use (windows, linux,…)? Gregor 2008/4/4, James Olsen <Jam...@co...>: > > I'm experimenting with xSocket 2.0-beta-2 and xSocket-http 2.0-alpha-4 to > implement a messaging server that pushes messages to http clients. The > messages are small (approx 15 bytes) but frequent (enqueued at a rate of 25 > per second per client). These messages are in 10 logical topics and only > the latest available message from each topic is sent, i.e. when a new one is > queued to be sent it overwrites any message already queued for the same > topic. The server infrastructure will also concatenate several smaller > messages to make one larger message if messages are available on multiple > topics at the time of writing to the BodyDataSink. Thus the number of > messages dequeued and sent to the clients is automatically throttled by the > capability of the underlying comms. > > > > I have the same setup with Tomcat 6 using the NIO connector and find that > I can add large numbers of users and still get good performance. With the > hardware I have it can deliver 70,000 messages per second. More users mean > fewer messages per user but the overall throughput remains the same and > latency is low and fairly consistent. > > > > However I'm finding that this does not scale as well with xSocket. The > max message throughput is lower and reduces as more clients are added. The > average latency is higher and can be highly variable (>10 seconds!) > depending on the number of background message writing Threads and the number > of Dispatchers. Making the number of message writing Threads equal to the > number of Dispatchers and keeping them both quite low (<= 3) reduces the > latency variability but the average is still significantly higher than with > Tomcat. SYNC flushing is also better than ASYNC with this setup because it > causes more message concatenation (fewer larger messages sent). > > > > The xSocket API has been a joy to work with and allows me to do more than > with Tomcat/Comet (e.g. if desired the client can continue to write to the > connection) and the memory use is incredibly low, however the performance > for my scenario is worse than I was expecting. > > > > Is there something I might be missing in my config or is this not a > scenario that xSocket is currently optimal for? > > > *********************************************************************************************** > This email, its contents and any files attached are a confidential > communication and are > intended only for the named addressees indicated in the message. > > If you are not the named addressee or if you have received this email in > error, you may not, > without the consent of Cognotec, copy, use or rely on any information or > attachments in any way. > Please notify the sender by return email and delete it from your email > system. > > Unless separately agreed, Cognotec does not accept any responsibility for > the accuracy or > completeness of the contents of this email or its attachments. Please note > that any views, > opinion or advice contained in this communication are those of the sending > individual > and not those of Cognotec and Cognotec shall have no liability whatsoever > in relation to > this communication (or its content) unless separately agreed. > > *********************************************************************************************** > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace > _______________________________________________ > xSocket-develop mailing list > xSo...@li... > https://lists.sourceforge.net/lists/listinfo/xsocket-develop > > |