Introducing Libnoload – A Comprehensive API for Interfacing with Eideticom NoLoad® Hardware
- Written by: Andrew Maier
Intro
In the world of high-performance Computational Storage, efficient data management and hardware access is critical. Libnoload is a robust software library API designed for seamlessly interfacing with NoLoad hardware platforms. It simplifies integration with NoLoad computational storage hardware and improves performance, saving developers significant time and resources. Libnoload handles all hardware interactions by leveraging the standard NVMe in-box driver. The included Command Line Interface (CLI) allows quick accelerator access as well as a suite of administrative capabilities such as firmware updates, status monitoring, and information logging. With the Libnoload software package, users can expect streamlined access to NoLoad acceleration and administrative features.
Components of Libnoload
Libnoload is a suite of software libraries including interfaces to C, python, and more broken into different packages. A typical release of libnoload contains the following packages:
Package | Description |
libnoload1 | Shared object library file (static library also available) |
libnoload-dev | Development headers for libnoload |
noload | CLI application for quick/easy interfacing |
noload-daemon | Daemon to control access to libnoload for unprivileged users. |
python3-noload | Python API of libnoload |
noload-exporter | Prometheus metrics exporter for monitoring devices |
noload-doc | Installed API documentation for the libnoload library |
Table 1: List of libnoload files
Application Interfaces
To better understand how Libnoload fits into the system, consider the following block diagram:
Figure 1: Block Diagram of Libnoload Interfaces
In Figure 1, the block diagram shows how libnoload acts as a middleware layer interfacing the application to NoLoad hardware. The application can interface with the libnoload by a variety of different methods from the included command line interface (CLI), an asynchronous API, a synchronous API, and an advanced access API.
Command Line Interface (CLI)
The libnoload CLI provides convenient access to the NoLoad hardware features including administrative functionality and I/O.
Admin Command | Description |
list | List all available accelerators attached in the system |
info | Print the device(s) and accelerator(s) version information |
status | Print the device real time counter statistics |
watch | Display realtime status values in a curses window |
fwupdate | Update the firmware image on a NoLoad |
fwinfo | Display information about a specified FW image update file |
Table 2: Table of available CLI admin commands
Table 2 shows snippet of available administrative functions provided by the command line interface utility. Alongside these admin commands, the CLI also provides quick and convenient access for providing I/O to/from the accelerators. For example, to compress a file called calgary.tar the CLI command is simply
$sudo noload gzip calgary.tar
The CLI also allows for fine tuning of the data flow by allowing file I/O access for both the source/destination and allowing for the option of using peer-to-peer direct memory access (p2pdma) for transferring the data.
The admin commands available in the CLI provide in-band management of the devices. Alongside being able to update the firmware and list device information, the provided “status” and “watch” commands allow users to monitor traffic moving across each device.
Figure 2: Sample "noload watch" output
An example of the “watch” command output is shown in Figure 2. This tool allows you to see the real-time counter values for the different parts of the NoLoad system.
Asynchronous API
The highest-level method for running jobs on NoLoad hardware is to use the Asynchronous (or Async Context) API. This program level interface creates a thread pool of workers for sending jobs efficiently to all NoLoad devices in the system. The programmer simply creates a context for the accelerator type (i.e. compression), submits jobs to the context and completes them. Because all the scheduling and threading is handled in the library, libnoload efficiently allows applications to submit jobs at will and then pick them up when they are complete, freeing up the application program to process other tasks while waiting for their job to finish. This allows more efficient and effective CPU usage.
Synchronous API
For applications that require more control of threads, the Synchronous API can be used to submit jobs in a single thread. In this interface, the application can create synchronous workers. While each of the synchronous workers themselves are not thread safe, the application can create and manage its own threading to launch multiple workers simultaneously to achieve parallelism. This is especially useful if users are concerned about CPU threading.
Advanced API
For advanced users, libnoload provides a final lowest level interface to manually control each job through the pipeline. Much like with the synchronous API, an application can create advanced workers for processing the job however in advanced mode the program must also control the interactions with the hardware. The application is responsible for chunking the data and managing the traffic to/from the hardware via threading.
Prometheus Exporter
Alongside the existing tools for monitoring status (see the CLI watch/status commands), the noload-exporter package allows users to export the real-time device information in a Prometheus format. Users can integrate this into their own Prometheus or Grafana setups, however Eideticom also provides example dashboards for monitoring devices for free on Grafana Hub [1].
Documentation Generation
One significant recent update has been in the auto generation and release of documentation. Not only are all API functions properly documented in the doxygen format [2], but there has been a recent effort to providing updated getting started guides and example files. The getting started guide walks you through both the initial setup of the library as well as explaining some of the example code snippets to better describe the API calls. Eideticom partners and customers will have access to the latest documentation versions that are hosted on our webpage (https://docs.eideticom.com).
Takeaways
- Libnoload has evolved into a stable and efficient API for accessing NoLoad hardware
- Users can pick from a variety of interfaces to the library including support for python and C
- The included status monitoring and exporting tools allows users to view and record performance and telemetry metrics on command line, Prometheus, and Grafana.
Contact Eideticom (
References
[1] | "Eideticom Grafana Hub," [Online]. Available: https://grafana.com/grafana/dashboards/16783-nlfs-noload-exporter/. |
[2] | "Doxygen," [Online]. Available: https://www.doxygen.nl/. |