in reply to CPAN module install really slow

The OS is different and I guess the hardware will be different also, disk speed etc, so perhaps not a level playing field for comparison. Have you installed CPAN::SQLite and configured your cpan client to use this?

cpan> o conf use_sqlite 1 push

You may also find using cpanm faster than cpan.

Replies are listed 'Best First'.
Re^2: CPAN module install really slow
by gsee (Acolyte) on Jul 13, 2015 at 09:04 UTC
    Hi marto thanks for your reply, I will give both of those a try. The RHEL box should be must faster along with all the infrastructure around it. I realise there could be a host of reason for this difference but it does not make any sense to me the length of time it takes to do an install. It should be lightning fast on these servers! Ill report back with my updates on your suggestions in a while

      Perhaps there's a difference in the cpan config, but architecture differences can be huge. At work I've experienced far too many problems cause by poor system configuration to rule such things out. Regardless how many times I'm assured "everything is the same" or "everything is configured properly" it usually turns out not to be the case. Yes, our clients employ poor systems architects and administrators.

        Haha, you are far from alone there!
Re^2: CPAN module install really slow
by gsee (Acolyte) on Jul 13, 2015 at 11:25 UTC
    Hi marto

    I have now installed cpanm and its lightning fast as I would expect. Have no idea what, where or how to configure things to get CPAN working as I would expect but guess I can continue to use cpanm.

    Thanks

      Within a cpan session o conf will display the current configuration. I mentioned previously the CPAN::SQLite config change, or you could compare settings across systems, though if you're happy with cpanm I'm pretty sure you'll stick with it.

      I think I spoke too soon.

      It appears to be the Makefile.PL that is taking ages and for every module install?

      ps -ef | grep cpanm admtst 10665 18671 0 13:01 pts/1 00:00:00 /opt/app/release/perl/li +nux/5.18.2-7/bin/perl 5.18.2-7/bin/cpanm --verbose LWP::UserAgent pstree -pa 10665 cpanm,10665 5.18.2-7/bin/cpanm --verbose LWP::UserAgent `-perl,11170 Makefile.PL
      Yes if I do manual install of any of these modules it pretty instant.

        Are you sure you're comparing the same things here? Using a tool like cpan/cpanm installs dependencies, running perl Makefile.PL does not. LWP::UserAgent has many dependencies.

        Some further information which may help someone help me!

        If I run the cpanm command with strace, I get the following output:

        ...... ...... open("/home/admtst/.cpanm/work/1436872577.16214/build.log", O_WRONLY|O +_CREAT|O_APPEND, 0666) = 4 lseek(4, 0, SEEK_END) = 2506 ioctl(4, SNDCTL_TMR_TIMEBASE or TCGETS, 0x7fffd6360540) = -1 ENOTTY (I +nappropriate ioctl for device) lseek(4, 0, SEEK_CUR) = 2506 fstat(4, {st_mode=S_IFREG|0644, st_size=2506, ...}) = 0 fcntl(4, F_SETFD, FD_CLOEXEC) = 0 write(4, "Configuring Email-MIME-ContentTy"..., 41) = 41 close(4) = 0 stat("cpanfile", 0x7651a0) = -1 ENOENT (No such file or d +irectory) stat("Build.PL", 0x7651a0) = -1 ENOENT (No such file or d +irectory) stat("Makefile.PL", {st_mode=S_IFREG|0644, st_size=1327, ...}) = 0 write(2, "Running Makefile.PL\n", 20Running Makefile.PL ) = 20 open("/home/admtst/.cpanm/work/1436872577.16214/build.log", O_WRONLY|O +_CREAT|O_APPEND, 0666) = 4 lseek(4, 0, SEEK_END) = 2547 ioctl(4, SNDCTL_TMR_TIMEBASE or TCGETS, 0x7fffd6360540) = -1 ENOTTY (I +nappropriate ioctl for device) lseek(4, 0, SEEK_CUR) = 2547 fstat(4, {st_mode=S_IFREG|0644, st_size=2547, ...}) = 0 fcntl(4, F_SETFD, FD_CLOEXEC) = 0 write(4, "Running Makefile.PL\n", 20) = 20 close(4) = 0 write(1, "Configuring Email-MIME-ContentTy"..., 45Configuring Email-MI +ME-ContentType-1.018 ... ) = 45 rt_sigprocmask(SIG_SETMASK, ~[RTMIN RT_1], [], 8) = 0 clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIG +CHLD, child_tidptr=0x7f74c45de9d0) = 16777 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 wait4(16777, Checking if your kit is complete... Looks good
        It has a wait command which I am unsure about, any ideas?