Skip to content

Optimize Docker entrypoint preinitialization time#469

Open
srstsavage wants to merge 1 commit into
ERDDAP:mainfrom
srstsavage:faster-docker-startup
Open

Optimize Docker entrypoint preinitialization time#469
srstsavage wants to merge 1 commit into
ERDDAP:mainfrom
srstsavage:faster-docker-startup

Conversation

@srstsavage

Copy link
Copy Markdown
Collaborator

Description

Avoid chowning ERDDAP classes and dependency jars during container start up to speed up launch time. Also add an environment variable SKIP_ERDDAP_DATA_CHOWN to optionally avoid chowing the (potentially large) /erddapData directory. Also time the preinitialization steps and output the total time taken in milliseconds.

Credit @ItaloBorrelli for investigation and optimization suggestions

#465

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR speeds up Docker container startup by reducing filesystem ownership changes during entrypoint preinitialization, adds an opt-out for chowning /erddapData, and reports total preinit duration.

Changes:

  • Limit chown scope under ${CATALINA_HOME} instead of recursively chowning everything.
  • Add SKIP_ERDDAP_DATA_CHOWN to optionally skip chowning /erddapData.
  • Time and log total preinitialization duration in milliseconds.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docker/entrypoint.sh Outdated
Comment thread docker/entrypoint.sh Outdated
Comment thread docker/entrypoint.sh Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 3 comments.

Comment thread docker/entrypoint.sh
Comment thread docker/entrypoint.sh
Comment thread docker/entrypoint.sh Outdated
Avoid chowning ERDDAP classes and dependency jars during container start up
to speed up launch time. Also add an environment variable
SKIP_ERDDAP_DATA_CHOWN to optionally avoid chowing the (potentially large)
/erddapData directory. Also time the preinitialization steps and output
the total time taken in milliseconds.

Credit @ItaloBorrelli for investigation and optimization suggestions

ERDDAP#465

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 3 comments.

Comment thread docker/entrypoint.sh
Comment thread docker/entrypoint.sh
Comment thread docker/entrypoint.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants