-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
First of all: What error message do you get? How much memory do you have
in the system? What is the output of uname -a on your system?
On my system, this program easily goes to 10000, although it demands a
lot of memory. You may want to specify a lower stack size, like this:
java -Xss150k DieLikeADog
Also, make sure you have sufficient memory available, basically the
number of threads * memory required for an empty thread. Since each
thread seems to take about 100k, this boils down to at least a GiB for
10k threads. YMMV. Note that on a 32-bit architecture, you will run out
of address space long before running out of actual memory. While you
could do crazy things with fork, I *strongly* recommend you use a 64-bit
architecture.
If you plan on having a quadruple-digits number of threads, I suggest
you either rewrite your code to use threadpools or use really fast
hardware with lots of memory (say, 10GiB)..
- -- Philipp
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iEYEAREKAAYFAk7KR2EACgkQ9eq1gvr7CFya0QCgmuvhMyqwf0M3bnxSIaMYCiWq
P+sAnR8eoOQYirEeiV4bQmb4R6GdEIha
=3fyc
-----END PGP SIGNATURE-----
Archive:
http://lists.debian.org/4ECA4761...@phihag.de