Docker exec on certain aws instances VERY slow

Hi all

We are seeing that the ‘docker exec’ on certain aws instances takes very long resulting in our application timing out. Can someone help us debug this issue?

Good host:

real 0m0.276s
user 0m0.044s
sys 0m0.024s

Affected host:

real 0m18.184s
user 0m0.012s
sys 0m0.016s

Docker info on the affected host:
Containers: 12
Running: 5
Paused: 0
Stopped: 7
Images: 8
Server Version: 17.04.0-ce
Storage Driver: overlay
Backing Filesystem: xfs
Supports d_type: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Swarm: inactive
Runtimes: runc oci
Default Runtime: runc
Init Binary:
containerd version: (expected: 422e31ce907fd9c3833a38d7b8fdd023e5a76e73)
runc version: N/A (expected: 9c2d8d184e5da67c95d601382adf14862e4f2228)
init version: N/A (expected: 949e6facb77383876aeff8a6944dde66b3089574)
Security Options:
apparmor
Kernel Version: 3.12.74-60.64.69-default
Operating System: SUSE Linux Enterprise Server 12 SP1
OSType: linux
Architecture: x86_64
CPUs: 64
Total Memory: 478.9GiB
Name: ip-10-20-96-51
ID: 6IFZ:RJ2C:EBWP:EMHP:UQFJ:RMTY:ZLPH:2DHE:AM2X:R2IH:2EOO:6QSZ
Docker Root Dir: /docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false

WARNING: No swap limit support
WARNING: No kernel memory limit support

Docker version: Docker version 17.04.0-ce, build 78d1802

aws Host: r4.16xlarge

OS version:
NAME=“SLES”
VERSION=“12-SP1”
VERSION_ID=“12.1”
PRETTY_NAME=“SUSE Linux Enterprise Server 12 SP1”
ID=“sles”
ANSI_COLOR=“0;32”
CPE_NAME=“cpe:/o:suse:sles:12:sp1”