Work out max processes limit instantly with clear inputs, formula shown and shareable results.
Linux counts threads as tasks against pid_max and against the nproc rlimit, so a modest process count with many threads each can exhaust the PID space. Each task also carries a kernel stack — typically 16 KB — which is unswappable, so 12,000 tasks consume nearly 200 MB of kernel memory before any user allocation.
Task budget
total tasks = processes x threads per process; kernel stack memory = tasks x stack size; compare against pid_max
Usually the nproc rlimit or pid_max rather than memory. Both count threads, so a thread-heavy application hits them long before RAM is exhausted.
Beyond core count it adds scheduling and memory overhead without throughput. Async or event-driven designs handle high concurrency with far fewer tasks.