Overview
The OpenSSL pipelining feature provides the capability to parallelize processing for a single connection. Large buffers can be split into smaller chunks, with each chunk processed simultaneously, improving throughput and performance.How QAT Engine Supports Pipelining
The Intel QAT OpenSSL Engine supports OpenSSL’s pipelining capability specifically for chained cipher encryption operations.Pipeline Specifications
- Maximum Pipelines: 32 buffer chunks can be processed in parallel
- Maximum Pipeline Size: 16,384 bytes per pipeline
- Acceleration Policy: Pipelined operations are always accelerated to the hardware accelerator, ignoring the small packet offload threshold
Use Cases
TLS Connection Optimization
Pipelining is particularly useful for:- Large Data Transfers: Breaking large SSL/TLS payloads into parallel chunks
- High Throughput Scenarios: Maximizing bandwidth utilization on high-speed connections
- Bulk Encryption: Encrypting large files or data streams efficiently
Example: Encrypting a Large Buffer
Instead of encrypting a 64KB buffer sequentially:Configuration
OpenSSL Pipelining API
Applications can control pipelining behavior using OpenSSL’s SSL context functions:Recommended Settings
For optimal QAT Engine performance:Performance Benefits
Parallelization Advantages
- Reduced Latency: Multiple chunks processed simultaneously reduce overall processing time
- Better Hardware Utilization: Keeps QAT acceleration devices busy with parallel work
- Improved Throughput: Higher data rates for bulk encryption operations
Performance Considerations
Pipelined operations bypass the small packet offload threshold, ensuring all pipelined chunks are hardware-accelerated regardless of size.
- Large file transfers over TLS
- High-bandwidth streaming applications
- Bulk data encryption/decryption
- Small message transfers (overhead may outweigh benefits)
- Request-response protocols with small payloads
- Applications with limited buffer sizes
Limitations
Supported Operations
- Supported: Chained cipher encryption operations
- Not Supported:
- Standalone cipher operations
- Hash operations
- Asymmetric cryptography
- Key derivation functions
Resource Constraints
- Maximum 32 concurrent pipelines per connection
- Maximum 16,384 bytes per pipeline chunk
- Requires sufficient QAT instances to handle parallel operations
OpenSSL Documentation
For comprehensive information about OpenSSL’s pipelining API, refer to: SSL_CTX_set_split_send_fragment - OpenSSL DocumentationExample Usage
C Application Example
Performance Measurement
Test pipelining performance:Best Practices
- Size Your Fragments: Use 16KB fragments to match QAT’s maximum pipeline size
- Monitor Resource Usage: Ensure sufficient QAT instances are available for parallel operations
- Profile Your Workload: Measure performance gains with your specific data patterns
- Consider Memory: Each pipeline requires buffer allocation; balance parallelism with memory constraints