]> git.proxmox.com Git - ceph.git/blob - ceph/doc/radosgw/qat-accel.rst
import 15.2.0 Octopus source
[ceph.git] / ceph / doc / radosgw / qat-accel.rst
1 ===============================================
2 QAT Acceleration for Encryption and Compression
3 ===============================================
4
5 Intel QAT (QuickAssist Technology) can provide extended accelerated encryption
6 and compression services by offloading the actual encryption and compression
7 request(s) to the hardware QuickAssist accelerators, which are more efficient
8 in terms of cost and power than general purpose CPUs for those specific
9 compute-intensive workloads.
10
11 See `QAT Support for Compression`_ and `QAT based Encryption for RGW`_.
12
13
14 QAT in the Software Stack
15 =========================
16
17 Application developers can access QuickAssist features through the QAT API.
18 The QAT API is the top-level API for QuickAssist technology, and enables easy
19 interfacing between the customer application and the QuickAssist acceleration
20 driver.
21
22 The QAT API accesses the QuickAssist driver, which in turn drives the
23 QuickAssist Accelerator hardware. The QuickAssist driver is responsible for
24 exposing the acceleration services to the application software.
25
26 A user can write directly to the QAT API, or the use of QAT can be done via
27 frameworks that have been enabled by others including Intel (for example, zlib*,
28 OpenSSL* libcrypto*, and the Linux* Kernel Crypto Framework).
29
30 QAT Environment Setup
31 =====================
32 1. QuickAssist Accelerator hardware is necessary to make use of accelerated
33 encryption and compression services. And QAT driver in kernel space have to
34 be loaded to drive the hardware.
35
36 The driver package can be downloaded from `Intel Quickassist Technology`_.
37
38 2. The implementation for QAT based encryption is directly base on QAT API which
39 is included the driver package. But QAT support for compression depends on
40 QATzip project, which is a user space library which builds on top of the QAT
41 API. QATZip can support several compression algorithm, including deflate,
42 snappy, lz4, etc..
43
44 See `QATzip`_.
45
46 Implementation
47 ==============
48 1. QAT based Encryption for RGW
49
50 `OpenSSL support for RGW encryption`_ has been merged into Ceph, and Intel also
51 provides one `QAT Engine`_ for OpenSSL. So, theoretically speaking, QAT based
52 encryption in Ceph can be directly supported through OpenSSl+QAT Engine.
53
54 But the QAT Engine for OpenSSL currently supports chained operations only, and
55 so Ceph will not be able to utilize QAT hardware feature for crypto operations
56 based on OpenSSL crypto plugin. As a result, one QAT plugin based on native
57 QAT API is added into crypto framework.
58
59 2. QAT Support for Compression
60
61 As mentioned above, QAT support for compression is based on QATzip library in
62 user space, which is designed to take full advantage of the performance provided
63 by QuickAssist Technology. Unlike QAT based encryption, QAT based compression
64 is supported through a tool class for QAT acceleration rather than a compressor
65 plugin. The common tool class will be shared among zip, snappy, lz4 compressor
66 plugins, and can transparently accelerate the existing compression types. So
67 user is allowed to use it to speed up the existing compression types as long as
68 the QAT hardware is available and QAT is capable to handle them.
69
70 Configuration
71 =============
72 1. QAT based Encryption for RGW
73
74 Edit the Ceph configuration file to make use of QAT based crypto plugin::
75
76 plugin crypto accelerator = crypto_qat
77
78 2. QAT Support for Compression
79
80 One CMake option have to be used to trigger QAT based compression::
81
82 -DWITH_QATZIP=ON
83
84 Edit the Ceph configuration file to enable QAT support for compression::
85
86 qat compressor enabled=true
87
88
89 .. _QAT Support for Compression: https://github.com/ceph/ceph/pull/19714
90 .. _QAT based Encryption for RGW: https://github.com/ceph/ceph/pull/19386
91 .. _Intel Quickassist Technology: https://01.org/intel-quickassist-technology
92 .. _QATzip: https://github.com/intel/QATzip
93 .. _OpenSSL support for RGW encryption: https://github.com/ceph/ceph/pull/15168
94 .. _QAT Engine: https://github.com/intel/QAT_Engine