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

[bitnami/scylladb] Add --smp and --memory options for ScyllaDB Docker configuration #68051

Closed
siddjellali opened this issue Jun 24, 2024 · 8 comments
Assignees
Labels
scylladb solved stale 15 days without activity tech-issues The user has a technical issue about an application triage Triage is needed

Comments

@siddjellali
Copy link

Name and Version

bitnami/scylladb:6.0-debian-12

What architecture are you using?

None

What steps will reproduce the bug?

We are planning to deploy ScyllaDB in a production environment using Docker via Bitnami. However, we require the --smp and --memory options to properly configure the Docker environment. Currently, these options are not available in the configuration provided by Bitnami.

According to the official ScyllaDB documentation, these options are crucial for optimizing performance and managing resources in a production Docker environment. You can find detailed information in the Best Practices for ScyllaDB on Docker documentation.

  1. Attempt to deploy ScyllaDB using Bitnami's Docker configuration.
  2. Notice that options --smp and --memory are not available.

What is the expected behavior?

Bitnami should include the --smp and --memory options in their Docker configuration for ScyllaDB to align with best practices and ensure optimal performance and resource utilization.

What do you see instead?

None

Additional information

No response

@siddjellali siddjellali added the tech-issues The user has a technical issue about an application label Jun 24, 2024
@github-actions github-actions bot added the triage Triage is needed label Jun 24, 2024
@siddjellali
Copy link
Author

siddjellali commented Jun 24, 2024

I have tried to include scylla_cpuset_setup and scylla_memory_setup in the Dockerfile, but encountered issues. It seems that these parameters are being overridden by the Bitnami script, and these commands require root privileges to execute.

RUN  scylla_cpuset_setup --smp 8 && \
         scylla_memory_setup --memory 4G

@siddjellali
Copy link
Author

siddjellali commented Jun 25, 2024

Hello everyone,
I've identified the missing configuration: it appears that when you run the scyllab binary, some flags are omitted.

#/opt/bitnami/scripts/scylladb/run.sh line 35
exec "$EXEC" "${flags[@]}" --cpuset 0-1 --smp 2 --memory 8G --io-properties-file /opt/bitnami/scylladb/etc/scylla.d/io_properties.yaml

scylla_io_setup needs to be executed at least once to create the io-properties file and necessary directories. Otherwise, the command won't run. I manually created the files below. SCYLLADB_IGNORE_INITDB_SCRIPTS should be set to 'yes' because a Scylla server dry run command tries to run without the correct flag.

Please find below DOCKERFILE to reproduce issue and workarroud.

Dockerfile

FROM bitnami/scylladb:6.0-debian-12
ENV SCYLLADB_DEVELOPER_MODE no
ENV SCYLLADB_IGNORE_INITDB_SCRIPTS yes
RUN mkdir -p /bitnami/scylladb/data/data && \
    mkdir -p /bitnami/scylladb/data/commitlog &&  \
    mkdir -p /bitnami/scylladb/data/hints && \
    mkdir -p /bitnami/scylladb/data/view_hints
COPY io.conf /opt/bitnami/scylladb/etc.default/scylla.d/io.conf
COPY io_properties.yaml /opt/bitnami/scylladb/etc.default/scylla.d/io_properties.yaml
COPY run.sh /opt/bitnami/scripts/scylladb/run.sh

run.sh

#!/bin/bash

# shellcheck disable=SC1091

set -o errexit
set -o nounset
set -o pipefail
# set -o xtrace # Uncomment this line for debugging purposes

# Load libraries
. /opt/bitnami/scripts/liblog.sh
. /opt/bitnami/scripts/libscylladb.sh
. /opt/bitnami/scripts/libos.sh

# Load ScyllaDB environment variables
. /opt/bitnami/scripts/scylladb-env.sh

info "** Starting ScyllaDB **"

EXEC="${DB_BIN_DIR}/scylla"

flags=("--options-file" "$DB_CONF_FILE")
if is_boolean_yes "$SCYLLADB_DEVELOPER_MODE"; then
    flags+=("--developer-mode" "true")
fi

# Add flags passed to this script
flags+=("$@")


info "** Starting $DB_FLAVOR **"
if am_i_root; then
    exec_as_user "$DB_DAEMON_USER" "$EXEC" "${flags[@]}"
else
    exec "$EXEC" "${flags[@]}" --cpuset 0-1 --smp 2 --memory 8G --io-properties-file /opt/bitnami/scylladb/etc/scylla.d/io_properties.yaml
fi

io.conf

SEASTAR_IO="--io-properties-file=/opt/bitnami/scylladb/etc/scylla.d/io_properties.yaml"

io_properties.yaml

disks:
  - mountpoint: /
    read_iops: 915756
    read_bandwidth: 8491704832
    write_iops: 3323
    write_bandwidth: 8449316352

@javsalgar
Copy link
Contributor

Hi!

Thank you so much for the insight. Would you like to contribute with a PR including these settings?

@siddjellali
Copy link
Author

I would love to, but I'm a novice when it comes to Bitnami container scripting and related tasks. The Scylla Bitnami container seems to be a duplicate of the Cassandra container, and I'm not fully proficient in how the functions should be orchestrated and implemented.

Do you know who created it? Perhaps they can provide assistance and help with testing for the community.

@javsalgar
Copy link
Contributor

You can create the PR and the team will guide you on which elements should be changed. It will also perform several verifications as well.

@siddjellali
Copy link
Author

I do my best :)

Copy link

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

@github-actions github-actions bot added the stale 15 days without activity label Jul 19, 2024
Copy link

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scylladb solved stale 15 days without activity tech-issues The user has a technical issue about an application triage Triage is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants