[comp.emacs] GNU Emacs performance - some data

Karl.Kleinpaste@cbstr1.att.com (05/28/87)

In-reply-to: todd@uhccux.UUCP's message of 26 May 87 06:31:49 GMT


todd@uhccux.UUCP writes:
>  I'd also like to
>  know if anyone has seriously looked at the resources used by GNU EMACS.

It's a very good question, so I headed for the nightly accounting logs
produced by this system and grep'd them for appropriate things.  On
this system, we have vi, GNU Emacs, Montgomery's emacs, Gosling's
gmacs, and mg (MicroGNU).  (Good grief.)  As it turns out, mg is
almost unused, so I won't include it in here.

Below are the output of an assortment of greps from the nightly acct
logs in /usr/adm/acct/sum, slightly reformatted to fit into 80
columns.  This system is a 3B15 running SysV Rel 2.1.1 (paging) with
16Mb main memory installed.  (It's been rather lightly loaded until
very recently; we have yet to exercise the kernel's paging code.)

Just so you know the raw weight of each of these programs, here's what
size(1) has to say:
	gnumacs: 269888 + 280816 +     0 = 550704
	vi:      126564 +   7560 + 26176 = 160300
	gmacs:   148984 +  93844 + 13816 = 256644
	emacs:   79356  +   7664 + 32628 = 119648

                         TOTAL COMMAND SUMMARY
COMMAND  NUM   TOTAL   TOTAL    TOTAL    MEAN    MEAN  HOG     CHARS  BLOCKS
NAME    CMDS KCOREMIN CPU-MIN REAL-MIN  SIZE-K CPU-MIN FACTOR TRNSFD   READ
  (22 May)
gnumacs   40 17678.26  24.15   812.28   732.15   0.60   0.03  4316978  3002
vi       279  3534.14  20.20  1043.58   174.94   0.07   0.02 20365783  5399
gmacs      4    67.67   0.35     5.47   194.27   0.09   0.06    47712  269
emacs     61   828.55   7.24   432.31   114.37   0.12   0.02  7772016  4230
  (27 May)
gnumacs   59 14531.50  19.29   665.99   753.27   0.33   0.03  3358904  3954
vi       331  2581.03  15.38  1558.04   167.86   0.05   0.01 20773607  6568
gmacs     26   724.45   2.92    52.80   247.93   0.11   0.06  2990968  3269
emacs     46   598.75   5.21   287.28   114.85   0.11   0.02  2646160  2839
  (28 May)
gnumacs   15 11720.81  14.24   563.77   823.38   0.95   0.03  2561424  2570
vi       283  2479.29  14.76  1465.80   167.93   0.05   0.01 18504469  6062
gmacs     12  1316.78   4.40   119.31   299.43   0.37   0.04  3834112  2251
emacs     69   486.71   4.47   161.18   108.88   0.06   0.03  3231208  2512

Notice that vi is used many more times than any of the emacses; this
is because people do so much in GNU Emacs, in particular.  I am not
the only person in this dept using GNU Emacs for reading/writing
mail/news, running subshells when on dumb terminals in need of an
approximation to windowing, and editing Lisp code in special ways with
the supplied major modes.  People tend to get into vi for a little
while and get back out.

GNU Emacs uses a higher proportion of the CPU during its execution, as
the "total cpu-min" column shows.  It's also physically huge, close to
5x any of the others ("mean size-k").  Its "hog factor" (a somewhat
fuzzy notion of how badly it abuses the CPU) is worse than vi, but
only half that of Gosling emacs.  This is especially true if you
consider how much data GNU Emacs pushes around as compared to
Gosling's ("chars trnsfd" and "blocks read").

Note also that GNU Emacs invocations tend to sit around a lot; for 7
times as many invocations, vi had only an extra 50% "total real-min."
I am a prime contributor to that, as I always have a GNU Emacs lying
around in some window.

>  My offhand response is that it seems to be a hog of program.

You betcha, no doubt about it.  Now, consider what it was like on SysV
VAXen a year ago, when unexec() not only didn't push Lisp code into a
sharable text segment, but the text segment itself was not shared.  On
VAXen with only 4Mb.  Swapping SysV.0.  Twenty-plus users.  Egads, my
sysadmin didn't like that.  Things are *much* nicer now.

>  But that seems reasonable
>  since, as the person who asked the question said, EMACS users tend
>  to do "everything" from within EMACS.

Also true.  It's a big, beastly, monstrous brute of a program, and I
don't mind it one bit.  Any reasonable paging version of UNIX copes
very well with it, and even swapping versions don't mind too much -
startup is just an extra second or so slower (real time).

Karl