perl5.10.1のコンパイル@SunStudio12 dmakeでパラレルコンパイル
5.10.1 released! ということで、OpenSolaris 上にインストール。
既に、5.10.0 を/usr/local に入れていますが上書き。
gccだとツマラナイので、SunStudio12 update1 の dmakeで並列コンパイルしてみました。
$ cc --version
cc (GCC) 3.4.3 (csl-sol210-3_4-20050802)
...
$
とりあえず、普通にConfigureまで。
(ちなみに、gccでも問題なくコンパイルできます。)
$ pfexec pkg install sunstudio12u1
DOWNLOAD PKGS FILES XFER (MB)
Completed 1/1 6637/6637 248.99/248.99PHASE ACTIONS
Install Phase 11799/11799
PHASE ITEMS
Reading Existing Index 8/8
Indexing Packages 1/1
$ /usr/bin/cc -V
cc: Sun C 5.10 SunOS_i386 2009/06/03
usage: cc [ options] files. Use 'cc -flags' for details
$
$ wget http://search.cpan.org/CPAN/authors/id/D/DA/DAPM/perl-5.10.1.tar.gz
$ gzip -cd perl-5.10.1.tar.gz | tar xf -
$ cd perl-5.10.1
$ ./Configure -des -Dcc=/usr/bin/cc -Dusethreads -Dprefix=/usr/local -Duse64bitint
...
Now you must run 'make'.If you compile perl5 on a different machine or from a different object
directory, copy the Policy.sh file from this object directory to the
new one before you run Configure -- this will help you with most of
the policy defaults.
前回 からの変更点は、以下。inc_versionは気分。
○ -Duse64bitint 追加: 64bitにしておくと、気軽にlibkstatが使えるので。
○ -Dinc_version_list=none 外してみた:5.10.0のモジュールパスは、そのままでもよいかなと?
[普通にmake]
$ time make
...
Everything is up to date. Type 'make test' to run test suite.real 14m40.723s
user 12m50.299s
sys 1m30.956s
$
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
$ vmstat 3
...
kthr memory page disk faults cpu
r b w swap free re mf pi po fr de sr cd -- -- -- in sy cs us sy id
0 0 0 412888 147868 331 3750 0 0 0 0 0 2 0 0 0 379 2831 116 22 3 75
0 0 0 418328 153644 489 4825 0 0 0 0 0 1 0 0 0 381 3343 158 21 5 7414分40秒
1CPUしか使わないので、CPU使用率は25%ほど。
[4CPUなATOMなので、4並列]
$ time dmake -j 4Everything is up to date. Type 'dmake test' to run test suite.
real 8m40.090s
user 16m37.183s
sys 2m25.182s
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
$ vmstat 3
...
kthr memory page disk faults cpu
r b w swap free re mf pi po fr de sr cd -- -- -- in sy cs us sy id
0 0 0 347976 95308 239 5012 0 0 0 0 0 0 0 0 0 456 5711 119 91 9 0
0 0 0 325768 76540 215 5231 0 0 0 0 0 0 0 0 0 461 4966 115 91 9 0
0 0 0 310396 63096 197 4388 0 0 0 0 0 29 0 0 0 556 4229 202 92 8 08分40秒
CPU使用率はオオムネ100%。すばらしい。
14:40 -> 8:40 ということでコンパイル時間は 60%。速い。
$ pfexec dmake install
...
$ /usr/local/bin/perl -vThis is perl, v5.10.1 (*) built for i86pc-solaris-thread-multi-64int
Copyright 1987-2009, Larry Wall
...
$
さぁ、OpenSolarisで perl 5.10.1 使いましょう。