docker volume performance (portworx, nfs, bind mount)

I consider using NFS for shared volume on Docker Swarm. So I wonder how the performance of Docker NFS volumes may be.

Docker cache or delegated volumes have a huge effect on read an mostly outperform native read by far. On direct io this options do not have any effect.

The test is done on local host all to the same physical disk. Network latency is no considered. The Portworx is a standalone setup and might not represent the performance of a large cluster with replication.

docker run -it --rm -v jenkins_vol:/demo -v nfstest:/nfs ubuntu 
/bin/bash

root@686890cca159:/# set -o vi                                                                                                                                                                                                                                                                                                                                                                                                                                                   
root@686890cca159:/# dd if=/dev/zero of=/bindmount/test bs=1M count=1000 oflag=direct                                                                                                                                                                     
1000+0 records in                                                                                                                                                                                                                                        
1000+0 records out
1048576000 bytes (1.0 GB, 1000 MiB) copied, 4.80277 s, 218 MB/s
root@686890cca159:/# dd if=/dev/zero of=/portworxvolume/test bs=1M count=1000 oflag=direct                                                                                                                                                               
1000+0 records in                                                                                                                                                                                                                                        
1000+0 records out
1048576000 bytes (1.0 GB, 1000 MiB) copied, 6.08722 s, 172 MB/s
root@686890cca159:/# dd if=/dev/zero of=/nfs/test bs=1M count=1000 oflag=direct                                                                                                                                                                          
1000+0 records in                                                                                                                                                                                                                                        
1000+0 records out
1048576000 bytes (1.0 GB, 1000 MiB) copied, 15.3807 s, 68.2 MB/s

But still the NFS seem to be significantly slower. NFS tuning did not change write performance.

Indexing Oracle table columns of collection type (nested table)

With Oracle’s Object-Relational you can store collection of user defined datatypes (UDT) in a table column. This column can be stored a IOT or heap table.

If stored as heap table (normal table) you may want to index the nested table so that there are not FTS on every access.

---------------------------------------------------------------------------------------------------------------------
| Id  | Operation                           | Name                          | Rows  | Bytes | Cost (%CPU)| Time     |
---------------------------------------------------------------------------------------------------------------------
|   0 | SELECT STATEMENT                    |                               |     9 |  1818 | 32469   (1)| 00:00:02 |
|*  1 |  TABLE ACCESS FULL                  | TABLE                         |     1 |    81 |   309   (1)| 00:00:01 |

The nested table has a hidden column “NESTED_TABLE_ID” which can be indexed:

create index <my_index>on <my_nested_table> (NESTED_TABLE_ID)
---------------------------------------------------------------------------------------------------------------------
| Id  | Operation                           | Name                          | Rows  | Bytes | Cost (%CPU)| Time     |
---------------------------------------------------------------------------------------------------------------------
|   0 | SELECT STATEMENT                    |                               |     9 |  1818 |    56   (0)| 00:00:01 |
|   1 |  TABLE ACCESS BY INDEX ROWID BATCHED| NESTED_TABXX_TAB2             |     1 |    27 |     2   (0)| 00:00:01 |
|*  2 |   INDEX RANGE SCAN                  | NESTED_TAB_IX1                |     1 |       |     1   (0)| 00:00:01 |

* Don’t forget to gather statistics after create the indexes