DaemonForums  

Go Back   DaemonForums > Miscellaneous > Off-Topic

Off-Topic Everything else.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 28th April 2010
Mr-Biscuit Mr-Biscuit is offline
Banned
 
Join Date: May 2008
Posts: 272
Thanked 0 Times in 0 Posts
Default Load compile limit on CPU

I have a tendency to run make on my machines until the swap is being used.
The G3 is still building with six active processes. Before the amd64 died, I would run the same number of [make install clean]s. Just wondering- and a little bored while I wait- if anyone else does the same.
Reply With Quote
  #2   (View Single Post)  
Old 28th April 2010
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 3,435
Thanked 214 Times in 189 Posts
Default

OpenBSD view:

I used to do manual parallel builds -- primarily when building ports where a fetch of the software was part of it.

I no longer do this, because the fighting for resource (CPU/Disk/RAM) would take longer if the jobs were working instead of waiting for downloads.

Now, I use make -j x <target>, where x = my number of CPUs. For ports, and for kernel and userland builds. I don't use -j for X builds, nor for releases.

Is it supported? No. Does it work? For these limited uses, yes.
Reply With Quote
  #3   (View Single Post)  
Old 28th April 2010
Mr-Biscuit Mr-Biscuit is offline
Banned
 
Join Date: May 2008
Posts: 272
Thanked 0 Times in 0 Posts
Default

I think I'll try that statement out
Code:
make -j
when I get home tomorrow.
Reply With Quote
  #4   (View Single Post)  
Old 29th April 2010
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
 
Join Date: May 2008
Location: USofA
Posts: 1,547
Thanked 112 Times in 104 Posts
Default

using login classes (man login.conf), it is possible to define limits to how much resources a user may use (cpu, memory, open files, processes, etc). If necessary you can always define one or several of these, and use su to run make under it, i.e. $ su -c loginclass -c 'make -j4 target'. That can be handy if you need to keep compiling something within a given limit, but remember that it can also cause builds to fail.


On FreeBSD at least, the -j switch to make, can significantly decrease compile times for the kernel and base, but doesn't play well with ports at times. The # of processors (or cores) is often used, but I typically use -j4 to -j6 on my sempron uniprocessor and -j8 to -j12 on my dual cored pentium d. Tends to work quite well.
__________________
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bandwidth limit per IP PatrickBaer OpenBSD General 13 22nd February 2010 07:38 PM
Limit Bandwidth (not throughput) plexter OpenBSD Security 5 9th October 2008 05:10 PM
limit use memory by Apache mfaridi FreeBSD Security 4 8th July 2008 05:59 PM
Approaching the limit on PV entries ccc FreeBSD General 6 14th June 2008 06:58 PM


All times are GMT. The time now is 03:50 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick