Article ID: 000095507 Content Type: Product Information & Documentation Last Reviewed: 07/14/2023

[Gramine] Unable to Determine Why There Is Initial Graminized Server Response Latency Discrepancy

BUILT IN - ARTICLE INTRO SECOND COMPONENT
Summary

The network driver and necessary dependencies are loaded when the first request is received. The subsequent requests are more readily served.

Description

Unable to determine why the discrepancy in server response latency on GSC image requests (tens of milliseconds and tens of microseconds).

Unable to determine what is being cached so that the subsequent requests are served quicker.

Resolution

The network driver and necessary dependencies are loaded when the first request is received. The subsequent requests are more readily served.

It is possible to shift the server response latency cost to the enclave startup with pre-heating-enclave with this command:

sgx.preheat_enclave = [true|false]

When enabled, this option instructs Gramine to pre-fault all heap pages during initialization. This has a negative impact on the total run time but shifts the EPC page faults cost to the initialization phase, which can be useful in a scenario where a server starts and receives connections / work packages only after some time. It also makes the later run time and latency much more predictable.

This option makes sense only when the EPC is large enough to hold the whole heap area.

This option is invalid (i.e. must be false) if specified together with sgx.edmm_enable, as there are no heap pages to pre-fault.

Refer reference for more information.

Related Products

This article applies to 2 products