[jdk17u-dev] RFR: 8298249: Excessive memory allocation in CipherInputStream AEAD decryption

Aleksey Shipilev shade at openjdk.org
Thu Apr 11 15:16:45 UTC 2024


On Thu, 11 Apr 2024 14:29:10 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> Improves `CipherInputStream` with `AES-GCM` significantly. This problem is seen in some of our services.
> 
> There is a related [JDK-8298865](https://bugs.openjdk.org/browse/JDK-8298865), which I would backport separately.
> 
> Additional testing:
>  - [x] MacOS AArch64 server fastdebug, `jdk_security`
>  - [ ] Linux x86_64 server fastdebug, `all`
>  - [x] Ad-hoc benchmarks 
> 
> 
> Benchmark                        (dataSize)  (keyLength)    Mode  Cnt       Score     Error  Units
> 
> # Before
> AESGCMCipherInputStream.decrypt       16384          128   thrpt   40   35547.250 ± 154.108  ops/s
> AESGCMCipherInputStream.decrypt     1048576          128   thrpt   40      17.297 ±   0.043  ops/s
> AESGCMCipherInputStream.encrypt       16384          128   thrpt   40  150791.244 ± 656.878  ops/s
> AESGCMCipherInputStream.encrypt     1048576          128   thrpt   40    2561.195 ±  27.701  ops/s
> 
> # After
> AESGCMCipherInputStream.decrypt       16384          128   thrpt   40   65815.523 ± 156.983  ops/s
> AESGCMCipherInputStream.decrypt     1048576          128   thrpt   40     786.680 ± 298.170  ops/s
> AESGCMCipherInputStream.encrypt       16384          128   thrpt   40  149412.181 ± 431.304  ops/s
> AESGCMCipherInputStream.encrypt     1048576          128   thrpt   40    2581.110 ±  23.931  ops/s

Surprising test failures. Getting back to draft.

-------------

PR Comment: https://git.openjdk.org/jdk17u-dev/pull/2393#issuecomment-2049933225


More information about the jdk-updates-dev mailing list