public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Gmake is slow under cygwin
@ 2001-03-09  9:44 Marcus A Martin
  2001-03-09  9:57 ` Larry Hall (RFK Partners, Inc)
  2001-03-09 12:34 ` Jonathan Kamens
  0 siblings, 2 replies; 21+ messages in thread
From: Marcus A Martin @ 2001-03-09  9:44 UTC (permalink / raw)
  To: cygwin

I am writting a build environment for a large progect. We use gmake to
compile or code on linux, SGI and windows 2k (via cygwin). While the build
environment can do all the preprocessing before a build very quickly on the
unix boxes, it can take up to 2 minutes on a windows box. This is a serious
diffence.

To give you an idea of what might be causing the problem, here is what our
make system does. When you execute make, it calls a find command to find all
the files called localdefs.mk. Each localdefs.mk file contains a list of
source files, defines the target as a library or an application, identifies
any exported headers, and then calls a make template. The make template
contains the rules on how everything is built. All of the localdefs.mk files
are processed in memory, then make begins the compilation of any file that
needs to be built.

The initial find takes 2-5 seconds but each localdefs.mk file takes 1-2
seconds to process in memory under a cygwin/windows box.  With about 150
libraries and applications, the time really adds up. Do you have any ideas
as to how I can accelerate the windows performance?

Thanks for the help,

Marcus

--------------------------------------------------------------
A program should follow the 'Law of Least Astonishment'.
What is this law?  It is simply that the program should
 always respond to the user in the way that astonishes him least.



--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 21+ messages in thread
* RE: Gmake is slow under cygwin
@ 2001-03-12 14:54 Heribert Dahms
  2001-03-12 15:03 ` John Pollock
  0 siblings, 1 reply; 21+ messages in thread
From: Heribert Dahms @ 2001-03-12 14:54 UTC (permalink / raw)
  To: 'John Pollock', cygwin

Hi John,

can you please check the URL? I get "Not found",
also for http://www.mga.au.com/presentations/tune_nt
and http://www.mga.au.com/presentations
and there seems no search feature either...

Bye, Heribert (heribert_dahms@icon-gmbh.de)

> -----Original Message-----
> From:	John Pollock [SMTP:jpollock@curl.com]
> Sent:	Monday, March 12, 2001 23:35
> To:	cygwin@sourceware.cygnus.com
> Subject:	Re: Gmake is slow under cygwin
> 
	[Heribert]  [snip]

> - Stop NT from recording the LastAccessTimeStamp for every file accessed.
> ( http://www.mga.au.com/presentations/tune_nt/tsld039.htm ).  Most of the
> time you
> don't need this info, and when many files are touched in a short burst
> (i.e.
> during make) this change can help.
> 

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 21+ messages in thread
* Re: Gmake is slow under cygwin
@ 2001-03-12 14:35 John Pollock
  0 siblings, 0 replies; 21+ messages in thread
From: John Pollock @ 2001-03-12 14:35 UTC (permalink / raw)
  To: cygwin

>Finally, we did some Windows NT performance tweaking, some of which
>might also be applicable on Windows NT.  Perhaps my colleague John
>Pollack, who did that work, can provide more details :-).

Oh, you mean me -- i never realized i spelled my name wrong.  ;)

The single-largest performance enhancement we made was to start using
the -j2 job flag (since our machines are dual-CPUs).  This knocked about
1/2 hour off the build time, a 30-40% improvement, although has had the side
effect of occasionally causing make to hang (see jonathan's earlier emails on
this subject).  However, in terms of tweaks, i employed some registry hacks
which knocked another 15 or so minutes off the total build time (these hacks all
appear to work for Win2k as well).

**NOTE**: these are all "caveat emptor"; they may help your situation, but you
should employ them one at a time and gauge a) their effectiveness for you, and
b) their stability (optimizing memory utilization can be somewhat dangerous).
Use them carefully, especially the first two below!

- Change the IoPageLockLimit to a more reasonable setting (see
http://www.jsiinc.com/TIP0100/rh0155.htm ).  This allows intensive I/O operations
to take better advantage of more memory, if it exists. In our case, our build
servers have 1GB of RAM, so there's quite a bit to take advantage of.  But you
have to be careful doing this; if you extend the value beyond the limits of
physical memory your machine can become unstable (the article outlines this, i
think, and gives guidelines as to what values to set depending on how much RAM
you have)

- Enable LargeSystemCache.  For machines with a lot of RAM this enables Windows
to create a larger system cache using available physical memory, which can speed
up both I/O and file operations.

- Stop NT from recording the LastAccessTimeStamp for every file accessed.
( http://www.mga.au.com/presentations/tune_nt/tsld039.htm ).  Most of the time you
don't need this info, and when many files are touched in a short burst (i.e.
during make) this change can help.

- create a secondary pagefile on a different partition (preferably a different
physical drive) than the partition containing the build directory.  NT/Win2k are
programmed to determine which pagefile is most optimal to use (i.e. on the
partition least involved in I/O).

- Use Windows 2000 instead of Windows NT.  i haven't figured out why yet, but
our overall build time has been reduced about 10-15 minutes via this change.  It
may be because SP3 for NT 4.0 changed the way that the general memory heap was
allocated in a sub-optimal way, and Win2k doesn't have this problem.

In addition, i've considered stopping the NTExecutive from paging to disk
altogether.  Some device drivers will page to disk even if they don't need to;
it's just the way they were written.  But i haven't tried this yet, and doubt it
would have a huge impact on our build times.

Cheers,
John


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 21+ messages in thread
* RE: gmake is slow under cygwin
@ 2000-09-26 12:57 Scott Carter
  2000-09-26 16:49 ` Chris Faylor
  0 siblings, 1 reply; 21+ messages in thread
From: Scott Carter @ 2000-09-26 12:57 UTC (permalink / raw)
  To: 'Gabriel Zachmann', cygwin

I haven't had this problem in my makefiles, but yesterday I happened to be
trying out a makefile that someone else sent me, and I experienced a *huge*
delay. I haven't tried to analyze it, but I did observe this. When the VPATH
is set to any of the following (which, by the way, don't work correctly in
the test makefile) 

VPATH = c:/temp/test/source
VPATH = /cygdrive/c/temp/test/source
VPATH = //c/temp/test/source

There is no long delay. When VPATH is set to this (which is incorrect)

VPATH = //cygdrive/c/temp/test/source

and I do 

make -d

make spits out
-----------------------------------
GNU Make version 3.79, by Richard Stallman and Roland McGrath.
Built for i686-pc-cygwin
Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99
        Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

Report bugs to <bug-make@gnu.org>.

Reading makefiles...
Reading makefile `makefile'...
-----------------------------------

and then stalls for about 7 seconds before continuing. I have no idea if you
have a bad VPATH in your makefiles, but this example illustrates that some
errors can cause large delays, and yet otherwise not be reported as errors.

I don't know if any of the following suggestions will appreciably speed up
processing, but I know they relieve make of having to examine a lot of
dead-end possibilities. [NOTE that these may not be desirable/usable in all
circumstances.]

1) Use .PHONY: for all targets that don't correspond to real files.
2) Use .SUFFIXES:#blank to delete all known default suffixes.
3) Add an empty rule (no dependencies, no commands) for "makefile" and any
files it includes.

Good luck
Scott Carter
Software Engineer

-----Original Message-----
From: Gabriel Zachmann [ mailto:zach@igd.fhg.de ]
Sent: Monday, September 25, 2000 03:49 AM
To: cygwin@sources.redhat.com
Subject: Re: gmake is slow under cygwin


] --- Gabriel Zachmann <zach@igd.fhg.de> wrote:
] > 
] > Any ideas or insights will be highly appreciated,
] > Gab.
] > 
] 
] Any virus scanners running?  See the FAQ.
] 

(Hm, the FAQ didn't say that a virus scanner could incur a performance
penalty, it just said that it might prevent cygwin from functioning ;-)

Ok, I switched McAffee off.
But that reduced execution time only by about 1 sec:
-  with mcaffee running: real time = 7.4 sec, user time = 3.1 sec;
-  mcaffee not running: real = 6 sec, user time = 2.8 sec

That still seems pretty slow for just a few 100 lines of makefiles,
doesn't it?

Cheers,
Gab.


-- 
/---------------------------------------------------------------------\
| Paradigm is a word too often used by those                          |
| who would like to have a new idea                                   |
| but cannot think of one.                                            |
|                     (Mervyn King, Deputy Governor, Bank of England) |
|                                                                     |
| zach@igd.fhg.de          gab@gab.cx        Gabriel.Zachmann@gmx.net |
| www.igd.fhg.de/~zach/    www.gab.cx        __@/'                    |
\---------------------------------------------------------------------/

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 21+ messages in thread
* Re: gmake is slow under cygwin
@ 2000-09-26  6:25 Earnie Boyd
  0 siblings, 0 replies; 21+ messages in thread
From: Earnie Boyd @ 2000-09-26  6:25 UTC (permalink / raw)
  To: Gabriel Zachmann, cygwin

--- Gabriel Zachmann <zach@igd.fhg.de> wrote:
> ] --- Gabriel Zachmann <zach@igd.fhg.de> wrote:
> ] > 
> ] > Any ideas or insights will be highly appreciated,
> ] > Gab.
> ] > 
> ] 
> ] Any virus scanners running?  See the FAQ.
> ] 
> 
> (Hm, the FAQ didn't say that a virus scanner could incur a performance
> penalty, it just said that it might prevent cygwin from functioning ;-)
> 
> Ok, I switched McAffee off.
> But that reduced execution time only by about 1 sec:
> -  with mcaffee running: real time = 7.4 sec, user time = 3.1 sec;
> -  mcaffee not running: real = 6 sec, user time = 2.8 sec
> 
> That still seems pretty slow for just a few 100 lines of makefiles,
> doesn't it?
> 

You don't say what you're executing, but doing `/bin/time -v ls -l /bin' I get:
        Command being timed: "ls -l /bin"
        User time (seconds): 0.45
        System time (seconds): 0.29
        Percent of CPU this job got: 17%
        Elapsed (wall clock) time (h:mm:ss or m:ss): 0:04.21
        Average shared text size (kbytes): 0
        Average unshared data size (kbytes): 0
        Average stack size (kbytes): 0
        Average total size (kbytes): 0
        Maximum resident set size (kbytes): 0
        Average resident set size (kbytes): 0
        Major (requiring I/O) page faults: 0
        Minor (reclaiming a frame) page faults: 0
        Voluntary context switches: 0
        Involuntary context switches: 0
        Swaps: 0
        File system inputs: 0
        File system outputs: 0
        Socket messages sent: 0
        Socket messages received: 0
        Signals delivered: 0
        Page size (bytes): 4096
        Exit status: 0
So it appears to be you're setup.  I'm using NT4sp4, Cygwin-1.1.4.  The output
of `cygcheck -s -r -v' pasted in a mail and sent to the list might be useful.

Cheers,

=====
--- < http://earniesystems.safeshopper.com > ---
   Earnie Boyd: < mailto:earnie_boyd@yahoo.com >
            __Cygwin: POSIX on Windows__
Cygwin Newbies: < http://gw32.freeyellow.com/ >
           __Minimalist GNU for Windows__
    Mingw Home: < http://www.mingw.org/ >

__________________________________________________
Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
http://im.yahoo.com/

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 21+ messages in thread
* Re: gmake is slow under cygwin
@ 2000-09-22  7:55 Earnie Boyd
  2000-09-25  2:49 ` Gabriel Zachmann
  0 siblings, 1 reply; 21+ messages in thread
From: Earnie Boyd @ 2000-09-22  7:55 UTC (permalink / raw)
  To: Gabriel Zachmann, cygwin

--- Gabriel Zachmann <zach@igd.fhg.de> wrote:
> 
> Any ideas or insights will be highly appreciated,
> Gab.
> 

Any virus scanners running?  See the FAQ.

Cheers,

=====
--- < http://earniesystems.safeshopper.com > ---
   Earnie Boyd: < mailto:earnie_boyd@yahoo.com >
            __Cygwin: POSIX on Windows__
Cygwin Newbies: < http://gw32.freeyellow.com/ >
           __Minimalist GNU for Windows__
    Mingw Home: < http://www.mingw.org/ >

__________________________________________________
Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
http://im.yahoo.com/

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 21+ messages in thread
* gmake is slow under cygwin
@ 2000-09-22  2:41 Gabriel Zachmann
  0 siblings, 0 replies; 21+ messages in thread
From: Gabriel Zachmann @ 2000-09-22  2:41 UTC (permalink / raw)
  To: cygwin

Does some kind soul have any idea,
why gmake (3.79) is so slow under cygwin (vers 1.1.4).
The machine is a dual P3/600MHz with Windows2000.
All the makefiles are on a local drive (about 800 lines total),
and I'm making a very simple target, which just prints some makefile
variables.

Maybe the problem is not gmake itself, mnaybe it's cygwin,
maybe its win2000, maybe ...

What's funny is that cygwin's 'time' command tells me that, for instance,
user time is only 1.5 sec but real time is 10 sec!
But on our unix boxes (which have slower processors) make is much faster.

I have one target, which just echo's some 20 makefile variables,
and one can actually *see* each line being echo'ed ...

The cygwin installation itself was done with the setup.exe,
and I don't recall any problems or err messages.

Any ideas or insights will be highly appreciated,
Gab.

-- 
/---------------------------------------------------------------------\
| What if you slept?  And what if, in your sleep, you dreamed?        |
| And what if, in your dream, you went to heaven and there plucked a  |
| strange and beautiful flower?  And what if, when you awoke,         |
| you had the flower in your hand?  Ah, what then?        (Coleridge) |
|                                                                     |
| zach@igd.fhg.de          gab@gab.cx        Gabriel.Zachmann@gmx.net |
| www.igd.fhg.de/~zach/    www.gab.cx        __@/'                    |
\---------------------------------------------------------------------/

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

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

end of thread, other threads:[~2001-03-12 15:03 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-09  9:44 Gmake is slow under cygwin Marcus A Martin
2001-03-09  9:57 ` Larry Hall (RFK Partners, Inc)
2001-03-09 11:34   ` Marcus A Martin
2001-03-09 11:44     ` Larry Hall (RFK Partners, Inc)
2001-03-09 11:57       ` Chad Loder
2001-03-09 12:05         ` Marcus A Martin
2001-03-09 12:34 ` Jonathan Kamens
  -- strict thread matches above, loose matches on Subject: below --
2001-03-12 14:54 Heribert Dahms
2001-03-12 15:03 ` John Pollock
2001-03-12 14:35 John Pollock
2000-09-26 12:57 gmake " Scott Carter
2000-09-26 16:49 ` Chris Faylor
2000-09-26 20:56   ` Jeffrey Juliano
2000-09-26 21:28     ` Chris Faylor
2000-09-28  7:53       ` Jeffrey Juliano
2000-10-03  7:15       ` Fergus Henderson
2000-10-03  8:27         ` Chris Faylor
2000-09-26  6:25 Earnie Boyd
2000-09-22  7:55 Earnie Boyd
2000-09-25  2:49 ` Gabriel Zachmann
2000-09-22  2:41 Gabriel Zachmann

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).