Wednesday, January 18, 2012

CSLA Message Size Is HUGH ???

The project I am working on experiencing some performance issue, slow communication between server and client, system out of memory exception.

The project is a Silverlight Rich Internet Application.  Silverlight + Prism on the client, CSLA an application framework for middle tier, SQL Server at backend.  The hardware specification of the hosting environment is good enough for our current few pilot users, less than a hundred of users.

Since, hardware is good enough to support our current user load.  We decided to benchmark our middle tier CSLA, which we cannot get any existing benchmark from anywhere.  Nobody is using CSLA? :) We compared with WCF Service and WCF RIA Service as well.

The benchmark result is a little surprising and explain some of the issue we have.

Display a list object which contains 20 item objects, each item object has 11 properties, int, bool, datetime or string values.

Without IIS compression enabled.




With IIS compression enabled.





































IIS compression is one way only, for downloading data from server to client.  Sending data from client to server is NOT compressed.  It is getting worse when sending data from client to server using CSLA.  We use a single object which has 23 properties, int, bool, datetime and string values.


















Given a typical business unit who have 10 users and share a regular DSL line for internet connection which has a average of 100KB upstream speed,
10 x 6KB = 60KB / 100KB = 60%.
So, CSLA itself will use at least 60% of the bandwidth!!!

The big message size of CSLA is not only affecting the communication but also the memory usage on the Silverlight Client.  Why?






































Even if the message is IIS compressed in a smaller size for faster downloading, it will be uncompressed on the client, and Silverlight .NET runtime have to allocate enough memory to handle the uncompressed message which is much bigger than WCF Service or WCF RIA Service message.  This will cause extra CPU and memory usage, plus Silverlight .NET runtime is not as effecient as desktop .NET runtime, which will end with System.OutOfMemory issue sometime.

Are you also using CSLA or planning to use CSLA for your Silverlight Rich Internet Application?  Let me know your performance experience.

1 comment:

  1. I have seen similar problems in a project that I have been working on. Where the client side is using CSLA with prism. We are also suffering from performance problem even after using a lot of performance tuning including custom zipping of the messages, diffgram etc. still the performance is pretty bad

    ReplyDelete