Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If I run top on the guest, the load average values seem to be exactly the same as running top on the host.

Is a Docker (LXC) guest's load average the same as the host's load average?

share|improve this question
up vote 3 down vote accepted

Looking at the code for /proc/loadavg - yes, it's the same. The load average is read out from global variables.

      seq_printf(m, "%lu.%02lu %lu.%02lu %lu.%02lu %ld/%d %d\n",
              LOAD_INT(avnrun[0]), LOAD_FRAC(avnrun[0]),
              LOAD_INT(avnrun[1]), LOAD_FRAC(avnrun[1]),
              LOAD_INT(avnrun[2]), LOAD_FRAC(avnrun[2]),
              nr_running(), nr_threads,


void get_avenrun(unsigned long *loads, unsigned long offset, int shift)
        loads[0] = (avenrun[0] + offset) << shift;
        loads[1] = (avenrun[1] + offset) << shift;
        loads[2] = (avenrun[2] + offset) << shift;


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.