SiteSetting class need redesign

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
9/4/2006 8:13:08 AM
Gravatar
Total Posts 148

Re: SiteSetting class need redesign

OK.  So we need to add:

D. Sending static content to the browser.

and the test you've been running so far assumes that all users are new users.  To measure performance for existing users, you should probably add:

oHeaders.Add "If-Modified-Since", "Mon, 4 Sep 2006 00:00:00 GMT"

to each of the requests for static content.  I'm assuming that ACT doesn't do that automatically somehow.  Note that if you do that, you'll either need to update that data manually if you modify the static content, or generate it automatically in the correct format.  A simpler method would be to just not make the requests for static content at all.  For that to be truly realistic though mojoPortal would need to provide a way to offload the static requests to a different server, a la akamai.  I don't think that would be that hard to implement.  Basically wherever you generate URLs that contain "Data/Sites", you'd allow for a different hostname to be used.

Also, it's not clear whether ACT is actually creating a new connection for each request or whether it is pooling connections somehow.  If it's creating a new connection that could create a slightly higher load on the server and increase the time to first byte.  I'd ignore that for now though.

--Dean
9/4/2006 8:55:16 AM
Gravatar
Total Posts 18439

Re: SiteSetting class need redesign

Yeah, thats what I meant before about not being sure whether ACT would measure the benefit of browser caching. I think I need to spend some time just reading up on ACT to see how it can be configured for various testing scenarios but for now I've got at least a day of work continuing to prune the theme.skin files and add css classes for each of the built in skins.

I think the main thing that is helpful is being able to measure whether particular changes degrade or improve performance. I do want to see if we can leverage browser caching though so I will read up on this after I finish the theme/css work.
9/10/2006 1:01:25 PM
Gravatar
Total Posts 18439

Re: SiteSetting class need redesign

I learned from my friend David Neal an interesting fact about load testing with ACT. He was using it at work this week in conjunction with Ants Profiler and he made an interesting discovery.

When you record a browser session to create the test, it creates separate requests for each image, .js, .css, etc as we already know from my previous tests. The interesting thing is that these requests actually improve measured performance dramatically because they are served up directly by IIS and not handled by .NET, they are served up very quickly and their inclusion boosts the number of requests per second quite a bit. I haven't tried this yet myself but David said when he commented those out the RPS went down to single digits in the app he was testing. So if you really want to see how fast the server code is running and be able to tell if changes are helping or hurting its probably better to comment out the static file requests.

I had a busy weekend developing and didn't get to trying it myself but hopefully will in the next night or so.
9/12/2006 5:28:55 PM
Gravatar
Total Posts 18439

Re: SiteSetting class need redesign

I finally got back to trying the tests with just the .aspx pages as my friend David suggested. Eliminating the requests for .css, .js, image files etc reduced both tests (mojoPortal and DotNetNuke) to 7 requests each test iteration. For the mojoPortal results it seems that ACT doesn't consider query string params to count toward unique requests so it counted / and /Default.aspx whereas with DNN the pattern is /tabid/n/Default.aspx where n is the tab id so it counts each one as unique. However both tests consisted of 7 requests each.

The results confirm that the requests for the static files improve the average RPS as both mojoPortal and DotNetNuke dropped RPS substantially. However mojoPortal still performed quite a bit better than DotNetNuke.

in summary:
mojoPortal 41.94 RPS
vs
DotNetNuke 10.46 RPS

mojoPortal .aspx requests only





DotNetNuke .aspx requests only


9/12/2006 9:00:56 PM
Gravatar
Total Posts 148

Re: SiteSetting class need redesign

Updated analysis (assuming your latest test was with no caching and the server was using 100% CPU):

A. Rendering modules.  This includes DB calls, business object instantiation, and rendering to HTML
B. Rendering a page from rendered modules.
C. Sending the rendered page to the browser.
D. Sending static content to the browser.

A+B+C+D = 251 ms/iter
B+C+D = 170 ms/iter
A+B+C = 167 ms/iter

Taking differences:

A = 81 ms/iter = 29%
B+C = 86 ms/iter = 34%
D = 84 ms/iter = 33%

To split out B and C, you'd need to do another test with "dumb output caching", though I suspect that C is pretty neglible.  If so, it looks like module caching will roughly double performance (neglecting static content).  To improve beyond that it looks like output caching would be needed.

--Dean

9/13/2006 3:28:10 AM
Gravatar
Total Posts 18439

Re: SiteSetting class need redesign

Actually, this last test was using module caching in all modules except blog and events for mojoportal and using default module caching in DNN. Sorry, I should have indicated that. I'll do another round soon to measure the benefit of caching vs non-caching. This was just to make sure my comparison to DNN was fair.

Joe
9/13/2006 4:06:20 AM
Gravatar
Total Posts 148

Re: SiteSetting class need redesign

OK.  So, the correct analysis would be (note redefinition of A and B below):

A. Rendering modules other than blog and events.  This includes DB calls, business object instantiation, and rendering to HTML
B. Rendering blog and events and rendering a page from rendered modules.
C. Sending the rendered page to the browser.
D. Sending static content to the browser.

A+B+C+D = 251 ms/iter
B+C+D = 170 ms/iter
B+C = 167 ms/iter

Taking differences:

A = 81 ms/iter = 32%
B+C = 167 ms/iter = 67%
D = 3 ms/iter = 1%

I suspect most of the time spent in B+C is spent rendering the blog and events modules.  It might be worthwhile to do a test where you cache those even if the cached HTML is somewhat broken.  That would give you a feel for the max you can gain from module caching.

--Dean
9/13/2006 4:27:33 PM
Gravatar
Total Posts 18439

Re: SiteSetting class need redesign

OK, so the last test was just .aspx pages (no static file requests) using reasonable module caching, that is, caching modules that can be cached without impacting their functionality.

Here are the mojoPortal results for
  • No caching
  • Caching all modules, even blog and events calendar which don't function correctly with caching. This is to establish the upper bound of improvement that can be achieved with module caching.
  • Dumb page output caching. This also isn't appropriate for real world but establishes an upper bound of improvement that could be achieved with page output caching.

Again this is testing using ACT on my laptop against a remote machine P3 800Mhz with 1GB RAM running IIS and MS SQL

mojoPortal .aspx pages with no cache





mojoPortal .aspx pages with all modules cached




mojoPortal .aspx pages with dumb page output caching




 
9/13/2006 4:49:01 PM
Gravatar
Total Posts 18439

Re: SiteSetting class need redesign

I thought I might try some testing with this http compression module:
http://www.blowery.org/code/HttpCompressionModule.html

I've downloaded it and added it to svn the other night but haven't tried it yet.

I'll post some more results after I get a chance to play with it.

Joe
9/13/2006 7:21:14 PM
Gravatar
Total Posts 148

Re: SiteSetting class need redesign

Updated analysis (switching back to original definitions for A and B):

A. Rendering modules.  This includes DB calls, business object instantiation, and rendering to HTML
B. Rendering a page from rendered modules.
C. Sending the rendered page to the browser.
D. Sending static content to the browser.

A+B+C+D = 251 ms/iter
A+B+C = 195 ms/iter
B+C = 139 ms/iter
C = 80 ms/iter

Taking differences:

A = 56 ms/iter = 22%
B = 59 ms/iter = 24%
C = 80 ms/iter = 32%
D = 56 ms/iter = 22%

Also:

dynamic + static content = 195 KB/iter
static content = 87 KB/iter

So:

dynamic content = 108 KB/iter = 1.35 MB/sec
static content = 87 KB/iter = 1.55 MB/sec

Since those numbers are well below typical processor<->memory bandwidths, the bottleneck is probably the network stack.  That means using the HttpCompressionModule might very well help reduce time spent in C (and maybe D if you don't try to compress static images).  Of course it all depends on the speed at which the compression can be performed and the reduction in size of the content.

--Dean

10/31/2006 4:21:11 AM
Gravatar
Total Posts 18439

Re: SiteSetting class need redesign

I just came accross an interesting article that shows another technique for injecting some dynamic content into a page or control that uses outputcache
http://www.dotnetbips.com/articles/displayarticle.aspx?id=516

The Substitution control, I wasn't aware of this control at all, though now I see it is even listed in the book I have, just didn't notice it.

I may have to do some more experimenting with this and see if I can overcome the issues of output caching using this.

Joe
You must sign in to post in the forums. This thread is closed to new posts.