[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] pthread stack size
From: |
Eivind Sarto |
Subject: |
[libmicrohttpd] pthread stack size |
Date: |
Sat, 18 Dec 2010 17:51:02 -0500 |
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
- [libmicrohttpd] pthread stack size,
Eivind Sarto <=