Nb of proc use by consul

Hi everyone,

I got a little concern about how many resource consul (server and agent) going to use, because I’m running consul in a lxc container, and with lxc the “vm” can see all the proc from the host. So in

consul info

I can see

        arch = amd64
        cpu_count = 96
        goroutines = 137
        max_procs = 96

But I don’t want consul to eat all the proc of the 96 core I got on the host

Is they are any way to fix the number of core ?


Hi @jas01,

Based on some quick googling, I believe you should be able to use the following lxc command to limit the number of CPUs exposed to the container.

$ lxc config set container_name limits.cpu 2

Thanks, I know that, but I’m sure it will work. Sometime ago I’m running some uWSGI software who detect (don’t know how) the number of CPU on the host and it launch 2x threads. So for something who answer 1 web request every hour I’ve a 96 threads.

But maybe consul are more intelligent. I will test and tell you.