Description
By adding binary logging infrastructure to Ganesha, users will be able to gain better performance as format strings won't be processed in run-time and logs will be of smaller size.
We can also add to that an option to store logs in a cyclic buffer in-memory that will also reduce the disk iops that Ganesha is doing by default, while allowing users to configure an online / on-demand logs spooler to convert in-memory binary logs to printable logs, that can also be sent to an external service.
The ultimate goal of this work is to improve the IO performance that Ganesha can provide to client's while also allowing us to configure it to output logs with a higher granularity to improve its observability.
There are many out-of-the-box efficient binary logging infrastructures that exist in C++ that we will be able to benefit from but that will require an preliminary work to get Ganesha to fully compile in C++.
- NanoLog- https://github.com/PlatformLab/NanoLog (2.4k stars on GitHub, 300+ forks, ISC license [allows everything])
- spdlog- https://github.com/gabime/spdlog (21k stars, 4.2k forks, MIT license)
- quil- https://github.com/odygrd/quill (1k stars, 100+ forks, MIT license)
- binlog- https://github.com/morganstanley/binlog (developed by Morgan Stanley, Apache license)
That’s a partial list, the quil’s repository has a benchmark for those ones and more- https://github.com/odygrd/logger_benchmarks/tree/master/benchmarks/call_site_latency
List of features they provide-
- https://github.com/odygrd/quill?tab=readme-ov-file#features
- https://github.com/morganstanley/binlog?tab=readme-ov-file#features
- https://github.com/gabime/spdlog?tab=readme-ov-file#features
- https://github.com/PlatformLab/NanoLog?tab=readme-ov-file#throughput
If we decide to go that way, we shall launch an effort to compile NFS-Ganesha in modern C++ and then discuss on the binary logging infrastructure that we would want to integrate with.
LMK what you think.