[Mono-dev] Why not build official site on ASP.NET? Mono should enhance server performance and stability!

Alan McGovern alan.mcgovern at gmail.com
Mon Dec 7 15:20:39 EST 2009


Just to add, while MonoTorrent doesn't use it's on threadpool, it doesn't
hog ThreadPool threads by blocking inside the async callbacks. As soon as a
message is received and my callback is invoked, I queue the message to be
processed and allow thread to return to the ThreadPool. As such, even with a
large number of actively transferring connections (> 50) I only need a
handful of threadpool threads. If you starve the threadpool, your
performance will suffer accordingly ;)

Alan.

On Mon, Dec 7, 2009 at 8:17 PM, Alan McGovern <alan.mcgovern at gmail.com>wrote:

> Hey,
>
> MonoTorrent uses the standard .NET threadpool for all asynchronous sockets.
> It's all standard Socket.BeginReceive/Socket.EndReceive calls. I've run it
> with ~150 open connections in the past with no issues, though it's worth
> noting that 150 open connections != 150 actively transferring connections.
>
> If you're seeing issues with running out of threads and connections being
> dropped as a result, just export MONO_THREADS_PER_CPU=100 to increase the
> maximum number of allowed threads and see if that helps. Feel free to vary
> the number up or down as appropriate.
>
> Alan.
>
>
> On Mon, Dec 7, 2009 at 5:12 PM, Rafael Teixeira <monoman at gmail.com> wrote:
>
>> You could look at the source of MonoTorrent, and also of XSP that does
>> use a separate ThreadPool AFAIR.
>>
>> Rafael "Monoman" Teixeira
>> ---------------------------------------
>> "To be creative means to be in love with life. You can be creative
>> only if you love life enough that you want to enhance its beauty, you
>> want to bring a little more music to it, a little more poetry to it, a
>> little more dance to it."
>> Osho
>>
>>
>>
>> On Sun, Dec 6, 2009 at 11:21 PM, Laser Lu <laser_lu at 163.com> wrote:
>> > Thanks for your reply ;-)
>> >
>> > I’m now using the latest version 2.4.2.3.
>> >
>> >
>> >
>> > This is the program I’m developing: http://linktalk.net. In this
>> program,
>> > IHttpAsyncHandler, ThreadPool, and TCP Sockets are heavily used.
>> >
>> > I tried to host my program under Apache/XSP, but it had a really poor
>> > performance. So, I tried the HttpListener class, but still not good, and
>> had
>> > lots of SocketExceptions thrown compared to the Windows counterpart.
>> >
>> > Lastly, I implemented a simple web server by myself, using Socket
>> listening
>> > and parsing directly. It works better, however, async requests usually
>> > become unresponsive. It seems the ThreadPool is not as good as the .NET
>> > implementation, or maybe there needs some special configuration I don’t
>> > know.
>> >
>> >
>> >
>> > Under Windows/.NET the program can handle more than 2000 online IM users
>> > concurrently, but on Linux/Mono less than 100 conrrent users, and
>> usually
>> > become unresponsive…
>> >
>> >
>> >
>> > ________________________________
>> >
>> > From: Miguel de Icaza [mailto:miguel at novell.com]
>> > Sent: Monday, December 07, 2009 9:03 AM
>> > To: Laser Lu
>> > Cc: mono-devel-list at lists.ximian.com
>> > Subject: Re: [Mono-dev] Why not build official site on ASP.NET? Mono
>> should
>> > enhance server performance and stability!
>> >
>> >
>> >
>> > Hello,
>> >
>> >
>> >
>> >      The problem is that we would have to migrate the contents.   We
>> tried
>> > once to move to MindTouch's Deki, but we lost too much in the
>> translation
>> > and there were too many problems with the translation so we abandoned
>> that
>> > plan.
>> >
>> >
>> >
>> >      We are doing the new web sites using Mono though,
>> > http://monodevelop.com, http://wiki.monotouch.net, http://monotouch.net,
>> and
>> > http://forums.monotouch.net are all running with Mono powered software.
>> >
>> >
>> >
>> >      As for stability and performance, which version of Mono are you
>> > running?
>> >
>> > I was just wondering, why the mono official site was not built
>> > on ASP.NET/C#? That would be a good demonstration.
>> >
>> > Currently, I’m developing a Web IM program, and it works fine on
>> > Windows/.NET. However, the same code had a poor performance on
>> Linux/Mono,
>> > and seems very unstable.
>> >
>> > So I doubt whether Mono is suitable for developing server programs which
>> > should be able to handle a huge amount of concurrent requests.
>> >
>> > I wish the Mono team would pay much more attentions to server
>> applications,
>> > and enhance the server stability or just concentrate on server
>> applications,
>> > not just catching up with Microsoft’s new cool features. Because
>> Linux/Unix
>> > is used as server under 90% circumstances, performance and stability is
>> the
>> > most import thing!
>> >
>> >
>> >
>> > _______________________________________________
>> > Mono-devel-list mailing list
>> > Mono-devel-list at lists.ximian.com
>> > http://lists.ximian.com/mailman/listinfo/mono-devel-list
>> >
>> >
>> >
>> > _______________________________________________
>> > Mono-devel-list mailing list
>> > Mono-devel-list at lists.ximian.com
>> > http://lists.ximian.com/mailman/listinfo/mono-devel-list
>> >
>> >
>> _______________________________________________
>> Mono-devel-list mailing list
>> Mono-devel-list at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20091207/0f65b07c/attachment.html 


More information about the Mono-devel-list mailing list