How to do performance tuning for mojoPortal?

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.
7/28/2011 2:37:11 AM
Gravatar
Total Posts 13

How to do performance tuning for mojoPortal?

Hi Joe,

    I did a load test to a server installing mojoPortal with mysql. The machine spec is:

(CPU INTEL Xeon 2.4G, Memory 2GB, Windows 2008 R2 enterprise version, 50G hard disk).

Test Name # Samples average(ms) aggregate_min(ms) aggregate_max(ms) aggregate_stddev(ms) error% Throughput(requests/second) aggregate_bandwidth(Kb/sec) average_bytes
        
500 Requests ** 5000 12839 88 22875 2771 0 36 775 22198
        
800 Requests ** 8000 21120 371 24274 4184 0 35 761 22198
        
1000 Requests ** 10000 26321 249 33821 4613 0 35 769 22198
        
1500 Requests ** 15000 44631 606 51742 8325 0 32 689 22198
        
1700 Requests ** 17000 52373 513 62950 9517 0 31 666 22198
        
2000 Requests * 10000 61968 601 79770 17450 0 28 617 22198
        
        
URL is: http://localhost:8088/test.aspx
** issue all requests within 5 seconds, repeat 10 times        
* issue all requests within 5 seconds, repeat 5 times. When I tried repeat 10 times, the machine almost hangs, never stop the test.

 

As you can see, the max request number is less than 2000. Are there any way to fine tune its performance? Or is it possible to convert all html contents in database to static html file so that we won't hit database when we access the static contents.

Are there any other cms product written by asp.net and don't need a database? Currently I only know liferay is another product which depends on XML but not database.

 

Thanks.

Bruce

 

7/28/2011 9:55:07 AM
Gravatar
Total Posts 115
mojoPortal Community Expert

Re: How to do performance tuning for mojoPortal?

There are several issues you need to consider with load testing a site that you might have thought of but did not mention in your post. The biggest thing I see and not even looking at your results are the machine you are testing on. What is the scope of your testing ie how much traffic to do see hitting your production site? Is this your actual production environment or just a development machine? I will tell you that 2 gigs is a very miniscule amount of memory for a server. Also is your MySQL server on the same box or this box that they mojoPortal install is running on? What other processes are running the back ground? What version of mojoPortal? Is it framework 4.0 or 3.5? How are you load testing the site? Are you using a testing suite or scripts that you have written? All of this information makes huge differences when testing. 

I know that Joe runs the mojoPortal site on MySQL and it preforms great and I would assume it generates a decent amount of traffic.

As far as tuning mojoPortal it is best to make sure you hardware is adequate to support the expected load. I doubt there is any way that Joey would modify storing any information to the file system instead of the db.

There are some ASP.Net open source applications that use XML and the file system to store information like BlogEngine.Net and ScrewTurn Wiki but they also offer SQL storage in addition. If you are concerned about site performance I would not recommend in anyway using XML or any file system storage. Not only are these methods slow they also have a single point of read/write and can lock very easly.

7/28/2011 10:22:53 AM
Gravatar
Total Posts 13

Re: How to do performance tuning for mojoPortal?

Hi Aaron, Thanks for your reply. I am sorry, I didn't provide enough information in my post. Yes, it is a development machine, and I am Using .net 4.0, Mysql is installed in the same Machine as mojoPortal, but when I installed Mysql, I already chose the server mode but Nt development mode. And all testing results Are from JMeter, I didn't write any script, just Created a test plan in JMeter and run it, I tried Running JMeter in the same machine and in Another Intranet machine, no big difference in Terms of testing results. After I asked question here, I try to enable IIS output caching, it seems it improves Performance a lot, maybe I should apply this. Thanks. Bruce
7/29/2011 12:26:48 PM
Gravatar
Total Posts 18439

Re: How to do performance tuning for mojoPortal?

Hi,

As Aaron said that is not exactly a beefy box, it sounds about equivalent to the server this site is running on which I would call a budget level dedicated server. 2000 requests per second on a box like that doesn't really sound too bad to me and a beefier box could go a lot higher.

I think if you are getting the same result when running the tests locally vs a remote machine making the requests, it just means that the remote machine is not able to put it under enough load to get higher because it surely takes a lot of processor to create the load just as it does for serving the requests. To really create the load the requesting machine or machines need to have a fast connection and usually need to be more powerful than the box they are load testing unless you have multiple machines creating the requests.

Output caching is something that can only really work well for a brochure kind of site, features that are designed for user interaction won't work well with that but if your content is only using the html feature you might be able to get away with it.

In mojoPortal some features such as the Html feature do support caching but you have to enable it by adding this to user.config

<add key="DisableContentCache" value="false"/>

and then you can set the cache duration in the feature settings of each Html instance.

We have it disabled by default because cache uses server memory and that is usually the most precious and limited resource of all in shared hosting and even budget servers. If the memory limit of the application pool is reached it recycles the app and therefore enabling caching in low memory environments can actually hurt performance rather than help it.

See also Capacity Planning

Hope that helps,

Joe

7/29/2011 12:45:43 PM
Gravatar
Total Posts 18439

Re: How to do performance tuning for mojoPortal?

One more thing I want to add is that I would not think of caching until I had a performance problem that I was trying to solve, I would not cache just because I can, it would only be to solve a problem that I would enable caching or for things that are very expensive to create and are used frequently, so even on a good server with tons of RAM I would not start enabling caching for things unless there is a good reason.

Best,

Joe

7/31/2011 9:02:16 PM
Gravatar
Total Posts 13

Re: How to do performance tuning for mojoPortal?

Hi Joe,

    Thanks a lot for the replies, yes. I read the capacity planning before I changed anything.

I agreed that we should use more powerful machine to do load testing.

I also try to change 'DisableContentCache' to be false, but there is no big difference in results.

 

Thank you for your help.

Bruce

 

8/1/2011 5:54:24 AM
Gravatar
Total Posts 18439

Re: How to do performance tuning for mojoPortal?

In addition to that setting you would need to set a cache duration in feature settings of the html instance. If it is set to the default of 0 no cache is used.

Best,

Joe

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