[Mono-list] Size of thread in Mono (65MB per thread ?)
Ian Norton
inorton at gmail.com
Sat Dec 21 18:32:52 UTC 2013
What are you using to tell you that you are using 64mb?
It sounds like vss increase rather than actual ram allocation. How much
swap do you have?
On 20 Dec 2013 09:14, "Nicolas Antoniazzi" <nicolas at codingame.com> wrote:
> I tested the new version of Mono 3.2 using the sgen GC.
> I still have the same problem: every new thread uses a bit more than 64MB
> or RAM on Linux. So, in my virtual environment limited to 512MB of
> (virtual) RAM, it crashes (stops silently with a return code equals to 1)
> when I try to create my 6th thread.
>
> I tested the same program on Windows 7 with a MS .Net environment. I
> started 1000 threads and my program only used 48MB of RAM. I did not try to
> create more threads because I would have to create millions of thread to
> each a problem.
>
> I am really not doing some strange operations, just create threads in a
> loop, with a pause of 1 sec between each one to let me time to see how
> munch memory is consumed.
> Am I the only one who encounter this strange behavior with thread of 64MB
> or is it considered as normal?
>
>
> Nicolas Antoniazzi
> CTO - CodinGame
> http://www.codingame.com
> +33 (0)4 67 13 00 96
>
>
> 2013/12/19 "Andrés G. Aragoneses" <knocte at gmail.com>
>
>> Try finding the limit on the MS.NET platform, to know how it dies in
>> .NET as opposed to Mono.
>>
>> Also, try the new version 3.2.x of mono which comes with a new garbage
>> collector, and post new results.
>>
>> On 19/12/13 15:29, Nicolas Antoniazzi wrote:
>> > I installed Visual Studio in a windows virtual machine.
>> >
>> > On a standard .Net platform, the same program uses 16MB of memory at
>> > initialization and adds approximately 20KB for each thread.
>> > It looks normal to me since the main goal of threads are to be light.
>> > It's like if threads were acting like a fork() for Mono.
>> >
>> > So, I'm still stuck with this problem at the moment :(
>> >
>> > 2013/12/19 Nicolas Antoniazzi <nicolas at codingame.com
>> > <mailto:nicolas at codingame.com>>
>> >
>> > I tried with version 2.10.8 and 3.0.6. Both leads to the same
>> > behavior. (Maybe gaining few KB with 3.0.6)
>> >
>> > Unfortunately, I do not have .Net development environment to test.
>> >
>> > Nicolas Antoniazzi
>> > CTO - CodinGame
>> > http://www.codingame.com <http://www.codingame.com/>
>> > +33 (0)4 67 13 00 96 <tel:%2B33%20%280%294%2067%2013%2000%2096>
>> >
>> >
>> > 2013/12/19 "Andrés G. Aragoneses" <knocte at gmail.com
>> > <mailto:knocte at gmail.com>>
>> >
>> > On 19/12/13 11:09, Nicolas Antoniazzi wrote:
>> > > Hi,
>> > >
>> > > I am using Mono in a virtualized environment with 512MB of
>> RAM.
>> > > I made a very simple program which starts 10 threads in a
>> loop and
>> > > apparently, every time that I start a new thread,
>> > approximately 65MB of
>> > > memory is used.
>> > >
>> > > In my case, I can run 5 threads, but for the 6th, the program
>> > crashes
>> > > (without any exception). 150MB are already consumed without
>> > the use of
>> > > any thread.
>> > >
>> > > Is it a normal behavior?
>> > >
>> > > Thanks!
>> >
>> > What version of mono are you using?
>> >
>> > Have you tried running your program under the .NET framework, to
>> > compare?
>> >
>> >
>> > _______________________________________________
>> > Mono-list maillist - Mono-list at lists.ximian.com
>> > <mailto:Mono-list at lists.ximian.com>
>> > http://lists.ximian.com/mailman/listinfo/mono-list
>> >
>> >
>> >
>> >
>> >
>> > _______________________________________________
>> > Mono-list maillist - Mono-list at lists.ximian.com
>> > http://lists.ximian.com/mailman/listinfo/mono-list
>> >
>>
>>
>> _______________________________________________
>> Mono-list maillist - Mono-list at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/mono-list
>>
>
>
> _______________________________________________
> Mono-list maillist - Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-list/attachments/20131221/10e827a8/attachment.html>
More information about the Mono-list
mailing list