Die Antwort liegt darin man proc(5)
, hier ist der interessante Teil:
/proc/sys/kernel/threads-max (since Linux 2.3.11) This file specifies the system-wide limit on the number of threads (tasks) that can be created on the system. Since Linux 4.1, the value that can be written to threads-max is bounded. The minimum value that can be written is 20. The maximum value that can be written is given by the constant FUTEX_TID_MASK (0x3fffffff). If a value outside of this range is written to threads- max, the error EINVAL occurs. The value written is checked against the available RAM pages. If the thread structures would occupy too much (more than 1/8th) of the available RAM pages, threads- max is reduced accordingly.
Ich gehe davon aus, dass Ihre Kernel-Version> 4.1 ist. Da also 200000 (die Nummer, die Sie ausprobieren) kleiner als 0x3fffffff ist, sieht das Problem so aus, als wäre der verfügbare Arbeitsspeicher nicht ausreichend.