A rewording of the original problem:
We run OSF v3.2 in Lazy-Memory-Management mode, with the DEC supplied X-server,
Xdec, and Emacs-19.29 --with-x-toolkit. We noticed that, when an Emacs window
was up, both the Emacs process and Xdec were hogging the CPU. Since Xdec is
run with priority -2, other processes slowed down significantly. The problem
was clearly connected with Emacs, since Xdec by itself never showed this
behavior, and its CPU load would immediately diminish to normal usage when the
Emacs session was terminated.
This problem is not specific to Emacs 19.29 (or the compiler used to create
it). It persisted when we reinstalled Emacs 19.28 with all the patches
available from gatekeeper.dec.com:/pub/GNU. Following a suggestion from John
Kohl <jtk_at_atria.com>, who wrote the patches for Emacs 19.28, we even tried to
compile Emacs under OSF v2.0, and run the binaries under v3.2, to no avail.
We finally traced the problem to the use of the DISPLAY local:0. Since we had
thought it a good idea for Xdec to use shared memory, we had followed the
instructions in the Xservers file in /usr/lib/X11/xdm:
# to use the shared memory transport, change the :0 in the ":0 local"
# line to local:0 like this:
# local:0 local /usr/bin/X11/X
#
:0 local /usr/bin/X11/X -nice -2
Reverting to the original (:0 local) solved the problem.
If the DISPLAY :0 indeed does not use shared memory, we will now pay the price
of added memory utilization. It would be nice if DEC and/or FSF (which wrote
Emacs) resolve the problem. I attach below the top of the profile ran on Emacs
when it was gobbling up the CPU. (Without sources, I could not do the same for
Xdec.)
Thanks for all who commented.
Cheers -- Amos Yahil
Professor of Astrophysics
===============================================================================
Office: State University of New York
Astronomy Program, E.S.S. Bldg.
Stony Brook, NY 11794-2100, USA
Vox: 516-632-8224
Fax: 516-632-8240
E-mail: Amos.Yahil_at_sunysb.edu (always auto-forwarded)
Public keyID: C1B21A21
===============================================================================
Here is the profiling output from a session in which a number of fortran
routines were compiled from within Emacs, using M-x compile:
Profile listing generated Tue Jul 18 16:37:03 1995 with:
prof /usr/local/bin/emacs mon.out
----------------------------------------------------------------------------
* -p[rocedures] using pc-sampling; *
* sorted in descending order by total time spent in each procedure; *
* unexecuted procedures excluded *
----------------------------------------------------------------------------
Each sample covers 4.00 byte(s) for 0.00069% of 140.7939 seconds
%time seconds cum % cum sec procedure (file)
29.2 41.1768 29.2 41.18 wait_reading_process_input (process.c)
16.6 23.3730 45.8 64.55 read_avail_input (keyboard.c)
13.6 19.0928 59.4 83.64 input_available_signal (keyboard.c)
10.6 14.9912 70.1 98.63 XTread_socket (xterm.c)
8.2 11.5400 78.3 110.17 readable_events (keyboard.c)
4.9 6.8330 83.1 117.01 get_input_pending (keyboard.c)
4.0 5.6201 87.1 122.63 keyboard_bit_set (process.c)
4.0 5.5645 91.0 128.19 do_pending_window_change (dispnew.c)
2.5 3.5107 93.5 131.70 detect_input_pending (keyboard.c)
1.2 1.6992 94.7 133.40 set_waiting_for_input (keyboard.c)
Received on Mon Jul 24 1995 - 12:53:48 NZST