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

feat: Proxy memory allocation helper #2605

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open

Conversation

ovidijusnortal
Copy link
Contributor

No description provided.

@ovidijusnortal ovidijusnortal marked this pull request as ready for review February 4, 2025 07:41
@ovidijusnortal ovidijusnortal requested review from a team and ricardas-buc and removed request for a team February 4, 2025 07:41
Copy link

github-actions bot commented Feb 4, 2025

Job Summary for Gradle

Build and test :: BuildAndPackageWithUnitTests
Gradle Root Project Requested Tasks Gradle Version Build Outcome Build Scan®
x-road-core
build sonar test intTest runProxyTest runMetaserviceTest ru…
8.12 Build Scan not published

@ovidijusnortal ovidijusnortal removed the request for review from ricardas-buc February 4, 2025 13:41
Copy link

github-actions bot commented Feb 4, 2025

Job Summary for Gradle

Build and test :: BuildAndPackageWithUnitTests
Gradle Root Project Requested Tasks Gradle Version Build Outcome Build Scan®
x-road-core
build sonar test intTest runProxyTest runMetaserviceTest ru…
8.12 Build Scan not published

@ovidijusnortal ovidijusnortal requested a review from mloitm February 5, 2025 07:05
if [ -z "$params" ]; then
echo "$1=$xms $xmx" >> "$params_file"
else
local pattern="-Xms[0-9]+[mg]"
Copy link
Contributor

Choose a reason for hiding this comment

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

According to documentation, Xmx and Xms can also be set in k or in plain bytes. Also unit suffix should be case insensitive.


function find_xmx() {
if [[ "$1" =~ -Xmx([0-9]+[mg]) ]]; then
echo "${BASH_REMATCH[1]}"
Copy link
Contributor

Choose a reason for hiding this comment

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

-Xmx can be specified multiple times, the last one is used. To make things even more complicated, there's also equivalent -XX:MaxHeapSize

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mloitm about k and just units, my thinking was that for proxy nobody will use such small units when 512m is declared as minimum unless someone will want to allocate very precise amount of memory

Initial implementation

Refs: XRDDEV-55
This reverts commit ad32823bfc51c294efb8ee7fe76fce260a635f33.
fix redhat build

Refs: XRDDEV-55
Copy link

sonarqubecloud bot commented Feb 6, 2025

Copy link

github-actions bot commented Feb 6, 2025

Job Summary for Gradle

Build and test :: BuildAndPackageWithUnitTests
Gradle Root Project Requested Tasks Gradle Version Build Outcome Build Scan®
x-road-core
build sonar test intTest runProxyTest runMetaserviceTest ru…
8.12 Build Scan not published

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