Code Review Request: 7107611 sun.security.pkcs11.SessionManager is scalability blocker
Anthony Scarpino
anthony.scarpino at oracle.com
Tue Feb 11 00:30:20 UTC 2014
On 02/10/2014 03:04 PM, Valerie (Yu-Ching) Peng wrote:
>
> Well, there are some changes that look strange which I need more time to
> figure out.
> For example, the purpose for the 2 new pkg private methods of poll(Pool)
> and release(Pool, Session) of the static class Pool.
New methods are for supporting local pools.
>
> Also, now that every P11Cipher "object" has its own session pool, will
> this have any impact on the overall memory usage.
I would think the memory usage would mostly transfer the session from
SessionManager to P11Cipher.
It is true that if many P11Cipher objects are created, that could be
more idle op session around if P11Cipher objects lingers. But the
object session stay in SessionManager, which is probably the bulk of the
memory usage.
> If P11Cipher object is not re-used much and only have a short life span,
> what's the point of having a local session pool to re-use the sessions.
If the P11Cipher object is created sparingly and short lived, creating
one session for usage and then getting gc'ed, I would suspect crypto
performance isn't a top issue. But I could see that only happening in
large crypto deployments using that methodology; however, I'm not sure
that is wise development methodology to start with. You'd better
insight if such designs are common.
Tony
>
> Thanks,
> Valerie
>
>
>
> On 02/03/14 10:24, Anthony Scarpino wrote:
>> Hi,
>>
>> I'm requesting a review of these changes. It is mostly from the patch
>> that Intel provided, but I have made some cosmetic changes. The
>> changes significantly improve performance in multithreaded application
>> using pkcs11.
>>
>> http://cr.openjdk.java.net/~ascarpino/7107611/webrev.00/
>>
>> thanks
>>
>> Tony
>
More information about the security-dev
mailing list