Intel® Software Guard Extensions (Intel® SGX)
Discussion board focused on hardware-based isolation and memory encryption to provide extended code protection in solutions.

SGX on a Multi Core Server

damgaard22
Beginner
1,183 Views

Hi Intel,

It is my understanding that you can run multiple enclaves on the same SGX enabled chip and run multiple threads if it has more than 1 core.

My question is if there is any benefit to running multiple enclaves without threads on a server with 8 cores vs. a server with 2, does the system do some context switching and make use of the cores or are the cores not helpful in that scenario.

Furthermore, what determines how many enclaves you can have running at the same time on a single SGX chip.

Best Regards, 
Mads

0 Kudos
1 Solution
JesusG_Intel
Moderator
1,183 Views

Hi,

"The number of threads that can run simultaneously inside an enclave is limited by the number of TCSes. The number of TCSes is limited by the amount of EPC memory available."

TCS is Thread Control Structure. Basically, you are limited to the 128MB or 256MB of EPC memory available on your platform. You can run as many enclaves as you can fit in that space.

Regards,

Jesus

View solution in original post

0 Kudos
5 Replies
JesusG_Intel
Moderator
1,183 Views

Hello damgaard22,

This post on SGX Threading answers your question.

Regards,

Jesus

Intel Customer Support

0 Kudos
damgaard22
Beginner
1,183 Views

Hi Jesus,

Thanks, that cleared up some things.

But i am still wondering what limits the amount of enclaves running on say an 8 core processors.
If i do not use threading in my enclaves am i still limited on the amount of cores?

So if i have 8 cores can i run a maximum of 8 enclaves at once?

0 Kudos
JesusG_Intel
Moderator
1,184 Views

Hi,

"The number of threads that can run simultaneously inside an enclave is limited by the number of TCSes. The number of TCSes is limited by the amount of EPC memory available."

TCS is Thread Control Structure. Basically, you are limited to the 128MB or 256MB of EPC memory available on your platform. You can run as many enclaves as you can fit in that space.

Regards,

Jesus

0 Kudos
damgaard22
Beginner
1,183 Views

Hi Jesus,

Perfect, that makes sense.

Since i am working on linux which supports paging, is the limit still 256MB or is it increased to the max heapsize of 3.75GB due to paging.
(Though this probably comes with some performance costs).

If this should be a new thread, then just say so.

Best Regards.
Mads

0 Kudos
JesusG_Intel
Moderator
1,183 Views

Hi Mads, you are limited to the amount of EPC memory.

Regards,

Jesus

Intel Customer Support

0 Kudos
Reply