請問可以用 make -j4 來編譯 kernel 嗎?? - BBS
By Liam
at 2009-10-06T16:16
at 2009-10-06T16:16
Table of Contents
小弟我最近在學習編譯 world & kernel
在編譯 world 的時後, 在官網的 handbook
http://www.freebsd.org/doc/zh_TW.Big5/books/handbook/makeworld.html
看到這段
It is possible to specify a -j option to make which will cause it
to spawn several simultaneous processes. This is most useful on
multi-CPU machines. However, since much of the compiling process is
IO bound rather than CPU bound it is also useful on single CPU machines.
On a typical single-CPU machine you would run:
# make -j4 buildworld
make(1) will then have up to 4 processes running at any one time.
Empirical evidence posted to the mailing lists shows this generally
gives the best performance benefit.
小弟看到這邊有兩個疑問
(1) 為甚麼 compiling 這個動作是 io bound, 將一個語言編譯成另一個語
言應該需要大量的運算, 不是 cpu bound 嗎?
(2) 因為在文件後面編譯 kernel 時所下的指令是 make buildkernel
KERNCONF=MYKERNEL, 請問這邊可以改用 make -j4 buildkernel
KERNCONF=MYKERNEL 嗎?? 會因此而使得編譯時間變短嗎??
以上的問題爬文找不到解答
在這邊先感謝大家的回答 <(__)>
--
在編譯 world 的時後, 在官網的 handbook
http://www.freebsd.org/doc/zh_TW.Big5/books/handbook/makeworld.html
看到這段
It is possible to specify a -j option to make which will cause it
to spawn several simultaneous processes. This is most useful on
multi-CPU machines. However, since much of the compiling process is
IO bound rather than CPU bound it is also useful on single CPU machines.
On a typical single-CPU machine you would run:
# make -j4 buildworld
make(1) will then have up to 4 processes running at any one time.
Empirical evidence posted to the mailing lists shows this generally
gives the best performance benefit.
小弟看到這邊有兩個疑問
(1) 為甚麼 compiling 這個動作是 io bound, 將一個語言編譯成另一個語
言應該需要大量的運算, 不是 cpu bound 嗎?
(2) 因為在文件後面編譯 kernel 時所下的指令是 make buildkernel
KERNCONF=MYKERNEL, 請問這邊可以改用 make -j4 buildkernel
KERNCONF=MYKERNEL 嗎?? 會因此而使得編譯時間變短嗎??
以上的問題爬文找不到解答
在這邊先感謝大家的回答 <(__)>
--
Tags:
BBS
All Comments
Related Posts
請問在virtualbox上安裝freebsd(已解決)
By Kyle
at 2009-10-05T11:44
at 2009-10-05T11:44
請問在virtualbox上安裝freebsd(已解決)
By Mason
at 2009-10-03T16:56
at 2009-10-03T16:56
請問安裝Maple路徑問題
By Caitlin
at 2009-10-03T14:17
at 2009-10-03T14:17
kde3 安裝問題
By Robert
at 2009-09-27T22:48
at 2009-09-27T22:48
libiconv
By Rae
at 2009-09-27T14:46
at 2009-09-27T14:46