Threading limits

Ulrich Drepper drepper at redhat.com
Fri Dec 19 21:06:03 UTC 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Bevan C. Bennett wrote:

> Using the hand C-based "thread-limit" test, it looks like by default
> users can create 304 threads. If I use 'unlimit' to change the default
> stack size from 10240 to 'unlimited', this number increases to 1021 on
> fedora, but 1519 on taroon. I'd like to get it up closer to 10000...

Just do some basic math:

10MB stack/thread * 304 threads =~ 3GB stack

unlimited translates to 2MB (that's hardcoded)

2MB stack/thread * 1519 threads =~ 3GB stack


If you don't like limited stacks, use a 64bit platform.  Otherwise use
the function which is part of Unix for ages: pthread_attr_setstacksize.

- -- 
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/42g72ijCOnn/RHQRAqXIAKCWt0APhk7dIbRpVVQHyzBuGclWcwCfa8uD
XiDY9qrQKWQAcr2y3fN9Zv4=
=/bDY
-----END PGP SIGNATURE-----





More information about the fedora-list mailing list