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

ADBDEV-6156 Count startup memory of each process when using resource groups #1023

Open
wants to merge 30 commits into
base: adb-6.x-dev
Choose a base branch
from

Conversation

dnskvlnk
Copy link
Collaborator

@dnskvlnk dnskvlnk commented Aug 23, 2024

Count the startup memory of each active process when using resource groups

Make the resource manager track the startup memory of each active backend so
that the runaway detector would estimate memory more accurately.

The startup memory is the memory that the backend consumes after startup before
the memory managers (Vmem tracker and resource groups) are initialized. The Vmem
tracker counts this memory as consumed by the segment, but after the backend was
assigned a resource group, this memory was not counted as consumed by the group.

This patch adds startup memory consumption to self->memUsage to make resource
groups consider this memory.
Additionally, this patch slightly modifies the resGroupPalloc function so that
it takes startup memory into account. This is necessary to avoid changing or
complicating the logic of existing tests.

It is worth noting that this patch fixes the accounting of memory consumption by
only active backends (which execute the query). Accounting for the memory
occupied by idle backends is a more complex task that should be done separately.

@BenderArenadata
Copy link

Failed job Deploy multiarch Dockerimages: https://gitlab.adsw.io/arenadata/github_mirroring/gpdb/-/jobs/1807317

@BenderArenadata
Copy link

Allure report https://allure.adsw.io/launch/78383

@BenderArenadata
Copy link

Failed job Resource group isolation tests on x86_64: https://gitlab.adsw.io/arenadata/github_mirroring/gpdb/-/jobs/1807327

@BenderArenadata
Copy link

Failed job Resource group isolation tests on ppc64le: https://gitlab.adsw.io/arenadata/github_mirroring/gpdb/-/jobs/1807328

@dnskvlnk dnskvlnk marked this pull request as ready for review August 26, 2024 16:22
@BenderArenadata
Copy link

Allure report https://allure.adsw.io/launch/78465

@BenderArenadata
Copy link

Failed job Regression tests with ORCA on x86_64: https://gitlab.adsw.io/arenadata/github_mirroring/gpdb/-/jobs/1817041

@BenderArenadata
Copy link

Failed job Regression tests with Postgres on x86_64: https://gitlab.adsw.io/arenadata/github_mirroring/gpdb/-/jobs/1817039

@BenderArenadata
Copy link

Failed job Resource group isolation tests on ppc64le: https://gitlab.adsw.io/arenadata/github_mirroring/gpdb/-/jobs/1817048

@BenderArenadata
Copy link

Failed job Resource group isolation tests on x86_64: https://gitlab.adsw.io/arenadata/github_mirroring/gpdb/-/jobs/1818658

@BenderArenadata
Copy link

Failed job Resource group isolation tests on ppc64le: https://gitlab.adsw.io/arenadata/github_mirroring/gpdb/-/jobs/1818659

@RekGRpth
Copy link
Member

Can you write some tests to check?

@BenderArenadata
Copy link

DROP

-- start_ignore
! gpstop -rai;
Copy link
Member

Choose a reason for hiding this comment

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

may be add

! gpconfig -r gp_resource_manager;

before this line?

Copy link
Collaborator Author

@dnskvlnk dnskvlnk Nov 14, 2024

Choose a reason for hiding this comment

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

This is done in disable_resgroup test

@RekGRpth
Copy link
Member

RekGRpth commented Sep 3, 2024

resgroup/enable_resgroup test hangs after applying patch.

@BenderArenadata
Copy link

@BenderArenadata
Copy link

@BenderArenadata
Copy link

Allure report https://allure.adsw.io/launch/79897

@BenderArenadata
Copy link

Failed job Resource group isolation tests on x86_64: https://gitlab.adsw.io/arenadata/github_mirroring/gpdb/-/jobs/1891649

@BenderArenadata
Copy link

Allure report https://allure.adsw.io/launch/80245

@BenderArenadata
Copy link

Failed job Resource group isolation tests on x86_64: https://gitlab.adsw.io/arenadata/github_mirroring/gpdb/-/jobs/1911167

@BenderArenadata
Copy link

Failed job Build ubuntu22 for x86_64: https://gitlab.adsw.io/arenadata/github_mirroring/gpdb/-/jobs/1924163

@BenderArenadata
Copy link

@BenderArenadata
Copy link

Allure report https://allure.adsw.io/launch/80289

@BenderArenadata
Copy link

Failed job Resource group isolation tests on x86_64: https://gitlab.adsw.io/arenadata/github_mirroring/gpdb/-/jobs/1926814

@BenderArenadata
Copy link

Allure report https://allure.adsw.io/launch/80301

@BenderArenadata
Copy link

Allure report https://allure.adsw.io/launch/90926

@andr-sokolov
Copy link
Member

"but after the backend is assigned a resource group, this memory is not counted as consumed by the group." - it has been fixed, so let's write in past tense

@BenderArenadata
Copy link

Allure report https://allure.adsw.io/launch/91028

@BenderArenadata
Copy link

Allure report https://allure.adsw.io/launch/91031

@BenderArenadata
Copy link

Allure report https://allure.adsw.io/launch/91084

@BenderArenadata
Copy link

Allure report https://allure.adsw.io/launch/92112

@BenderArenadata
Copy link

Allure report https://allure.adsw.io/launch/92267

@BenderArenadata
Copy link

Allure report https://allure.adsw.io/launch/92334

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.

6 participants