mod_mono parallel requests dont’t run in parallel

View: New views
5 Messages — Rating Filter:   Alert me  

mod_mono parallel requests dont’t run in parallel

by michaeltheplumber :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

 hi,


using jquery ($.get(..) ) I call 3 times the same ASP.NET MVC controller method in one go. Since the responses are handled asynchronously, the requests go out almost in parallel.

I know they go off in parallel, because I pass in the client's current time as a parameter, but they seem to be processed (serverside) one after the other. To proof this, I response out the start and end time in my controller routine. In VS2008, using the little debug webserver, it works perfectly in parallel (same start time). But running mod_mono on Apache, I never get the calls to start in parallel.
The processing of the individual calls takes some time (about a second to call an external sevice), so i can see the delay very clearly, i'm not talking about milliseconds.
The user experience on the page is not very good,  the user sees the returning data areas one after the other instead of building up simultanously.

We develop a public website, utilizing shopping apis from amazon,ebay etc.

Setup: Mono 2.4.latest, Linux OpenSuse 11, Virtual Server, showing 4 cpus in cpuinfo, Apache (running worker MPM with high performance settings), hosted by a professional service.

Any ideas ? Is this something I have to worry about ? I do worry about scalibility in large, when all requests are handled one after the other.. will it scale better if the request would come from different machines (users) ?

thanks, Michael
 

Re: mod_mono parallel requests dont’t run in parallel

by Marek Habersack-6 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

michaeltheplumber wrote:
>  hi,
Hey,

>
> using jquery ($.get(..) ) I call 3 times the same ASP.NET MVC controller
> method in one go. Since the responses are handled asynchronously, the
> requests go out almost in parallel.
>
> I know they go off in parallel, because I pass in the client's current time
> as a parameter, but they seem to be processed (serverside) one after the
> other. To proof this, I response out the start and end time in my controller
> routine. In VS2008, using the little debug webserver, it works perfectly in
> parallel (same start time). But running mod_mono on Apache, I never get the
> calls to start in parallel.
> The processing of the individual calls takes some time (about a second to
> call an external sevice), so i can see the delay very clearly, i'm not
> talking about milliseconds.
> The user experience on the page is not very good,  the user sees the
> returning data areas one after the other instead of building up
> simultanously.
>
> We develop a public website, utilizing shopping apis from amazon,ebay etc.
>
> Setup: Mono 2.4.latest, Linux OpenSuse 11, Virtual Server, showing 4 cpus in
> cpuinfo, Apache (running worker MPM with high performance settings), hosted
> by a professional service.
Since they are separate requests, I don't see a reason they wouldn't be handled in parallel on a
4-way machine unless there's a lock held somewhere on the way which serializes them. It's impossible
to tell what's happening for sure without having sample code which exposes the issue. Please follow
http://mono-project.com/Bugs and file a bug report for the System.Web component with attached
simple, self-contained test case which reproduces the problem.

> Any ideas ? Is this something I have to worry about ? I do worry about
> scalibility in large, when all requests are handled one after the other..
> will it scale better if the request would come from different machines
> (users) ?
We have tested Mono's ASP.NET under very high load and it scaled pretty well. Our garbage collection
is not as good as we'd wish it to be, but overall the performance was more than satisfactory.

marek
_______________________________________________
Mono-aspnet-list mailing list
Mono-aspnet-list@...
http://lists.ximian.com/mailman/listinfo/mono-aspnet-list

Re: mod_mono parallel requests dont’t run in parallel

by sirmak :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Marek Habersack-6 wrote:
We have tested Mono's ASP.NET under very high load and it scaled pretty well. Our garbage collection
is not as good as we'd wish it to be, but overall the performance was more than satisfactory.
Hi Marek,

Is the current GC fills up most of the memory (maybe in x hours) under high load ? or is it safe to run an high load web app for a week ? If it fills up memory, how many hours/minutes it took to fill it under high load in your sample test app ?

And will the new GC really come with the 2.8 version ?

thanks
sirmak

 

Re: mod_mono parallel requests dont’t run in parallel

by Marek Habersack-6 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

sirmak wrote:

>
>
> Marek Habersack-6 wrote:
>> We have tested Mono's ASP.NET under very high load and it scaled pretty
>> well. Our garbage collection
>> is not as good as we'd wish it to be, but overall the performance was more
>> than satisfactory.
>>
>
> Hi Marek,
Hello,

> Is the current GC fills up most of the memory (maybe in x hours) under high
> load ? or is it safe to run an high load web app for a week ? If it fills up
> memory, how many hours/minutes it took to fill it under high load in your
> tests ?
GC never fills up memory, it reclaims it. Our GC works quite reliably, but it's just not very fast
(and it's a conservative one). There's a certain amount of memory it doesn't give back to the system
- this is done to cater to application's allocation needs faster. In our tests the memory
utilization was pretty stable once it reached a certain level specific for the test application. I
run my personal blog with mono and observe the same behavior. Of course, it all depends on memory
patterns of your application - if it allocates a lot of memory in short periods of time, then it is
possible you can find yourself in an OOM situation. It is also possible that either your application
or Mono may leak memory - if you notice a pattern in which memory usage rises by the same amount
which is never reclaimed, then this is the situation.
It's also worth remembering the way Unix memory usage should be read. You have VSS (Virtual Set
Size) which is memory mapped by the process (i.e. reserved for current or future usage) - this kind
of memory may report very high figures which do NOT represent your application's actual memory
usage. Then there is RSS (Resident Set Size) which is memory actually committed (i.e. allocated and
in use) by your application - this is a rough approximation of your application's memory usage. RSS
can be subdivided into shared and writable/private memory chunks - the former is the actual amount
of RAM your application uses. Shared memory is the part occupied by shared libraries (common
code/data). If you want to check how much memory your application uses, issue the following command
in terminal:

   pmap -d <pid_of_your_app>

The last line of the output will contain the figures I described above.

> And will the new GC really come with the 2.8 version ?
That's quite possible, but no promises.

marek
>
> thanks
> sirmak
>
>  

_______________________________________________
Mono-aspnet-list mailing list
Mono-aspnet-list@...
http://lists.ximian.com/mailman/listinfo/mono-aspnet-list

Re: mod_mono parallel requests dont’t run in parallel

by sirmak :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thank you very much Marek,



Regards,
sirmak