mheyman / Isopoh.Cryptography.Argon2

Fully managed .Net Core implementation of Argon2
Other
196 stars 9 forks source link

Extreme memory utilization for concurrent usage that seems to be curtailed when run in 32 bit mode #23

Closed igsathya closed 4 years ago

igsathya commented 4 years ago

We are using this library from a web service running in IIS to verify password hashes that are created with the library. When we have concurrent verifications run (even 10-15), the memory usage jumps to 2-4GB and sometimes depending on the number of verifications, jumps up to 8-12 GB. When we set the application to run in 32 bit mode, while the verification might be a bit slower, this is no longer an issue. Any thoughts?

mheyman commented 4 years ago

Not sure why this is curtailed in 32-bit mode other than perhaps some of the issue was with the calculation to determine maximum amount of lockable RAM. That calculation was occurring by default when SecureArray failed to lock RAM. It now only occurs when requested. There was an issue in v1.1.6-1.1.7 that allocated an extra 128X bytes of RAM that has been fixed in v1.1.8.