sgx is widely used in edge/cloud computing. in fact they use SGX to run the user's code. but it's strange for me. what is the capacity of SGX? i mean how many codes we can run in SGX? doesn't it have limitation? how they run all of the user's code (may hundreds of thousands code) in one SGX? is the capacity of the server's SGX is different from pc's SGX?
Asked
Active
Viewed 76 times
1 Answers
2
The main limitation is the amount of RAM an enclave can use. Most common values (see your BIOS) are 128/256Mb.
Edit: Intel recently increased dramatically the limit, up to 1Tb. Yes, one terabyte. Check this thread for more details.

X99
- 905
- 10
- 24
-
but 128/256 Mb is so small for saving the data of thousands client. so how servers do this? – capstonene May 23 '21 at 09:26
-
This limitation must indeed be taken into account right from the start. I work on a service that processes thousands of requests every second, 128Mb of RAM isn't so much of an issue. But yes, this can be very tight, especially when you need to store data. A solution we use too is horizontal scalability using k8s. A single CPU can hold many enclaves at once. – X99 May 24 '21 at 16:45