From: geraldo netto <[email protected]>
Committer: Nadav Har'El <[email protected]>
Branch: master

README: document -j option on make / scripts/build

Just in case, document -j option on make / scripts/build
Once someone might be unaware of this option

Also, document that nproc is a built-in command from bash/core-utils [1]
That counts the number of available processors

In my case, using compilation without -j takes ~5 minutes against 1.5 minutes with -j$(nproc)
Before, I used to overcommit the cpu/thread number on make / scripts/build
but the saturation can actually slow things down...

[1] http://www.gnu.org/software/coreutils/manual/coreutils.html#nproc-invocation

Signed-off-by: geraldo netto <[email protected]>
Message-Id: <[email protected]>

---
diff --git a/README.md b/README.md
--- a/README.md
+++ b/README.md
@@ -98,17 +98,26 @@ git submodule update --init --recursive
 Finally, build everything at once:

 ```
-make
+make -j$(nproc)
 ```

 to build only the OSv kernel, or more usefully,

 ```
-scripts/build
+scripts/build -j$(nproc)
 ```

 to build an image of the OSv kernel and the default application.

+Command nproc (embedded in bash/core-utils) will calculte the number of jobs/threads for make and scripts/build automatically. +Alternatively, the environment variable MAKEFLAGS can be exported as follows:
+
+```
+export MAKEFLAGS=-j$(nproc)
+```
+
+In that case, make and scripts/build do not need the parameter -j.
+
 scripts/build creates the image ```build/last/usr.img``` in qcow2 format.
 To convert this image to other formats, use the ```scripts/convert```
 tool, which can create an image in the vmdk, vdi, raw, or qcow2-old formats

--
You received this message because you are subscribed to the Google Groups "OSv 
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to