pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

ccache is great in some case (Re: gnuradio-*)



On packaging gnuradio-*, I've played with ccache. Used Two hosts,
          A             B
-------- ------------  -------------
hostname  t-106		z87
cpu       AMD Opteron   Core i7
core      x 4           x 4
cpu type  1352	    	4770
clock     2.1GHz        3.40GHz
Phy.Mem	  8GB (*)	8GB	      i386 recognizes only 3.4G or so
NetBSD	  i386		amd64
Release   7.99.1	6.1_STABLE
WRKOBJDIR hard disk	tmpfs
-------- ------------  -------------
Host B:
(1) with no ccache some 140 minutes,
    average             total
    383 sec 6'23        140'35

(2)  with ccache on -> hard disk
    about twice elapse time
    Overhead of R/W on ccache costs too much.

(3)  with ccache on -> tmpfs
    about the same as (1)
    Probably other than file I/O is bottle neck.

Host A:
(4) without ccache
    Total 1,000 minutes,  See below

(5) with ccache on tmpfs:
    Total  575 minitus, about half of (4) as a total, see below

ccache size for gnuradio is 200-300MB.
The difference of 4 and 5 are plotted on the graph:
    http://www.ki.nu/~makoto/diary/attach/2014/ccache.jpeg
------------------------------------
(4) A without ccache
                       package    sec ->  m  s (      size)       gunzip 
            gnuradio-3.7.5.tgz    588     9'48 (      1431)        10240
        gnuradio-fec-3.7.5.tgz   1629    27'09 (    531528)      3348480
       gnuradio-noaa-3.7.5.tgz   1904    31'44 (    143435)       778240
    gnuradio-doxygen-3.7.5.tgz   2041    34'01 ( 165460182)    367390720
   gnuradio-channels-3.7.5.tgz   2048    34'08 (    283080)      1689600
      gnuradio-wxgui-3.7.5.tgz   2089    34'49 (    426312)      2140160
      gnuradio-pager-3.7.5.tgz   2207    36'47 (    166597)       839680
        gnuradio-uhd-3.7.5.tgz   2589    43'09 (    692416)      3348480
      gnuradio-qtgui-3.7.5.tgz   2677    44'37 (   1035591)      5908480
      gnuradio-utils-3.7.5.tgz   2824    47'04 (    210593)      1443840
    gnuradio-wavelet-3.7.5.tgz   2925    48'45 (    135809)       634880
        gnuradio-fcd-3.7.5.tgz   2961    49'21 (    149196)       552960
  gnuradio-video-sdl-3.7.5.tgz   2993    49'53 (    117356)       512000
    gnuradio-digital-3.7.5.tgz   3023    50'23 (   1937120)     13527040
       gnuradio-core-3.7.5.tgz   3106    51'46 (   9178054)     60876800
        gnuradio-dtv-3.7.5.tgz   3118    51'58 (    278592)      1566720
       gnuradio-atsc-3.7.5.tgz   3146    52'26 (    426333)      2754560
  gnuradio-companion-3.7.5.tgz   3306    55'06 (    234340)      1536000
     gnuradio-zeromq-3.7.5.tgz   3415    56'55 (    195177)      1136640
    gnuradio-vocoder-3.7.5.tgz   3495    58'15 (    560207)      2928640
   gnuradio-ctrlport-3.7.5.tgz   3898    64'58 (     24891)       143360
    gnuradio-trellis-3.7.5.tgz   4011    66'51 (   1417666)     11386880
                         Total  59993   999'53 ( 183605906)    484454400 22 files
    gnuradio-default-3.7.5.tgz   3458    57'38 ( 203129175)    529397760

------------------------------------
(5) A with ccache on tmpfs.
                       package    sec ->  m  s (      size)       gunzip 
            gnuradio-3.7.5.tgz    584     9'44 (      1432)        10240
       gnuradio-core-3.7.5.tgz   1377    22'57 (   9178123)     60876800
        gnuradio-dtv-3.7.5.tgz   1442    24'02 (    278601)      1566720
   gnuradio-channels-3.7.5.tgz   1453    24'13 (    283090)      1689600
      gnuradio-pager-3.7.5.tgz   1456    24'16 (    166597)       839680
       gnuradio-noaa-3.7.5.tgz   1464    24'24 (    143436)       778240
    gnuradio-wavelet-3.7.5.tgz   1475    24'35 (    135819)       634880
     gnuradio-zeromq-3.7.5.tgz   1501    25'01 (    195183)      1136640
        gnuradio-fec-3.7.5.tgz   1519    25'19 (    531548)      3348480
       gnuradio-atsc-3.7.5.tgz   1535    25'35 (    426344)      2754560
      gnuradio-utils-3.7.5.tgz   1537    25'37 (    210638)      1443840
      gnuradio-qtgui-3.7.5.tgz   1546    25'46 (   1035550)      5908480
      gnuradio-wxgui-3.7.5.tgz   1560    26'00 (    426223)      2140160
  gnuradio-video-sdl-3.7.5.tgz   1564    26'04 (    117360)       512000
   gnuradio-ctrlport-3.7.5.tgz   1591    26'31 (     24898)       143360
        gnuradio-uhd-3.7.5.tgz   1600    26'40 (    692420)      3348480
    gnuradio-vocoder-3.7.5.tgz   1616    26'56 (    560223)      2928640
        gnuradio-fcd-3.7.5.tgz   1619    26'59 (    149201)       552960
    gnuradio-digital-3.7.5.tgz   1699    28'19 (   1937131)     13527040
    gnuradio-doxygen-3.7.5.tgz   1831    30'31 ( 165464005)    367400960
    gnuradio-trellis-3.7.5.tgz   1991    33'11 (   1417653)     11386880
  gnuradio-companion-3.7.5.tgz   2509    41'49 (    234497)      1536000
                         Total  34469   574'29 ( 183609972)    484464640 22 files
    gnuradio-default-3.7.5.tgz   3227    53'47 ( 203135025)    529397760
------------------------------------

Related lines of /etc/mk.conf is below with some redundent lines:
--------------
PKGSRC_COMPILER=        ccache gcc
CCACHE_DIR=             /tmpfs/.ccache

.for DISTCCDEPS in devel/ccache sysutils/checkperms pkgtools/digest devel/distcc devel/popt devel/libtool-base lang/f2c devel/gmake
.   if ${PKGPATH} == ${DISTCCDEPS}
IGNORE_DISTCC=  yes
IGNORE_CCACHE=  yes
.   endif
.endfor
--------------

---
mef%NetBSD.org@localhost
Makoto Fujiwara, 
Chiba, Japan, Narita Airport and Disneyland prefecture.


Home | Main Index | Thread Index | Old Index