Peng, Hao wrote:
Hi, 

Anyone has any suggestions to improve asp.net
applications scalability running Apache/Mono?

I have an application to migrate to Linux. I'm using
RHEL 4 AS i386/mono 1.1.10/mod-mono 1.1.10/apache
2.0.52. 
The hardware is PII 400 / 256M. (delibrately used this
low spec machine to force the application
optimisation)

I use VS.NET application centre test to simulate 50
users cocurrantly accessing the asp.net app, but it
constantly fails after 10 mins or so. With a small
user load (2-5) the application runs perfectly.
At the failing point, I found out mono processes are
spawn (using ps aux | grep mono). Two of them are in
the Ssl (Interruptible sleep) state and the others are
Z (zombies). The parent process of the zombie ones is
one of the Ssl

I also found that the unix sockets mod_mono_server is
using are also abnormal (using netstat an | grep
mono). About 50 sockets are connected but all the
others are trying to connect to somewhere but for some
reason they are hanging there eventually.

When MonoMaxMemory directive is applied in httpd.conf,
the problem is solved. The application runs under 50
users for 8 hours without any problem. But it is not
an ultimate solution as the mono server process will
be killed so the site user will still experience some
server down time.

It is a complex application, and I don't know where
exactly the problem is. So I can't post any source
code. Does anyone have any general guideline as for
the mono scalability? I saw in various forums that the
Garbage Collector is a bit problematic in Mono (or
Linux in general) but I don't know whether it is true.
If it's true, is there any improvement that I could do
non-programmatically? Is there any managed-code
improvement particularly needed for Mono? 

I know without the source code it's a bit difficult to
tell. But ANY suggestions (including how to precisely
locate the problematic code section, any profiler to
monitor the mono runtime for asp.net) will be greatly
appreciated.

Thanks very much

  
If you can narrow down the offending code maybe or give some exact details that would start to give us a clue.. Create a test case and we have something solid while you don't have to  give us your application..

For me I have seen both sides of this story, but the bottom line is mostly application design..

There is one project I'm working on to improve that is average complexity and I can't get 5 concurrent users and more than 20 pages per second.. One the other hand I have a complex app we built for a customer and ported that can easily do about 20x that with no issues on the same server with consistent sub second rendering.. (btw.. the server specs aren't anything impressive either..)

Take a look at caching data and output..  That's a big one either in Mono or MS .Net.

Cheers,

C.
_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to