home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!haven.umd.edu!decuac!pa.dec.com!mogul
- From: mogul@pa.dec.com (Jeffrey Mogul)
- Newsgroups: comp.unix.ultrix
- Subject: Re: Any way to do a faster link??
- Date: 12 Jan 1993 00:40:19 GMT
- Organization: DEC Western Research
- Lines: 38
- Message-ID: <1it41jINNrjb@usenet.pa.dec.com>
- References: <1iqm8b$807@agate.berkeley.edu> <9301110245.AA08082@TIS.COM>
- NNTP-Posting-Host: jove.pa.dec.com
-
- In article <9301110245.AA08082@TIS.COM> mjr@TIS.COM writes:
- >>I need to know if there is any way to speed up compile time on a DECstation
- >>5000? The bottle neck seems to be the linking portion of the compile cycle,
- >>especially, if some of the libraries are coming off of NFS.
- >
- > NFS is the problem here. One gross kludge would be to have your
- >makefile maintain *copies* of the library on local disk. I have done this
- >in the past, and while it's *ugly* it works. I.e.:
-
- What Marcus says is probably true, but it's not necessarily the whole
- truth. His changes avoid some NFS read operations, which are marginally
- slower than reading from a local disk, but probably not so much slower
- (unless your NFS server is wimpy) that they account for the entire
- problem.
-
- If your working directory is also NFS-mounted, then the real problem
- may be that NFS writes are awfully slow. You can speed things up by
- installing PrestoServe on your NFS server, or by using NFS server code
- that does "write-gathering" (such as comes in ULTRIX 4.3), but the
- specific problem is that the loader tends to do all sorts of
- random-access writes to the final output file. I think this is worse
- when lots of libraries are involved, since many more symbol references
- get resolved.
-
- What I sometimes do is:
-
- foo: /tmp/foo
- cp /tmp/foo foo
- rm /tmp/foo
-
- /tmp/foo: foo.o $(LIBS)
- cc -o /tmp/foo foo.o $(LIBS)
-
- Believe it or not, this can run twice as fast as the more direct
- method (especially when lots of X libraries are used) because the
- "cp" command does the NFS I/Os in nice big chunks.
-
- -Jeff
-