libmicrohttpd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libmicrohttpd] pthread stack size


From: Christian Grothoff
Subject: Re: [libmicrohttpd] pthread stack size
Date: Sun, 19 Dec 2010 13:48:09 +0100
User-agent: KMail/1.13.5 (Linux/2.6.35-23-generic; KDE/4.5.1; i686; ; )

Hi!

I've added such an option (SVN 13930/13931).

Happy hacking,

Christian

On Saturday, December 18, 2010 11:51:02 pm Eivind Sarto wrote:
> When threads are created by libmicrohttpd, they are created with default
> thread attributes. The default thread stack is quite large.  It different
> on each architecture.  On x86_64, it is 10MB per thread. That starts
> adding up if you create a thread per connection and you have a lot of
> connections.
> 
> I am evaluating if I can use libmicrohttpd for a project that will require
> up to 10000 simultaneous connections. That would require 100GB of stacks.
> 
> I am adding an option MHD_OPTION_THREAD_STACK_SIZE to the library to allow
> threads to be created with less stack. That will allow me to run some
> simulations.
> 
> That option could be useful for others who will use lots of threads.
> Maybe it could be added to the sources?
> 
> -eivind



reply via email to

[Prev in Thread] Current Thread [Next in Thread]