IronCoreLabs / ironoxide

Rust SDK for IronCore Privacy Platform
https://docs.rs/ironoxide
GNU Affero General Public License v3.0
10 stars 3 forks source link

Determine what might be limiting # of parallel decrypts #241

Closed BobWall23 closed 3 years ago

BobWall23 commented 3 years ago

During TSP testing, it appears that ironoxide may be limiting the number of decrypt operations (which include a call to ironcore_id to fetch the transformed EDEK) that are being done in parallel.

Need to determine if there is something that is limiting the parallelism, or if it is something in the ironoxide consumer in the TSP.

skeet70 commented 3 years ago

AES decrypts and Recrypt transforms were both happening in the decrypt future after the network DocumentGet for metadata comes back. This meant that the future was doing a big chunk of CPU heavy crypto work without yielding or doing anything special to accommodate it. We should have a PR soon that uses tokio::spawn_blocking to explicitly move that section of the future onto a threadpool for heavy stuff, allowing the normal threadpool to keep cranking on the network work. This immediately improved CPU utilization.