FG

Does GNU/Linux counts processes and threads together when I limit their number?

Fresh3 days ago
Mar 15, 202612761 views
Confidence Score0%
0%

Problem

I want to limit the number of processes per user on my machine, with and the nproc value. I have read here that Linux dosen't distinguish between processes and threads? My current nproc limit per user is 1024, but if this includes also threads, it is too low in my point of view. The man-page of onl…

Error Output

#include <unistd.h>
#include <iostream>
#include <boost/thread.hpp>
using namespace std;

int counter;

void print_thread(int i) {
    counter++;
   …

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Does GNU/Linux counts processes and threads together when I limit their number?

Low Risk

The limit you are talking about applies to runnable entities, it is thus limiting threads (and therefore, processes containing them). Every process has at least one thread (the primary thread), so that only threads can be run. Strictly speaking, pro…

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment