cloudfoundry - Cloud Foundry `cf push` is slow: high CPU usage, disable resource matching -
for java application cf push
takes long.
uploading ${appname}... uploading app files from: ${path}.jar uploading 19.8m, 6584 files done uploading
when pushing, first line shown minutes (with 100% cpu load). afterwards, actual upload starts (second line) , completed in second.
with cf_trace=true
see resource match
request (https://apidocs.cloudfoundry.org/220/resource_match/list_all_matching_resources.html). request json string sent, containing hash sums of files in jar file. gathering information takes long in case, jar file contains many files.
is there way disable resource match request? far see, used not upload files unchanged (already known cloudfoundry instance). uploading 20m of data takes second, though.
i see when running jars contain lot of class files. cloud foundry not able cache small files , if uploading thousands of 3rd party class files it's wasteful. happens if use "shaded" jar. if repackage dependencies in jars, rather in flat directory structure, improve chances of getting cache hit in stager. spring boot tools (for maven , gradle) instance you, , don't require use spring boot application code.
Comments
Post a Comment