|
| 1 | +# Fake (GPU) device file generator |
| 2 | + |
| 3 | +Table of Contents |
| 4 | +* [Introduction](#introduction) |
| 5 | +* [Configuration](#configuration) |
| 6 | +* [Potential improvements](#potential-improvements) |
| 7 | +* [Related tools](#related-tools) |
| 8 | + |
| 9 | +## Introduction |
| 10 | + |
| 11 | +This is a tool for generating (large number of) fake device files for |
| 12 | +k8s device scheduling scalability testing. But it can also be used |
| 13 | +just to test (GPU) device plugin functionality without having |
| 14 | +corresponding device HW. |
| 15 | + |
| 16 | +Its "intel-gpu-fakedev" container is intended to be run as first init |
| 17 | +container in a device plugin pod, so that device plugin (and its NFD |
| 18 | +labeler) see the fake (sysfs + devfs) files generated by the tool, |
| 19 | +instead of real host sysfs and devfs content. |
| 20 | + |
| 21 | +## Configuration |
| 22 | + |
| 23 | +[Configs](configs/) subdirectory contains example JSON configuration |
| 24 | +file(s) for the generator. Currently there's only one example JSON |
| 25 | +file, but each new device variant adding feature(s) that have specific |
| 26 | +support in device plugin, could have their own fake device config. |
| 27 | + |
| 28 | +## Potential improvements |
| 29 | + |
| 30 | +If support for mixed device environment is needed, tool can be updated |
| 31 | +to use node / configuration file mapping. Such mappings could be e.g. |
| 32 | +in configuration files themselves as node name include / exlude lists, |
| 33 | +and tool would use first configuration file matching the node it's |
| 34 | +running on. For now, one would need to use different pod / config |
| 35 | +specs for different nodes to achieve that... |
| 36 | + |
| 37 | +Currently JSON config file options and the generated files are tied to |
| 38 | +what GPU plugin uses, but if needed, they could be changed to fake |
| 39 | +also sysfs + devfs device files used by other plugins. |
| 40 | + |
| 41 | +## Related tools |
| 42 | + |
| 43 | +[fakedev-exporter](#https://github.com/intel/fakedev-exporter) project |
| 44 | +can be used to schedule suitably configured fake workloads on the fake |
| 45 | +devices, and to provide provide fake activity metrics for them to |
| 46 | +Prometheus, that look like they were reported by real Prometheus |
| 47 | +metric exporters for real workloads running on real devices. |
0 commit comments