-
Notifications
You must be signed in to change notification settings - Fork 77
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
limit cpu count to fix boot issue on machines with high core count #107
Conversation
Rebased to sign the commit, and I was able to start the docker image on my machine with cpu_count set to |
Hi @Felk, Thanks for this PR, I have to say I'm somewhat surprised that this works.
However, the Oracle software clearly seems to calculate the memory requirements based on CPU count before the CPU count is set to 2, otherwise, we would never run into that issue of not having enough memory to begin with. So your fix made me curious, what's actually in that pfile once you create it?
And if
So now I wonder, could it be that this is what happens:
So what if I just explicitly set the Could you do me a favor and check the two following on your env (as I do not have a machine with 96 cores :)): Once the DB is up, could you please go into the container And likewise, could you please recreate the
I bet it shows up as The reason why I want to get it into the image itself btw is so that we don't pay that penalty of recreating the parameter file during container startup. It's probably just a couple of milliseconds that we save but hey, whatever can be done during image build means people don't have to wait during container startup, right? :) |
I just tested the test image
SQL> host cat /tmp/pfile.ora
While using gvenzl/oracle-xe:21.3.0-slim instead:(I'm testing on a 48 cores workstation)
SQL> host cat /tmp/pfile.ora
|
Awesome, thanks so much @Sanne, that confirms my theory! I also seem to have been wrong that |
Yep, that's what I saw too. Part of the reason I did
Using my 16-core testimage, because the original one does not boot on that machine:
Not sure this is even useful to you then.
Thank you, that sounds like it will fix the issue. I'll gladly try out the image |
Thanks a lot, @Felk! I have uploaded |
|
Awesome, thanks so much for verifying! |
I'll close this pull request since the changes are obsolete now and am thrilled to finally have our CI pipeline run oracle once this makes it into the official image |
The fix is now present in all images! Thanks once more @Felk for this great discovery! |
This fixes the issues I faced in #64
With this change I am successfully able to start the image on a 96-core host machine, which previously errored with
ORA-00821: Specified value of sga_target 1808M is too small, needs to be at least 2320M
.According to the documentation on CPU_COUNT, this is interpreted as a maximum if used during initialization, so it shouldn't be a problem for machines with fewer than 16 counts:
I don't have a machine with fewer than 16 cores at hand, but I'll set this to 999 locally and see if that boots successfully too to verify it works. Building the image just takes a while each time 😅