Spectre is a C framework for collecting and distributing system performance statistics. It is free software distributed under the terms of the GNU Lesser General Public License.
With the commoditization of virtualization technology, it will be increasingly common to find multiple operating systems running on a single physical host. To make effective use of hardware will require clear insight into the performance of both guest OSs, the management OS and the hypervisor itself. Spectre aims to provide a flexible framework for collecting resource utilization and performance statistics, distributing the collected data between hosts / OSs, and providing data feeds to applications for analysis and reporting.
Thus the important aspects of Spectre are:
- Low overhead - the agent for collecting data from a guest OS must not consume measurable CPU / memory or network resources. Even a mere 1% of CPU time is unacceptable - with 10-20 guest OSs executing, CPU usage from monitoring would quickly add up. Spectre is written in C polling for data event loop to maximise the useful work which can be done, without having to resort to multi-threading.
- Extensible - the set of statistics collected must not be hardwired into the system. The system must be capable of collecting arbitrary administrator-defined resource utilization / performance data. The data sources and distribution sinks can be loaded into the Spectre daemon on the fly, enabling complete control over deployment
- Portable - virtualization will make it possible for a single machine to host multiple different operating systems, so at least the agent must be portable to all common OSs. Linux, Windows, *BSD, Solaris are all candidates for deployment. The two core build dependancies for Spectre are GLib and for deployment. The two core build dependencies for Spectre are GLib and GNet, both of which have been ported to all common OSs. The preferred data collection library, libStatGrab, is likewise portable across OSs
- Flexible - the system must be capable of easily integrating with whatever system / network deployment model a site chooses to use. Spectre achieves this by providing multiple different modes for distributing data between OSs and hosts. It can use UDP unicast, UDP multicast, TCP (either pushing or pulling) data between hosts, or UNIX domain sockets for feeding applications on the local OS.
- Formal API - to allow an ecosystem of management applications to evolve around the data collection and distribution system, there needs to be a formal API. Spectre provides documented APIs for writing new data collection plugins, as well as APIs to receive a feed of data for processing. The APIs are accessible from both C and Python.