Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide the means to run the dockerized server under jprofiler if needed. #2099

Merged
merged 4 commits into from
Mar 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion debezium/perf/.env
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ REDPANDA_MEMORY=6G
REDPANDA_SMP=4
REDPANDA_DISK=12G
MATERIALIZE_VERSION=v0.20.0
MATERIALIZE_WORKERS=8
MATERIALIZE_WORKERS=2
KAFKA_PRODUCER_ACKS=0
KAFKA_BATCH_SIZE=1048576
MAX_PARALLEL_PURCHASES=4
Expand Down
10 changes: 9 additions & 1 deletion debezium/perf/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,18 @@ services:
extends:
file: ../../docker-compose-common.yml
service: server
# For jprofiler, uncomment the next line.
# build: ../../jprofiler-server
environment:
- JAVA_TOOL_OPTIONS=-Xmx${DEEPHAVEN_HEAP} -Ddeephaven.console.type=${DEEPHAVEN_CONSOLE_TYPE} -Ddeephaven.application.dir=${DEEPHAVEN_APPLICATION_DIR}
# For jprofiler sessions (if you tweaked the jprofiler version in jprofiler-server/Dockerfile you need to tweak the path below):
# Then use this startup options:
# - JAVA_TOOL_OPTIONS=-agentpath:/opt/jprofiler13.0/bin/linux-x64/libjprofilerti.so=port=8849,nowait -Xmx4g -Ddeephaven.console.type=${DEEPHAVEN_CONSOLE_TYPE} -Ddeephaven.application.dir=${DEEPHAVEN_APPLICATION_DIR}
volumes:
- ../scripts:/scripts
# For jprofiler sessions: (change if using different port)
# ports:
# - '8849:8849'

web:
extends:
Expand Down Expand Up @@ -45,7 +53,7 @@ services:
# We build a tweaked version of redpanda's docker image to
# change the configuration towards production defaults.
build:
context: redpanda
context: ./redpanda
args:
- REDPANDA_VERSION=${REDPANDA_VERSION}
command:
Expand Down
17 changes: 14 additions & 3 deletions docker-compose-common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,33 @@ version: "3.4"
services:
server:
image: ${DEEPHAVEN_SERVER_IMAGE}

# For jprofiler, replace the line before this comment block with the line below:
#build:
# context: ./jprofiler-server
# args:
# - DEEPHAVEN_SERVER_IMAGE=${DEEPHAVEN_SERVER_IMAGE}
environment:
# https://bugs.openjdk.java.net/browse/JDK-8230305
# cgroups v2 resource reservations only work w/ java 15+ ATM, so it's best for our java processes to be explicit
# with max memory.
#
# To turn on debug logging, add: -Dlogback.configurationFile=logback-debug.xml
- JAVA_TOOL_OPTIONS=-Xmx4g -Ddeephaven.console.type=${DEEPHAVEN_CONSOLE_TYPE} -Ddeephaven.application.dir=${DEEPHAVEN_APPLICATION_DIR}
#
# For remote debugging switch the line above for the one below (and also change the ports below)
# - JAVA_TOOL_OPTIONS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005 -Xmx4g -Ddeephaven.console.type=${DEEPHAVEN_CONSOLE_TYPE} -Ddeephaven.application.dir=${DEEPHAVEN_APPLICATION_DIR}

#
# For jprofiler sessions (if you tweaked the jprofiler version in jprofiler-server/Dockerfile you need to tweak path)
# - JAVA_TOOL_OPTIONS=-agentpath:/opt/jprofiler13.0/bin/linux-x64/libjprofilerti.so=port=8849,nowait -Xmx4g -Ddeephaven.console.type=${DEEPHAVEN_CONSOLE_TYPE} -Ddeephaven.application.dir=${DEEPHAVEN_APPLICATION_DIR}

expose:
- '8080'
# For remote debugging (change if using different port)
# ports:
# - '5005:5005'
# For jprofiler (change if using different port)
# ports:
# - '5005:5005' # For remote debugging (change if using different port)
# - '8849:8849'

# Note: using old-style volume mounts, so that the directories get created if they don't exist
# See https://docs.docker.com/storage/bind-mounts/#differences-between--v-and---mount-behavior
Expand Down
8 changes: 8 additions & 0 deletions jprofiler-server/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
ARG DEEPHAVEN_SERVER_IMAGE
FROM ${DEEPHAVEN_SERVER_IMAGE}

# Replace with the desired version of jprofiler below.
RUN set -eux; \
curl -o /tmp/jprofiler.tgz https://download-gcdn.ej-technologies.com/jprofiler/jprofiler_linux_13_0.tar.gz; \
tar -xzf /tmp/jprofiler.tgz -C /opt; \
rm -f /tmp/jprofiler.tgz