Setting Up Intel 4th Gen Xeon Scalable "Sapphire Rapids" For Accelerator Use

Written by Michael Larabel in Processors on 15 January 2023 at 04:00 PM EST. Page 3 of 3. 2 Comments.

Onto Some Accelerated Applications

Once you have the necessary system software support for enabling the accelerator support with Sapphire Rapids, it's onto using them! This is where the situation gets more murky with at the moment there being a limited number of public real-world software packages supporting the new Intel accelerators at the moment. This will hopefully improve upon over the next few quarters but will obviously take some time, especially for more of the open-source/community projects to take advantage of the accelerators. At least once Sapphire Rapids become available via public cloud providers should help ease access by developers to being able to try out the accelerators.

Below are some details as to the current accelerator support for a few different notable open-source applications.

ClickHouse

I've long used ClickHouse among my many database benchmarks and seeing Intel promoting this column-oriented DBMS for online analytical processing. Given Intel featuring ClickHouse in the press/analyst slides for 4th Gen Xeon Scalable, I decided to start here. Intel contributed IAA/QPL support to ClickHouse earlier this year. This support is found in ClickHouse 22.8 but with fixes landing since where 22.12+ is recommended.

While ClickHouse does provide various Linux binaries of all their latest releases, they don't actually enable the IAA/QPL support in their official release builds. So at least for now, you need to build it from source. After having QPL and the rest of the Intel support bits in place as outlined above, you need to build ClickHouse with the QPL support enabled (-DENABLE_QPL=ON). The QPL support also depends upon also passing the AVX2 (and ideally AVX-512 too) options to ClickHouse since the QPL software-fallback depends upon AVX instructions.

After going through and building ClickHouse with QPL support for Sapphire Rapids, it doesn't come immediate either. First, the "allow_experimental_codecs" option needs to be set in your ClickHouse server configuration file - for now at least this QPL support is treated as experimental. After the experimental codecs option is enabled, you need to setup your columns and specify the "DEFLATE_QPL" compressor to actually take advantage of the accelerator. Or via the server configuration file you can specify the "deflate_qpl" compression method. So you need to make sure all those conditions are set and the deflate_qpl codec is actually set to be used.

ClickHouse does warn that once using the DEFLATE_QPL compressed data, keep in mind you can only transfer it between AVX2/AVX512 enabled nodes. You would need to convert all the data first otherwise if you transfer to a node without an IAA accelerator or lacking AVX2/AVX512 instruction use (such as An Arm server), you won't be able to access the data.

As of last month, on the ClickHouse GitHub was also a warning:

"We are not supporting the build with QPL, therefore you should fix this warning on your own and send a pull request.

It is also not guaranteed that QPL works at all, as it is still not used in production.

Moreover, if QPL will not be used in production after a year, we will remove it."

This is certainly part of a broader software development concern is about the accelerator adoption and if it will see enough traction or is something that might ultimately get dropped if there is not enough user and developer uptake. In any event, this is the brief guide to get going with ClickHouse for QPL/IAA... Currently working on that optimized ClickHouse for among my Sapphire Rapids benchmarks to come.

RocksDB

The Facebook/Meta-developed RocksDB is another database benchmark I've long used and so was curious about its support too. Unfortunately, there the support isn't yet upstream. Intel offers the iaa-plugin-rocksdb as a plug-in to RocksDB for making use of the IAA accelerator with QPL library.

Besides needing to use this out-of-tree plugin for IAA, the actual plug-in compression framework itself hasn't been upstreamed yet to RocksDB. Back in 2020, an Intel engineer opened this pull request to RocksDB for external compressor plug-in support. So for now you need to patch your RocksDB build and then build the Intel IAA plug-in, and specify the relevant option to actually engage the compressor to enjoy the acceleration.

Apache Spark / Apache Hadoop

To make use of the acceleration hardware for compression/decompression with Apache Spark and Hadoop, the Intel Codec Library Module from Intel's Big Data Analytic Toolkit (BDTK) is needed.


Intel has shown off the very promising performance and efficiency potential for their new accelerator engines with 4th Gen Xeon Scalable, but it isn't yet turn-key getting these accelerators enabled on Linux and the actual upstream software support for these different engines varies.

Software Needs Time To Mature

So for use around the IAA and DSA accelerators by upstream projects, it's a bit limited at this point. Still exploring more options. At least when it comes to making use of the QuickAssist Technology (QAT) that is a bit more readily available thanks to existing software support for QAT in other form factors such as with OpenSSL, IPSec, Nginx with Intel's async_mode module, etc. But it will take some time before there is broader support for the new Intel accelerator IP across various open-source software projects and beyond. Hopefully with time it will become easier to deploy as more Linux distributions package up the user-space utilities/libraries and possibly make for a more automated or intelligent accel-config setup experience especially for simple deployments.

If you enjoyed this article consider joining Phoronix Premium to view this site ad-free, multi-page articles on a single page, and other benefits. PayPal or Stripe tips are also graciously accepted. Thanks for your support.


Related Articles
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.