unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* emacs-24.x "make install" issues
@ 2013-03-02 23:28 Nelson H. F. Beebe
  2013-03-03  0:16 ` Paul Eggert
  0 siblings, 1 reply; 6+ messages in thread
From: Nelson H. F. Beebe @ 2013-03-02 23:28 UTC (permalink / raw)
  To: emacs-devel; +Cc: beebe

For people like me who need to install emacs releases on multiple
platforms, there is a serious performance and synchronization problem
with the "make install" step.

Most of the work in that step involves installing files into
$prefix/share/emacs/x.y.z/, and because that directory is shared
across platforms, it is unwise to attempt a "make install" on more
than one machine at a time.  If you do, you will very likely get
complaints about corrupted files.

On a fast fileserver with natives disks, the "make install" takes only
about a minute.  However, on remote machines with a common fileserver,
I see "make install" times that run to tens of minutes, and because
those jobs must be run sequentially, completing "make install" across
my 25 or so flavors of Unix takes several painful hours.

I think that the "make install" step could, and should, be modified as
follows:

	On "make install", create a new empty lock file, called, say,
	INSTALLED, but if it already exists, skip entirely the
	installs into the $prefix/share/emacs/x.y.z/ tree.

	In order to detect races, instead of making it an empty file,
	make it hold the installer's hostname.  Then the install step
	could check after creating it that it contained the expected
	string:

		test -f INSTALLED && exit
		test -f INSTALLED || hostname > INSTALLED
		test "`cat INSTALLED`" = "`hostname`" || exit

That way, the first "make install" would would run to completion as it
currently does, and all of the remaining "make install" runs on other
machines would only install the platform-dependent files in
$prefix/bin (and possibly other places).  Those "make install" runs
could then proceed in parallel, and with care about which machine was
done first, all of them could complete in a couple of minutes, instead
of taking many hours.

I wish also to request that the gzipping of installed files be made
optional, e.g., controlled by an environment variable.  It is by far
the most time-consuming part of the "make install", and for
emacs-24.2.92, the disk space required grows from 88MB to 124MB if the
gzip compression is subsequently undone.  With today's disk sizes,
that is a minor difference that I'd be happy to give up, saving time
in the future for every emacs library loaded dynamically into an
editor session.

For environments where space is still at a premium (e.g., mobile and
embedded devices), consider switching to "xz -9" compression (and
supporting the loading of .el.xz files).  When I did that, the *.el.gz
file space dropped from 88MB to 83M.

-------------------------------------------------------------------------------
- Nelson H. F. Beebe                    Tel: +1 801 581 5254                  -
- University of Utah                    FAX: +1 801 581 4148                  -
- Department of Mathematics, 110 LCB    Internet e-mail: beebe@math.utah.edu  -
- 155 S 1400 E RM 233                       beebe@acm.org  beebe@computer.org -
- Salt Lake City, UT 84112-0090, USA    URL: http://www.math.utah.edu/~beebe/ -
-------------------------------------------------------------------------------



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: emacs-24.x "make install" issues
  2013-03-02 23:28 emacs-24.x "make install" issues Nelson H. F. Beebe
@ 2013-03-03  0:16 ` Paul Eggert
  2013-03-03  2:15   ` Glenn Morris
  0 siblings, 1 reply; 6+ messages in thread
From: Paul Eggert @ 2013-03-03  0:16 UTC (permalink / raw)
  To: Nelson H. F. Beebe; +Cc: emacs-devel

On 03/02/2013 03:28 PM, Nelson H. F. Beebe wrote:
> 		test -f INSTALLED || hostname > INSTALLED
> 		test "`cat INSTALLED`" = "`hostname`" || exit
> 

This has races of its own, since creating INSTALLED is not
an atomic operation.

Could you instead invoke "make install" on just one host,
and "make install-arch-dep" on the remaining platforms?
That should install just one copy of the architecture-independent
files.  If this doesn't work now, perhaps we should make it work,
or add another makefile rule that would work.

> With today's disk sizes,
> that is a minor difference that I'd be happy to give up, saving time
> in the future for every emacs library loaded dynamically into an
> editor session.

It may make sense to have a build-time option to not compress,
bit I thought the point of compressing was to improve performance
more than to save disk space, since these days CPU cycles are
often cheap compared to I/O.  Have you measured the performance of
Emacs startup with and without compression, if the startup files are
cached and/or not cached?




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: emacs-24.x "make install" issues
  2013-03-03  0:16 ` Paul Eggert
@ 2013-03-03  2:15   ` Glenn Morris
  2013-03-03  9:04     ` Óscar Fuentes
  0 siblings, 1 reply; 6+ messages in thread
From: Glenn Morris @ 2013-03-03  2:15 UTC (permalink / raw)
  To: Paul Eggert; +Cc: Nelson H. F. Beebe, emacs-devel

Paul Eggert wrote:

> If this doesn't work now, perhaps we should make it work, or add
> another makefile rule that would work.

I don't think the Emacs Makefile needs to cater to this situation any
more than it does now.

> It may make sense to have a build-time option to not compress,

We've been over this
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9789

As you said there:
make GZIP_PROG= install

works fine



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: emacs-24.x "make install" issues
  2013-03-03  2:15   ` Glenn Morris
@ 2013-03-03  9:04     ` Óscar Fuentes
  2013-03-06  6:27       ` Paul Eggert
  0 siblings, 1 reply; 6+ messages in thread
From: Óscar Fuentes @ 2013-03-03  9:04 UTC (permalink / raw)
  To: emacs-devel

Glenn Morris <rgm@gnu.org> writes:

>> It may make sense to have a build-time option to not compress,
>
> We've been over this
> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9789
>
> As you said there:
> make GZIP_PROG= install
>
> works fine

Where is it documented? There is not mention of it on INSTALL.




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: emacs-24.x "make install" issues
@ 2013-03-05  0:51 Nelson H. F. Beebe
  0 siblings, 0 replies; 6+ messages in thread
From: Nelson H. F. Beebe @ 2013-03-05  0:51 UTC (permalink / raw)
  To: Glenn Morris; +Cc: Paul Eggert, Nelson H. F. Beebe, emacs-devel

>> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9789
>>
>> make GZIP_PROG= install

Thanks for the pointer to that!

I do the "make install" step through a private script on all platforms
that installs emacs as "nemacs" (for new emacs), so as not to break
existing things.  

It is trivial to add the setting of GZIP_PROG to that script, and I've
already done so on one system to test it (it works as claimed).
However, as Paul suggested, it is worth timing emacs startup with and
without compression of library files.

On the subject of avoiding repeated unnecessary installs of the *.el
files, I notice that the Makefile has

	install: all install-arch-indep install-doc install-arch-dep blessmail

Thus, the desired separation into separate steps is already there, and
another simple adjustment to my installation wrapper can easily skip
the install-arch-indep and install-doc targets.

Thanks, folks, for the quick feedback!

[P.S. I already responded separately to Paul Eggert that a minor tweak
to his proposed patch for the sys/sysdep.c compilation failures on
MirBSD and OpenBSD 4.9 solved the build problems for those two
systems.]


-------------------------------------------------------------------------------
- Nelson H. F. Beebe                    Tel: +1 801 581 5254                  -
- University of Utah                    FAX: +1 801 581 4148                  -
- Department of Mathematics, 110 LCB    Internet e-mail: beebe@math.utah.edu  -
- 155 S 1400 E RM 233                       beebe@acm.org  beebe@computer.org -
- Salt Lake City, UT 84112-0090, USA    URL: http://www.math.utah.edu/~beebe/ -
-------------------------------------------------------------------------------



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: emacs-24.x "make install" issues
  2013-03-03  9:04     ` Óscar Fuentes
@ 2013-03-06  6:27       ` Paul Eggert
  0 siblings, 0 replies; 6+ messages in thread
From: Paul Eggert @ 2013-03-06  6:27 UTC (permalink / raw)
  To: Óscar Fuentes; +Cc: emacs-devel

On 03/03/2013 01:04 AM, Óscar Fuentes wrote:
> Where is it documented? There is not mention of it on INSTALL.

I added something in trunk bzr 111951.



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-03-06  6:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-02 23:28 emacs-24.x "make install" issues Nelson H. F. Beebe
2013-03-03  0:16 ` Paul Eggert
2013-03-03  2:15   ` Glenn Morris
2013-03-03  9:04     ` Óscar Fuentes
2013-03-06  6:27       ` Paul Eggert
  -- strict thread matches above, loose matches on Subject: below --
2013-03-05  0:51 Nelson H. F. Beebe

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).