'Oracle Database on Docker is very, very slow
I created one Oracle Database on Docker based on the instruction and dockerfile in the following website.
https://github.com/oracle/docker-images/tree/master/OracleDatabase
After image is created and I run
docker run --name oracle -p 1521:1521 -p 5500:5500 -e ORACLE_SID=ORCLCDB -e ORACLE_PDB=ORCLPDB1 oracle/database:12.1.0.2-ee
to start a oracle container. But it is terribly slow.
The following is log:
...
Starting /opt/oracle/product/12.1.0.2/dbhome_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 12.1.0.2.0 - Production
System parameter file is /opt/oracle/product/12.1.0.2/dbhome_1/network/admin/listener.ora
Log messages written to /opt/oracle/diag/tnslsnr/c88078b7a26e/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 12.1.0.2.0 - Production
Start Date 04-SEP-2016 21:04:43
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /opt/oracle/product/12.1.0.2/dbhome_1/network/admin/listener.ora
Listener Log File /opt/oracle/diag/tnslsnr/c88078b7a26e/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))
The listener supports no services
The command completed successfully
Copying database files
1% complete
2% complete
27% complete
Creating and starting Oracle instance
29% complete
32% complete
33% complete
34% complete
38% complete
42% complete
43% complete
45% complete
Completing Database Creation
48% complete
51% complete
53% complete
62% complete
64% complete
72% complete
Creating Pluggable Databases
78% complete
100% complete
Anyone can tell me how I can speed it up. It took 20min to finish. I saw a message at the end of this log, not sure whether it is related to slowness or not.
Default pga_aggregate_limit value is too high for the amount of physical memory in the system pga_aggregate_limit is 2048 MB limit based on physical memory and SGA usage is 2020 MB
Solution 1:[1]
I managed to drop DB startup time significantly. The idea is to take a snapshot of the already configured and running database. More information and step by step guide can be found here: https://medium.com/@ggajos/drop-db-startup-time-from-45-to-3-minutes-in-dockerized-oracle-19-3-0-552068593deb
Solution 2:[2]
https://github.com/oracle/docker-images/issues/141 The slowness due to the installation step. Thanks Justin Cave for prompt help.
Solution 3:[3]
You can create your custom Dockerfile based on Oracle image pro other. I've prepared for my id? case a image which Dora not.require this setup step. You can see https://github.com/KamilJedrzejuk/oracle18c-xe
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Grzegorz Gajos |
| Solution 2 | qunzi |
| Solution 3 | K2mil J33 |
