X Tutup
Skip to content

Slow performance on buildImageCmd() #283

@mkuzmin

Description

@mkuzmin

I'm a user of Docker plugin for Gradle, which relies on your library.

I've met a performance issue in my Gradle build (bmuschko/gradle-docker-plugin#88), but can also reproduce it calling your library directly.

My Dockerfile is minimal:

FROM java:jre
ADD TeamCity/ /opt/teamcity-server/

But a content of the directory is rather large: it's over 2000 files, 600 Mb in common.

Calling Docker build from a command line takes about 2-3 minutes, and produces 10-30% of CPU workload.

Running the same build using docker-java takes over 20 minutes, and loads CPU for 85-100%.

Here is a Groovy script which reproduces the issue: https://gist.github.com/mkuzmin/6d675411bf668e46d800#file-docker-java-groovy

An here is a stack dump:
https://gist.github.com/mkuzmin/6d675411bf668e46d800#file-groovy-stack-dump-txt

I'm using:
Ubuntu 14.04
OpenJDK 1.7.0_79
Docker 1.7.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      X Tutup