hubspotdevops / puppet-nexus

Puppet module for Sonatype Nexus
MIT License
24 stars 93 forks source link

Performance #79

Open gbloquel opened 7 years ago

gbloquel commented 7 years ago

At each call of puppet master, the processing of puppet catalog takes 90% CPU for 10 min.

After investigation, it seems that the recurse parameter causes problem.

  # NOTE: $nexus_work_dir in later releases was moved to a directory not
  # under the application.  This is why we do not make recursing optional
  # for this resource but do for $nexus_work_dir.
  file{ $nexus_home_real:
    ensure                  => directory,
    owner                   => $nexus_user,
    group                   => $nexus_group,
    recurse                 => true,
    selinux_ignore_defaults => $nexus_selinux_ignore_defaults,
    require                 => Exec[ 'nexus-untar']
}

My platform is centos 7.2. My nexus data folder has nearly 70000 files.

How to fix this problem ? Does this step is mandatory ?

kenbreeman commented 7 years ago

recurse in puppet is very slow and implemented poorly. We should definitely remove it.

I think the intention was to only have it run recursively on the first run to ensure permissions are set correctly on all sub-directories, but since we're manually creating each sub-directory it's no longer needed.

tmclaugh commented 7 years ago

This sounded familiar. https://github.com/hubspotdevops/puppet-nexus/pull/32/files

gbloquel commented 7 years ago

Any clarification I use Nexus 3 and as mentioned into the readme the parameter nexus_work_dir_manage must be set to false. In this case, no way to desactivate the recursive into the data folder.

To conclude this defect affects the usage of nexus 3

nomoresecrets commented 7 years ago

Had the same problem. After setting "nexus_work_recurse => false" everything is okay now :+1: