home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.c      Meh, in C you gotta define EVERYTHING      243,242 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 241,685 of 243,242   
   vallor to Keith Thompson   
   Re: New and improved version of cdecl   
   30 Oct 25 04:52:50   
   
   From: vallor@vallor.earth   
      
   At Wed, 29 Oct 2025 21:24:34 -0700, Keith Thompson  wrote:   
      
   > antispam@fricas.org (Waldek Hebisch) writes:   
   > [...]   
   > > Assuming that you have enough RAM you should try at least using   
   > > 'make -j 3', that is allow make to use up to 3 jobs.  I wrote   
   > > at least, because AFAIK cheapest PC CPU-s of reasonable age   
   > > have at least 2 cores, so to fully utilize the machine you   
   > > need at least 2 jobs.  3 is better, because some jobs may wait   
   > > for I/O.   
   >   
   > I haven't been using make's "-j" option for most of my builds.   
   > I'm going to start doing so now (updating my wrapper script).   
   >   
   > I initially tried replacing "make" by "make -j", with no numeric   
   > argument.  The result was that my system nearly froze (the load   
   > average went up to nearly 200).  It even invoked the infamous OOM   
   > killer.  "make -j" tells make to use as many parallel processes   
   > as possible.   
   >   
   > "make -j $(nproc)" is much better.  The "nproc" command reports the   
   > number of available processing units.  Experiments with a fairly   
   > large build show that arguments to "-j" larger than $(nproc) do   
   > not speed things up (on a fairly old machine with nproc=4).  I had   
   > speculated that "make -n 5" might be worthwhile of some processes   
   > were I/O-bound, but that doesn't appear to be the case.   
   >   
   > This applies to GNU make.  There are other "make" implementations   
   > which may or may not have a similar feature.   
   >   
   > [...]   
      
   I cloned the cdecl archive to ramdisk and timed the installation commands:   
      
   $ time -p ./bootstrap   
   [...]   
   real 6.13   
   user 4.59   
   sys 0.54   
      
   $ time -p ./configure   
   [...]   
   real 11.94   
   user 5.24   
   sys 6.13   
      
   $ time -p make -j$(nproc)   
   [...]   
   real 3.57   
   user 11.01   
   sys 2.74   
      
   $ time -p sudo make install   
   [...]   
   real 0.35   
   user 0.00   
   sys 0.01   
      
   On this system:   
      
   $ nproc   
   64   
      
   $ grep 'model name' /proc/cpuinfo | uniq   
   model name	: AMD Ryzen Threadripper 3970X 32-Core Processor   
      
   This workstation is a few years old, but I don't see any need to replace   
   it at this point.   
      
   The numbers above will hopefully give naysayers of autoconf and   
   make pause for thought...   
      
   --   
   -v System76 Thelio Mega v1.1 x86_64 NVIDIA RTX 3090Ti 24G   
      OS: Linux 6.17.6 D: Mint 22.2 DE: Xfce 4.18   
      NVIDIA: 580.95.05 Mem: 258G   
      "It's deja vu all over again."   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca