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

Allow the initial amount of memory for databases to be configurable #1576

Closed

Conversation

steveswinsburg
Copy link
Contributor

This is the PR for #1575.

I have only added this for Oracle 19c. Let me know if this needs to be added for the other versions as well.

Also note I submitted the OCA on 13th April 2020.

Steve Swinsburg added 4 commits April 14, 2020 09:26
Signed-off-by: Steve Swinsburg <steve.swinsburg@gmail.com>
…eswinsburg/docker-images into feature/configurable-memory

* 'feature/configurable-memory' of https://github.com/steveswinsburg/docker-images:
  Make memory configurable in 19c
Signed-off-by: Steve Swinsburg <steve.swinsburg@gmail.com>
@steveswinsburg steveswinsburg requested a review from gvenzl as a code owner April 14, 2020 01:22
@Djelibeybi Djelibeybi added oca-required The PR requires the OCA to be signed (https://www.oracle.com/technetwork/community/oca-486395.html) oca-verified The OCA has been signed and processed and removed oca-required The PR requires the OCA to be signed (https://www.oracle.com/technetwork/community/oca-486395.html) labels Apr 14, 2020
@Djelibeybi
Copy link
Member

@gvenzl OCA verified. Please go ahead and review.

@Djelibeybi Djelibeybi removed their assignment Apr 14, 2020
@gvenzl gvenzl requested review from latakannan, a user and yunus-qureshi August 3, 2020 16:48
@gvenzl gvenzl removed request for yunus-qureshi, latakannan and a user August 3, 2020 16:48
@gvenzl
Copy link
Member

gvenzl commented Aug 3, 2020

@yunus-qureshi @latakannan @rishabh20oracle, can you please take a look at this PR please and evaluate the ability to pass on memory requirements to the database? Ideally, this parameter takes effect also when a database is started, not only when it's created. The question is whether we can easily retrieve the configured parameter without having to startup the database, retrieve the memory, and then restart the DB with the new value if it has changed.

Also, please have a look at https://stackoverflow.com/questions/42187085/check-mem-limit-within-a-docker-container. We need to also verify whether the container does even have enough memory that is requested by the parameter.

@rishabh20
Copy link
Member

@gvenzl @yunus-qureshi @latakannan I see a few concerns with this PR and I have few use-cases in mind where this will not address the problems that we intend to solve with this enhancement.

  1. The parameter being introduced will only be taken into account if the no. of cores is less than 8. Otherwise, 40% of available memory will be used. And till 19c, the logic in DBCA for getting available memory inside a docker container hasn't been enhanced to understand things like pod yaml specs, docker --memory param, etc. So, for large systems where memory limits are set on docker containers, dbca will be creating db using wrong memory values. This brings me to my 2nd point.

  2. Should we use this parameter irrespective of whatever the number of cores is? Whenever this param is set, we try to check if the container has this much available memory and continue/fail accordingly. If it is not set, we do what we were doing till now, use 2048 for cores < 8 and 40% of available memory for cores > 8 (here the memory calculation by dbca could go wrong if mem limits are set for the container and then we request the user to use the exposed memory param).

  3. Regarding starting the database, instead of creating one, since we make use of spfile for starting the db which is a binary file and not a text file, we will have to start the db, run the show init param sql command and then compare this value with the newly passed value. We will have to run alter system set init param sql command and then bounce the db to reflect the changes. I don't know if we want to do all this or just allow the user to select the memory only for the 1st time while creating the db. Of course, that limits the user to reuse existing datafiles on the same system and does not let them transfer the files to another machine.

@rishabh20
Copy link
Member

Closing this PR as the recommended way for giving control to the user to set memory limits is to allow them to set SGA and PGA size. Opened another PR #1742 which implements that functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
oca-verified The OCA has been signed and processed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants