Mais conteúdo relacionado Semelhante a Oracle Database on Docker - Best Practices (20) Oracle Database on Docker - Best Practices4. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
What is Docker?
• A software container platform
• Originated from Linux / Linux Containers
– Also available on Windows and Mac OS X
• Part of the Linux Open Container Initiative (OCI)
– Part of Open Source Linux
• Editions:
– Commercial Edition (EE) – Sold by Docker Corp
– Community Edition (CE) – Part of Open Source Linux
5. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
What is Docker?
• docker-engine: The engine running containers
• Images: Collection of software to be run as a container
• Containers: A container on the Linux host
• Registry: Place to store and download images
• Volumes: Place to persist data outside the container
Terminology
6. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Docker Key Components
Source: https://docs.docker.com/engine/docker-overview/
• Registry
• Images
• Containers
• Docker
daemon/engine
7. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Docker Key Components - Volumes
Source: https://docs.docker.com/engine/docker-overview/
• Registry
• Images
• Containers
• Docker
daemon/engine
8. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
What is Docker?
• Containers are non-persistent
– Once a container is deleted, all files inside that container are gone
Concepts
9. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
What is Docker?
• Containers are non-persistent
– Once a container is deleted, all files inside that container are gone
• Images are immutable
– Changes to an image require to build a new image
– Data to be persisted has to be stored in volumes
Concepts
10. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
What is Docker?
• Containers are non-persistent
– Once a container is deleted, all files inside that container are gone
• Images are immutable
– Changes to an image require to build a new image
– Data to be persisted has to be stored in volumes
• Containers are spun up from images
Concepts
11. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Why is Docker cool?
• Abstracts virtual environment (container) creation
into simple steps:
– docker create …
– docker run …
– docker rm …
• Runs directly on the Linux kernel (cgroups)
– Avoids the hypervisor overhead
12. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Why is Docker cool?
• Abstracts virtual environment (container) creation
into simple steps:
– docker create …
– docker run …
– docker rm …
• Runs directly on the Linux kernel (cgroups)
– Avoids the hypervisor overhead
13. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Why is Docker actually cool?
14. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Why is Docker actually cool?
• Allows abstraction of environments into images
15. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Why is Docker actually cool?
• Allows abstraction of environments into images
• Allows creation of hierarchical images
16. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Why is Docker actually cool?
• Allows abstraction of environments into images
• Allows creation of hierarchical images
17. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Why is Docker actually cool?
• Allows abstraction of environments into images
• Allows creation of hierarchical images
• Supports multi-layered image registries
18. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle MTO & Docker
App B App CApp A
App A App B App C
19. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle Database on Docker
• Oracle Database is fully supported on Docker
– Oracle Linux 7 - UEK 4
– Red Hat Enterprise Linux 7
• Oracle images on Oracle Container Registry & Docker Store
• Docker build files on GitHub
• RAC is not supported
20. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle Database on Docker
• Docker container contains single-PDB CDB (no MTO license required)
• PDB can be plugged, unplugged, etc.
• PDB can move bi-directional
21. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
BEST
PRACTICES
22. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Containers are not VMs!
23. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Containers are not VMs!
– No need to log into a container
24. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Containers are not VMs!
– No need to log into a container
– If you need to change something within the container build a new image
25. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Containers are not VMs!
– No need to log into a container
– If you need to change something within the container build a new image
– Example: Patching
26. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Use the latest Docker version but please, please, please, at least Docker
17.06
27. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Use the latest Docker version but please, please, please, at least Docker
17.06
• 115 bugs fixed in the last year, 24 bug fixes in 17.06 alone
28. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Use the latest Docker version but please, please, please, at least Docker
17.06
• 115 bugs fixed in the last year, 24 bug fixes in 17.06 alone
Step 16/17 : HEALTHCHECK --interval=1m --start-period=5m
CMD "$ORACLE_BASE/$CHECK_DB_FILE" >/dev/null || exit 1
Unknown flag: start-period There was an error building the
image.
29. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Use the latest Docker version but please, please, please, at least Docker
17.06
• 115 bugs fixed in the last year, 24 bug fixes in 17.06 alone
Step 16/17 : HEALTHCHECK --interval=1m --start-period=5m
CMD "$ORACLE_BASE/$CHECK_DB_FILE" >/dev/null || exit 1
Unknown flag: start-period There was an error building the
image.
• Healthcheck start-period introduced in 17.05 (Github issue #632)
30. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Use docker-engine on Oracle Linux
31. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Use docker-engine on Oracle Linux
• Fully supported by Oracle via Oracle Linux support
32. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Use docker-engine on Oracle Linux
• Fully supported by Oracle via Oracle Linux support
• Oracle Linux and docker-engine are fully free of charge for Oracle DB
33. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Use docker-engine on Oracle Linux
• Fully supported by Oracle via Oracle Linux support
• Oracle Linux and docker-engine are fully free of charge for Oracle DB
• Docker Corp only provides Docker EE for Oracle Linux (and Red Hat)
34. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Use docker-engine on Oracle Linux
• Fully supported by Oracle via Oracle Linux support
• Oracle Linux and docker-engine are fully free of charge for Oracle DB
• Docker Corp only provides Docker EE for Oracle Linux (and Red Hat)
• More recent docker-engine releases are in the “preview” yum repo
35. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Use btrfs (Oracle recommended) or overlay2 storage drivers
36. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Use btrfs (Oracle recommended) or overlay2 storage drivers
• overlay (Github issue #432)
bash-4.2# ls -ltr install
ls: cannot access install/checkSpace.sh: No such file or directory
ls: cannot access install/installDBBinaries.sh: No such file or directory
ls: cannot access install/installPerl.sh: No such file or directory
ls: cannot access install/setupLinuxEnv.sh: No such file or directory
ls: cannot access install/db_inst.rsp: No such file or directory
total 0
?????????? ? ? ? ? ? setupLinuxEnv.sh
?????????? ? ? ? ? ? installPerl.sh
?????????? ? ? ? ? ? installDBBinaries.sh
?????????? ? ? ? ? ? db_inst.rsp
?????????? ? ? ? ? ? checkSpace.sh
bash-4.2#
37. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Use btrfs (Oracle recommended) or overlay2 storage drivers
• aufs (Github issue #317)
mv: cannot move '/install/xe.rsp' to a subdirectory of itself,
'/u01/app/oracle/xe.rsp'**
Removing intermediate container 1dc7135ca679
The command 'mv $INSTALL_DIR/$CONFIG_RSP $ORACLE_BASE/ && mv
$INSTALL_DIR/$RUN_FILE ' returned a non-zero code: 1 There was an error
building the image.
38. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Do not use btrfs for data files storage
39. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Do not use btrfs for data files storage
• B-tree filesystem
40. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Do not use btrfs for data files storage
• B-tree filesystem
• Copy-on-write functionality
41. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Do not use btrfs for data files storage
• B-tree filesystem
• Copy-on-write functionality
• Transparent compression
42. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Do not use btrfs for data files storage
• B-tree filesystem
• Copy-on-write functionality
• Transparent compression
• Really not a good fit for your redo and undo
43. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Do not use btrfs for data files storage
• B-tree filesystem
• Copy-on-write functionality
• Transparent compression
• Really not a good fit for your redo and undo
• Also not really a good fit for data files either
44. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Do not use btrfs for data files storage
• B-tree filesystem
• Copy-on-write functionality
• Transparent compression
• Really not a good fit for your redo and undo
• Also not really a good fit for data files either
• Github issue #647
45. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Kernel parameters are global
46. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Kernel parameters are global
• You will have to set the kernel parameters correctly
– Considering each container
– On each Docker host those containers might run
47. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Kernel parameters are global
• You will have to set the kernel parameters correctly
– Considering each container
– On each Docker host those containers might run
sysctl: setting key "kernel.sem": Read-only file system
sysctl: setting key "fs.file-max": Read-only file system
Executing post-install steps... You must run '/etc/init.d/oracle-xe
configure' as the root user to configure the database.
48. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Kernel parameters are global
• You will have to set the kernel parameters correctly
– Considering each container
– On each Docker host those containers might run
• Can set them if the container runs in privileged mode, i.e. access
to the entire machine
sysctl: setting key "kernel.sem": Read-only file system
sysctl: setting key "fs.file-max": Read-only file system
Executing post-install steps... You must run '/etc/init.d/oracle-xe
configure' as the root user to configure the database.
49. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• SELinux policies are global
50. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• SELinux policies are global
• You will have to set SELinux policies correctly
– Considering each container
– On each Docker host those containers might run
51. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• /dev/shm mounted with no exec rights (and only 64MB by default)
52. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• /dev/shm mounted with no exec rights (and only 64MB by default)
• No native compiled PL/SQL
53. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• /dev/shm mounted with no exec rights (and only 64MB by default)
• No native compiled PL/SQL
• No Java stored procedures
54. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• /dev/shm mounted with no exec rights (and only 64MB by default)
• No native compiled PL/SQL
• No Java stored procedures
• No Automatic Memory Management
55. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• /dev/shm mounted with no exec rights (and only 64MB by default)
• No native compiled PL/SQL
• No Java stored procedures
• No Automatic Memory Management
• …
56. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• /dev/shm mounted with no exec rights (and only 64MB by default)
• No native compiled PL/SQL
• No Java stored procedures
• No Automatic Memory Management
• …
• docker run -v /dev/shm --tmpfs
/dev/shm:rw,nosuid,nodev,exec,size=1g ...
57. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Docker volumes
58. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Docker volumes contain data that should be persisted throughout a
container’s lifespan
59. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Docker volumes contain data that should be persisted throughout a
container’s lifespan
• Examples are:
60. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Docker volumes contain data that should be persisted throughout a
container’s lifespan
• Examples are:
– Configuration files
61. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Docker volumes contain data that should be persisted throughout a
container’s lifespan
• Examples are:
– Configuration files
– Log files
62. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Docker volumes contain data that should be persisted throughout a
container’s lifespan
• Examples are:
– Configuration files
– Log files
– Database files
63. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Docker volumes contain data that should be persisted throughout a
container’s lifespan
• Examples are:
– Configuration files
– Log files
– Database files
• Files inside a container are owned by the UID of the container’s user.
64. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Docker volumes contain data that should be persisted throughout a
container’s lifespan
• Examples are:
– Configuration files
– Log files
– Database files
• Files inside a container are owned by the UID of the container’s user.
– UID: 54321 for the oracle Unix user
65. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Docker volumes contain data that should be persisted throughout a
container’s lifespan
• Examples are:
– Configuration files
– Log files
– Database files
• Files inside a container are owned by the UID of the container’s user.
– UID: 54321 for the oracle Unix user
– Can be mapped to another UID with named volumes
66. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Docker Key Components - Volumes
67. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Three ways to create Docker volumes:
68. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Three ways to create Docker volumes:
• Anonymous volumes (no name specified)
69. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Three ways to create Docker volumes:
• Anonymous volumes (no name specified)
• Named volumes (a volume referred to by name)
70. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Three ways to create Docker volumes:
• Anonymous volumes (no name specified)
• Named volumes (a volume referred to by name)
• Host-only volume (a location on the host)
71. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
Anonymous volumes
72. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Are automatically created by Docker as soon as there is a VOLUME
instruction present in the Dockerfile
Anonymous volumes
73. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Are automatically created by Docker as soon as there is a VOLUME
instruction present in the Dockerfile
• Are not easily reusable across containers (you know, anonymous!)
Anonymous volumes
74. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Are automatically created by Docker as soon as there is a VOLUME
instruction present in the Dockerfile
• Are not easily reusable across containers (you know, anonymous!)
Anonymous volumes
"Type": "volume",
"Name":
"7a27a94df5192a20ec6a07502be9a2163faaa150e0076505937578ce785d5376",
"Source":
"/var/lib/docker/volumes/7a27a94df5192a20ec6a07502be9a2163faaa150e0076505937
578ce785d5376/_data",
"Destination": "/opt/oracle/oradata"
75. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
Named volumes
76. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Are explicitly created by the user using docker volume create
Named volumes
77. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Are explicitly created by the user using docker volume create
Named volumes
[oracle@localhost ~]$ docker volume create GeraldVol1
GeraldVol1
[oracle@localhost ~]$ docker volume inspect GeraldVol1
"Mountpoint": "/var/lib/docker/volumes/GeraldVol1/_data",
"Name": "GeraldVol1",
78. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Are explicitly created by the user using docker volume create
• Are great for making volumes specific
Named volumes
[oracle@localhost ~]$ docker volume create GeraldVol1
GeraldVol1
[oracle@localhost ~]$ docker volume inspect GeraldVol1
"Mountpoint": "/var/lib/docker/volumes/GeraldVol1/_data",
"Name": "GeraldVol1",
79. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Are explicitly created by the user using docker volume create
• Are great for making volumes specific
• Transparently copy data from the image into the volume first!
Named volumes
[oracle@localhost ~]$ docker volume create GeraldVol1
GeraldVol1
[oracle@localhost ~]$ docker volume inspect GeraldVol1
"Mountpoint": "/var/lib/docker/volumes/GeraldVol1/_data",
"Name": "GeraldVol1",
80. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Are explicitly created by the user using docker volume create
• Are great for making volumes specific
• Transparently copy data from the image into the volume first!
• But…
Named volumes
[oracle@localhost ~]$ docker volume create GeraldVol1
GeraldVol1
[oracle@localhost ~]$ docker volume inspect GeraldVol1
"Mountpoint": "/var/lib/docker/volumes/GeraldVol1/_data",
"Name": "GeraldVol1",
81. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Hold data in /var/lib/docker/volumes
Named volumes
82. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Hold data in /var/lib/docker/volumes
• Is usually owned by root
Named volumes
83. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Hold data in /var/lib/docker/volumes
• Is usually owned by root
• Contains all volumes of all containers
Named volumes
84. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Hold data in /var/lib/docker/volumes
• Is usually owned by root
– Do you really want to give a user root access?
• Contains all volumes of all containers
Named volumes
85. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Hold data in /var/lib/docker/volumes
• Is usually owned by root
– Do you really want to give a user root access?
• Contains all volumes of all containers
– Do you really want to give a user access to all volumes?
Named volumes
86. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
Host-only volumes
87. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Are created by specifying a location on the host
– docker run –v /home/gerald/volumes:…
Host-only volumes
88. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Are created by specifying a location on the host
– docker run –v /home/gerald/volumes:…
• Offer great flexibility where exactly volume data is being put
Host-only volumes
89. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Are created by specifying a location on the host
– docker run –v /home/gerald/volumes:…
• Offer great flexibility where exactly volume data is being put
• But…
Host-only volumes
90. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Do not transparently copy data from the image into volume first!
Host-only volumes
91. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Do not transparently copy data from the image into volume first!
• Have a static absolute path
Host-only volumes
92. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Do not transparently copy data from the image into volume first!
• Have a static absolute path
• You have to set permissions on the file system accordingly first!
Host-only volumes
93. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Do not transparently copy data from the image into volume first!
• Have a static absolute path
• You have to set permissions on the file system accordingly first!
• They are “host-only”, i.e not cluster aware (other than being put on a
SAN)
Host-only volumes
94. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• VOLUME instructions can’t be removed in child images.
Docker volumes
95. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• VOLUME instructions can’t be removed in child images.
• New --mount option was introduced with 17.06
Docker volumes
96. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• VOLUME instructions can’t be removed in child images.
• New --mount option was introduced with 17.06
– Allows passing on of multiple key/value pairs
Docker volumes
97. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
UNKNOWN
UNKNOWNS
98. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Github issue #601 – database is extremely slow
– PGA memory operation: Wait event for mmap and munmap Unix kernel
operations
Unknown unknowns
99. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Github issue #601 – database is extremely slow
– PGA memory operation: Wait event for mmap and munmap Unix kernel
operations
– ?
Unknown unknowns
100. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Github issue #601 – database is extremely slow
– PGA memory operation: Wait event for mmap and munmap Unix kernel
operations
– ?
• Github issue #525 – unable to connect / as sysdba when using
volumes on Windows 10
Unknown unknowns
101. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Github issue #601 – database is extremely slow
– PGA memory operation: Wait event for mmap and munmap Unix kernel
operations
– ?
• Github issue #525 – unable to connect / as sysdba when using
volumes on Windows 10
– ?
Unknown unknowns
102. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Github issue #601 – database is extremely slow
– PGA memory operation: Wait event for mmap and munmap Unix kernel
operations
– ?
• Github issue #525 – unable to connect / as sysdba when using
volumes on Windows 10
– ?
• Github issue #610 – “It was neither docker, nor Oracle scripts. The problem was
in CPU overclock which led to unstable executing of cp and unzip commands.
Restoring the original clock solved the problem.”
Unknown unknowns
103. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Github issue #601 – database is extremely slow
– PGA memory operation: Wait event for mmap and munmap Unix kernel
operations
– ?
• Github issue #525 – unable to connect / as sysdba when using
volumes on Windows 10
– ?
• Github issue #610 – “It was neither docker, nor Oracle scripts. The problem was
in CPU overclock which led to unstable executing of cp and unzip commands.
Restoring the original clock solved the problem.” ¯_(ツ)_/¯
Unknown unknowns
104. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Last but not least
105. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
Remember
106. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Use btrfs for Docker filesystem
Remember
107. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Use btrfs for Docker filesystem
• Use regular recommended filesystem for database files (ext4, xfs, etc)
– ASM is not supported!
Remember
108. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Use btrfs for Docker filesystem
• Use regular recommended filesystem for database files (ext4, xfs, etc)
– ASM is not supported!
• Use database features whenever possible
– resource manager, encryption, compression, etc.
Remember
109. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• Use btrfs for Docker filesystem
• Use regular recommended filesystem for database files (ext4, xfs, etc)
– ASM is not supported!
• Use database features whenever possible
– resource manager, encryption, compression, etc.
• Stop database containers gracefully
– Allow for higher timeout
Remember
110. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Oracle DB and Docker best practices
• PDBs can be plugged in and out of containers
– Great for patching
– Great for upgrade
– Great for placement flexibility
Oracle MTO & Docker – a great synergy
111. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. |
Best practices for
running
Oracle Database
on Docker