cli icon indicating copy to clipboard operation
cli copied to clipboard

Re-pushing war-file packaged app results in a large upload size

Open lhotari opened this issue 12 years ago • 24 comments

Large Grails applications might be using a lot of Java libraries that take a lot of storage space. The problem is that re-pushing a war-file without doing any changes causes a large upload each time. The expectation is that CF cli only transfers the files that have been modified.

In this example, the compressed size is about 60MB and the uncompressed size of the files in the war-file is about 89MB (6286 files). Re-pushing an unchanged app causes an 28.3MB upload.

This is the output from cf push when I re-push a war file:

Uploading grailsorg-dev...
Uploading app files from: /home/lari/grails-website/target/site-2.3.0.war
Uploading 28.3M, 6115 files
OK

You can reproduce the problem with grails-website Grails app (the opensource webapp that backs http://grails.org website).

Here the steps to reproduce the problem (the gist repo contains manifest.yml and war file):

git clone https://gist.github.com/150e5bc8bcf3b1f6275a.git grails-website-war
cd grails-website-war
cat manifest.yml
cf push

access to log files from my test runs:

git clone https://gist.github.com/65874d9306e922524a75.git grails-website-cf-trace-logs
cd grails-website-cf-trace-logs

or command output - cf push 2. time CF trace log - cf push 1. time CF trace log - cf push 2. time

lhotari avatar May 14 '14 13:05 lhotari

@tjarratt @nebhale @lcddave @graemerocher

I cloned cloud_controller_ng and did some greps to the code with "minimum" as the keyword.

I found this logic in lib/cloud_controller/resource_pool.rb . And configurable "minimum_size" option in cloud_controller's resource_pool .

minimum_size seems to 0 by default, so there must be a certain config value in Pivotal CF cloud controllers.

Is there any way to change that minimum (ccng.resource_pool.minimum_size) in Pivotal Web Services CF?

lhotari avatar May 17 '14 09:05 lhotari

@lhotari - That change would be in the runtime as its part of the cloud_controller repository. But if you are trying to get it changes in PWS, please submit a request through the PWS support channel.

lcddave avatar May 19 '14 05:05 lcddave

Thanks @lcddave . I have submitted a request to PWS support (ticket number is 103817).

lhotari avatar May 19 '14 06:05 lhotari

I got a reply from PWS support. They pointed out the ccng.resource_pool.minimum_size setting in cf-release: https://github.com/cloudfoundry/cf-release/blob/master/jobs/cloud_controller_ng/spec#L221-L223 "So it seems the files smaller than 65536 are not kept in the blob store and are uploaded during each "cf push" operation." /cc @graemerocher @nebhale

lhotari avatar May 20 '14 09:05 lhotari