Ответ лежит в man proc(5)
, вот интересная часть:
/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.
Я предполагаю, что ваша версия ядра> 4.1, поэтому, поскольку 200000 (число, которое вы пытаетесь) меньше 0x3fffffff, проблема выглядит как доступная оперативная память в недостаточном количестве.