When the Unix load average was added to Unix
For reasons beyond the scope of this entry itself, I recently became curious about when the concept of 'load average' first appeared in Unix. Fortunately we have the Unix tree from the Unix Heritage Society, so I can answer this question by digging through various historical Unix trees.
The answer appears to be that the concept of load average appears
first in 3BSD. In
the 3BSD /usr/src/cmd
directory,
uptime.c
is allegedly dated to October 4th 1979. The 3BSD kernel
source for vmsched.c
already has the normal definition of load average; it counts both
runnable processes and processes waiting in uninterruptible sleep
(which is theoretically always a short term thing). I believe that
3BSD also marks the appearance of vmstat
.
As far as I can tell, V7 Unix lacked both an uptime
command and
any kernel support for accumulating the information. I was going
to say that V7 didn't have any way to see how loaded your system
was, but it does have a basic version of iostat
and the kernel kept some degree of information about things like
system versus user time, as you can see from the iostat manpage.
My personal suspicion is that 3BSD grew support for keeping track
of how loaded the system was (via both uptime
and the more detailed
vmstat
) because Berkeley started using 3BSD for undergraduate
computing in student labs, where you could not simply ask your
colleagues if someone was running something big and could they stop
for a while if so. But I don't actually know if Berkeley was using
3BSD in undergrad labs this early on or if they only started doing
it a few years later with 4BSD et al.
(UCB may also have wanted to have some idea of how well their new paged virtual memory system was working in practice.)
As as side note, I do like the BUGS
section of the 3BSD vmstat
manual page
(at the end):
So many numbers print out that its sometimes hard to figure out what to watch.
This has only become more true over time.
|
|