Article ID: 000059483 Content Type: Maintenance & Performance Last Reviewed: 07/31/2024

Why does "SL_DEFAULT_FALLBACK_RETRIES = 20000" in the Intel® Software Guard Extensions (Intel® SGX) SDK?

BUILT IN - ARTICLE INTRO SECOND COMPONENT
Summary

Tuning workloads when using switchless ocalls in Intel® Software Guard Extensions (Intel® SGX) enclaves

Description
  • SL_DEFAULT_FALLBACK_RETRIES is set to 20000 in linux-sgx/common/inc/sgx_uswitchless.h.
  • This default parameter causes applications that do many long switchless ocalls to have slow performance compared to the performance they have when switchless is disabled.
  • Unable to validate why 20000 is the default value.
Resolution

While the specific reason for SL_DEFAULT_FALLBACK_RETRIES = 20000 is not known, workloads that use switchless calls require fine-performance tuning. The Intel® Software Guard Extensions (Intel® SGX)  Developer Reference for Linux* states:

Switchless Calls is an advanced feature. It requires additional worker threads and configuration, performance testing, and tuning. It should be used for workloads that require fine performance tuning. Misconfiguration may result in underutilized worker threads, which consumes CPU time while not serving any tasks.

Additional information

The Intel SGX Developer Reference for Linux is in the Documentation folder of the latest release of the Intel® Software Guard Extensions SDK for Linux*.

Related Products

This article applies to 1 products