Skip to content

long MODULEPATH drastically reduces performance  #2226

@pescobar

Description

@pescobar

I did this test with latest EasyBuld 3.2.1 and Lmod-7.4.5 in a Centos7.3 machine:

With a long $MODULEPATH the execution time is quite long:

$> echo $MODULEPATH
/scicore/soft/modules/base:/scicore/soft/modules/bio:/scicore/soft/modules/cae:/scicore/soft/modules/chem:/scicore/soft/modules/compiler:/scicore/soft/modules/data:/scicore/soft/modules/debugger:/scicore/soft/modules/devel:/scicore/soft/modules/geo:/scicore/soft/modules/ide:/scicore/soft/modules/lang:/scicore/soft/modules/lib:/scicore/soft/modules/math:/scicore/soft/modules/mpi:/scicore/soft/modules/numlib:/scicore/soft/modules/perf:/scicore/soft/modules/phys:/scicore/soft/modules/system:/scicore/soft/modules/toolchain:/scicore/soft/modules/tools:/scicore/soft/modules/vis

$> time eb foss-2016a.eb -r -D
real	0m57.002s
user	0m36.900s
sys	0m8.828s

If I just reduce the $MODULEPATH length the execution time is much better:

$> export MODULEPATH=/scicore/soft/modules/all

$> time eb foss-2016a.eb -r -D
real	0m8.054s
user	0m4.925s
sys	0m1.361s

I don't know if this is the root cause but It seem that when MODULEPATH is so long EasyBuild is executing Lmod many more times:

$ echo $MODULEPATH 
/scicore/soft/modules/base:/scicore/soft/modules/bio:/scicore/soft/modules/cae:/scicore/soft/modules/chem:/scicore/soft/modules/compiler:/scicore/soft/modules/data:/scicore/soft/modules/debugger:/scicore/soft/modules/devel:/scicore/soft/modules/geo:/scicore/soft/modules/ide:/scicore/soft/modules/lang:/scicore/soft/modules/lib:/scicore/soft/modules/math:/scicore/soft/modules/mpi:/scicore/soft/modules/numlib:/scicore/soft/modules/perf:/scicore/soft/modules/phys:/scicore/soft/modules/system:/scicore/soft/modules/toolchain:/scicore/soft/modules/tools:/scicore/soft/modules/vis

$> time strace -f -o /tmp/eb-strace.log eb foss-2016a.eb -r -D

$> which lmod
/export/soft/lua_lmod/centos7/lmod/lmod/libexec/lmod

$> grep /export/soft/lua_lmod/centos7/lmod/lmod/libexec/lmod /tmp/eb-strace.log | wc -l
948
$> export MODULEPATH=/scicore/soft/modules/all

$> time strace -f -o /tmp/eb-strace2.log eb foss-2016a.eb -r -D

$> which lmod
/export/soft/lua_lmod/centos7/lmod/lmod/libexec/lmod

$ grep /export/soft/lua_lmod/centos7/lmod/lmod/libexec/lmod /tmp/eb-strace2.log | wc -l
272

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions