what's the Maximum of "StackMaxSize"and "HeapMaxSize"in Enclave Configuration File(.xml)?

what's the Maximum of "StackMaxSize"and "HeapMaxSize"in Enclave Configuration File(.xml)?

 hello,recently,I want to pass amounts of data from application to enclave at once.and I notice that enclave will firstly copy those data from application memory to the enclave memory(enclave stack).It may cause enclave can't have enough stack space to do other things,so I want to change the "StackMaxSize"and  "HeapMaxSize" for more space,but I don't know the maximum of those,I just know that the value of the "StackMaxSize"and  "HeapMaxSize"  Must be 4KB aligned.so any one can tell me about the maximum of "StackMaxSize"and  "HeapMaxSize"in enclave configuration file(.xml)?Thank you very much!

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

There is a related posting on this topic https://software.intel.com/en-us/forums/intel-software-guard-extensions-intel-sgx/topic/670322

Basically, it must be 4KB aligned (see our documentation at https://software.intel.com/en-us/node/708992) and the total should be less than 90M for optimal performance. On Linux, it can be swapped out. Therefore, the number can be as large as the operating system can support.

Performance should be taken into consideration. Our documentation states "To avoid wasting the valuable protected memory resource, you can properly adjust the StackMaxSize and HeapMaxSize by using the measurement tool sgx_emmt" so you should define large number with care. There is also a whitepaper on this performance issue at https://software.intel.com/sites/default/files/managed/09/37/Intel-SGX-Performance-Considerations.pdf

 

ok,Thank you , and I really appreciate your help.

Leave a Comment

Please sign in to add a comment. Not a member? Join today