Oracle XE 11g poor response time in queries

We are trying to start using docker in our development team and I’m trying out the database in docker, but the performance is really poor. I find this very strange because I’ve tried to find a possible cause, but I can’t find any.
In my tests I have one cartesian product and distinct query should have a response time in 2ms but have 50ms response time in docker.
Maby I’m just missing something obvious, but I have tried many different combinations and checked lots of forums.
Any Ideas? It’s been a long week. :smile:

Test:
Query with moderate data amount and complexity. Cartesian Product and distinct. Total multiplied 10M Rows. Should have response time 2ms. The end resultset is a couple of hundred rows and few MB of data.

Strange:
When I test my query in both environments there is a diff in responsetime, but the same “explained query time” (the query broken down in pieces and ms by oracle query engine).
I find no increase in CPU, Disk or Memory load, even if I repeat the query. There are only block reads (cache hits) and no disk reads.

Tried:

  1. Remove Docker NAT.
  2. Use the “-net=host” flag.
  3. Use “correct” swap. (Oracle accepts is)

Monitor tools:

  1. Disk performance (IOTop + Docker stats)
  2. Net performance (IFTop + Docker stats)
  3. CPU (Top + Docker stats)
  4. SQL Query performance (SqlPlus - set timing on - set autotrace on )

Enviornment:

  • MAC book pro 16GB ram iCore7 SSD.
  • VMware Fusion 6.0.4

Docker containers tested:

  • alexeiled/docker-oracle-xe-11g (DockerHub)
  • wnameless/oracle-xe-11g (DockerHub)
  • madhead/docker-oracle-xe (GitHub)
  • Own container build from CentOS7 and latest Oracle XE.

Docker env:

  • Latest Boot2Docker
  • Own Debian 7 installation.

Use Docker image sath89/oracle-xe-11g
https://hub.docker.com/r/sath89/oracle-xe-11g/

We managed to work around the problem turning oracle async io off, but never found what caused the problem.

ALTER SYSTEM SET disk_asynch_io = FALSE SCOPE = SPFILE;

This was very helpful, thank you! It completely resolves the slowness issue!

BTW the sath89 image itself didn’t help … but it’s a great image, much smaller then the original provided by Oracle.