docker-images: database is extremely slow

Hi,

My docker container with Oracle EE 12c is extremely slow, please advise where to look?

Steps to reproduce are as follows:

docker run --name my-ora12ce -p 1521:1521 -p 5500:5500 -e ORACLE_PWD=oracle -v /opt/oracle/oradata:/opt/oracle/oradata oracle/database:12.2.0.1-ee

define m_dir='/opt/oracle/oradata/'

alter session set "_oracle_script"=true;

create tablespace test_8k
blocksize 8K
datafile '&m_dir.test_8k.dbf' size 193m reuse
extent management local 
uniform size 1M
segment space management manual
;
create user test_user identified by "1" container=all;
grant create session to test_user container=all;
grant connect to test_user container=all;
grant resource to test_user container=all;
grant dba to test_user container=all;
grant execute on dbms_stats to test_user container=all;
alter user test_user quota unlimited on test_8k;
alter user test_user default tablespace test_8k;

and then connect as test_user

CREATE TABLE t1
    NOLOGGING
    AS
        WITH generator AS (
            SELECT /*+ materialize */
                DISTINCT
                trunc(dbms_random.value(0,1001) ) AS c1,
                trunc(dbms_random.value(1001,2001) ) AS c2
            FROM
                all_objects
            WHERE
                ROWNUM <= 1E4
        ) SELECT
            g.c1,
            g.c2,
            trunc(dbms_random.value(0,11) ) AS c3,
            trunc(dbms_random.value(0,11) ) AS c4
        FROM
            generator g where rownum < 1e4;

the this creation takes ~800 seconds, with the top wait event ‘PGA memory operation’ though in Oracle 11g2 which runs directly on the same host it is less then 30 seconds, the host machine is RHEL 7.

Thank you.

Azat.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 29 (7 by maintainers)

Most upvoted comments

As a possible workaround one needs to check values for the following parameters in sqlplus:

SHOW PARAMETER FILESYSTEMIO_OPTIONS;
SHOW PARAMETER DISK_ASYNCH_IO;

Then disable async_io:

ALTER SYSTEM SET FILESYSTEMIO_OPTIONS=DIRECTIO SCOPE=SPFILE
/
ALTER SYSTEM SET DISK_ASYNCH_IO=FALSE SCOPE=SPFILE
/

and restart oracle (/etc/init.d/oracle-xe restart).

Hey @Djelibeybi, anything obvious that you spot that could or would cause lower performance for mmap operations? Any chance to figure out whether any kind of resource management is throttling the speed?

After applying the solution suggested by tjlee, I’m also observing the slowness problem with a 18c XE instance.