I am running Ubuntu 16.04 on an EC2 p2.xlarge shared instance.
The P2.xlarge instance gives access to a single GPU (1/2 of an NVidia K80 GPU?) to my shared instance.
How is this GPU shared between other Amazon EC2 instances on the same physical machine?
I was under the impression that 100% of the GPU was allocated to my instance. But this is clearly not the case. When my instance is running nothing on the GPU:
$ nvidia-smi
Tue Feb 21 00:11:16 2017
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 375.39 Driver Version: 375.39 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 Tesla K80 Off | 0000:00:1E.0 Off | 0 |
| N/A 39C P0 55W / 149W | 0MiB / 11439MiB | 63% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+
A moment later:
| 0 Tesla K80 Off | 0000:00:1E.0 Off | 0 |
| N/A 40C P0 57W / 149W | 0MiB / 11439MiB | 97% Default |
And the next moment:
| 0 Tesla K80 Off | 0000:00:1E.0 Off | 0 |
| N/A 40C P0 56W / 149W | 0MiB / 11439MiB | 100% Default |
And pretty much stays there...
| 0 Tesla K80 Off | 0000:00:1E.0 Off | 0 |
| N/A 41C P0 56W / 149W | 0MiB / 11439MiB | 100% Default |
| 0 Tesla K80 Off | 0000:00:1E.0 Off | 0 |
| N/A 41C P0 56W / 149W | 0MiB / 11439MiB | 99% Default |