oracle / docker-images

Official source of container configurations, images, and examples for Oracle products and projects
https://developer.oracle.com/use-cases/#containers
Universal Permissive License v1.0
6.47k stars 5.41k forks source link

Explicit documentation surrounding default machine CPU and memory settings and implications for container resources #2713

Open chrishoina opened 9 months ago

chrishoina commented 9 months ago

I ended up documenting this in a post here. But the issue I was running into ended up being one of insufficient memory in the virtual machine (or at least that is what I think). Basically, two databases cannot be provisioned with the default podman machine.

I had a previous container with a volume attached, and it would always show as healthy. It is an Oracle 21c image from the Oracle Container Registry. I wanted to create another container with an Oracle 23c database. And the build always seemed to hang. And when I would issue the podman ps command its status would always be unhealthy.

I ended up initializing a new machine with cpu=2 and memory=4096. And then created the two containers, both are healthy. Some observations (from beginner):

  1. I don't know if the docs explicitly state what the default machine settings are (CPU and memory). And I don't know if it is discussed anywhere what the implications might be, or what a container that tries to start up when there is insufficient memory might look like.
  2. And podman logs (I don't think this is a fault of podman, because it's just displaying whatever is in the logs), but the image I'm attaching doesn't explicitly point toward memory being the culprit. I don't know how to improve this.
podman logs command chris hoina senior product manager ords database tools oracle
gvenzl commented 9 months ago

Hey @yunus-qureshi,

Please have a look at this. I wonder whether we need to enhance https://github.com/oracle/docker-images/blob/main/OracleDatabase/SingleInstance/dockerfiles/23.2.0/runOracle.sh#L113-L129 to not only verify the memory limits across containers but also how much memory is still available inside the container

yunus-qureshi commented 9 months ago

@gvenzl Not sure if it is straight forward to check the available memory vs allocated memory. We will check and get back.