Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8022923
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T22:24:35+00:00 2026-06-04T22:24:35+00:00

GNU make can handle parallel tasks with a -jN argument, and it’s common to

  • 0

GNU make can handle parallel tasks with a -jN argument, and it’s common to use a number of tasks N that’s between 1 and 2 times the number of hardware threads on the computer being used for the build.

E.g. on a dual-E5520 machine (2 CPUs, 4 cores per CPU, 2 threads per core), the fastest builds are made with commands between make -j16 and make -j32.

Right now i dont know much about my build server but
when i run cat /proc/cpuinfo

it shows it has 4 processor
and each info is like this

processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model       : 37
model name  : Intel(R) Core(TM) i3 CPU         530  @ 2.93GHz
stepping    : 2
cpu MHz     : 2933.000
cache size  : 4096 KB
physical id : 0
siblings    : 4
core id     : 0
cpu cores   : 2
apicid      : 0
initial apicid  : 0
fpu     : yes
fpu_exception   : yes
cpuid level : 11
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm arat tpr_shadow vnmi flexpriority ept vpid
bogomips    : 5851.87
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

Question:

1>so here how can i calculate N for my build?

2>what if my system can support maximum 8 threads and if i give make -j32?

3>what if i just use make then only 1 thread will be run for compilation?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T22:24:37+00:00Added an answer on June 4, 2026 at 10:24 pm

    You can’t hurt anything with the -j option. It is just used to tune the number of simultaneous processes that should be used by make in order to get maximum performance from your system for doing the build.

    You can set it to be less than 4, with your 2 cores x 2 Hyperthreads each, if you want to have CPU time more available for other things you are doing (faster response for browsing, perhaps).

    You can set it to more than 4 so that one of the processes is utilizing each of the execution units while other processors are waiting for I/O.

    If you have enough memory -j32 shouldn’t hurt anything, but it won’t help either. See the comments for why you don’t want to overdo.

    If there’s one software package you make all of the time you can experiment and see what setting allows it to build the fastest without hurting your interactive performance. Another way to tune is to look at top output and see at what -j multiprocessing level you are keeping the CPU utilization close to 100% most of the time.

    In his Linux Kernel in a Nutshell book [1], Greg Kroah-Hartman suggest doubling the number of execution units when setting the -j option. For you that would be -j8.

    [1] Linux Kernel in a Nutshell, Greg Kroah-Hartman, pg. 26. [http://www.kroah.com/lkn/%5D

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I make GNU Make use a different compiler without manually editing the
Is it possible to use GNU make in Xcode 4? It's said that Xcode
I've been trying to make GNU gdb 6.5-14 to use the source code embedded
When I use the classic gnu Make I put in post build actions like
How can I use configure and make tools to specify to use 64 bit
I'm converting a makefile so it can be used with gnu make. In the
How can I store GNU make & configure files elsewhere? I have a project
What setup works for GNU make parallel jobs (-j) on Windows? I have tried
I use gnumake version GNU Make 3.81 under cygwin on windows. Cygwin version is
GNU/Make manual §5.7 states the following: 5.7 Recursive Use of make Recursive use of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.