[Pcsclite-muscle] High CPU load with pcscd and Kerkey security Module

Oliver Graute oliver.graute
Tue Nov 22 08:41:41 PST 2016


On Tue, Nov 22, 2016 at 11:06 AM, Ludovic Rousseau
<ludovic.rousseau at gmail.com> wrote:
> 2016-11-22 9:40 GMT+01:00 Oliver Graute <oliver.graute at gmail.com>:
>> Results sorted by total execution time
>> total time: 597.958052 sec
>> 1.260111 sec ( 14 calls)  0.21% SCardTransmit
>> 0.437992 sec ( 37 calls)  0.07% SCardStatus
>> 0.058914 sec (  3 calls)  0.01% SCardEndTransaction
>> 0.031738 sec (  4 calls)  0.01% SCardGetStatusChange
>> 0.016146 sec (  1 calls)  0.00% SCardEstablishContext
>> 0.015728 sec (  2 calls)  0.00% SCardConnect
>> 0.008783 sec (  3 calls)  0.00% SCardBeginTransaction
>> 0.004295 sec (  3 calls)  0.00% SCardListReaders
>> 0.000688 sec (  1 calls)  0.00% SCardDisconnect
>>
>> Results sorted by total execution time
>> total time: 597.958052 sec
>> 42.015016 sec (308 calls)  7.03% SCardTransmit
>> 9.974089 sec (1687 calls)  1.67% SCardStatus
>> 3.144835 sec (278 calls)  0.53% SCardEndTransaction
>> 2.814056 sec (123 calls)  0.47% SCardGetStatusChange
>> 1.173591 sec (278 calls)  0.20% SCardBeginTransaction
>> 0.226849 sec (  4 calls)  0.04% SCardConnect
>> 0.047858 sec (  2 calls)  0.01% SCardEstablishContext
>> 0.032616 sec (  6 calls)  0.01% SCardListReaders
>> 0.019015 sec (  4 calls)  0.00% SCardDisconnect
>> 0.004632 sec (  2 calls)  0.00% SCardReleaseContext
>>
>> I don't now why I got two results sets here.
>
> Because your program used 2 threads.
> Each thread generates its own results. I will try to impove the output.
>
> That does not explain why pcscd load is at 60%.
> The load is high only when you run your program? or always?


The load is high the first 5-10 min after booting of our system.
In this time we start two instances of apache webserver and our
application. Then its settle down and spike up if a TLS session
is build up. The TLS Handshake always causes a bit load on
pcscd and the Kerkey SM. With one TLS session its usable
but not with more.

I don't understand why so many SCardStatus operations and
SCardTransmit are needed and where their come from.
Probably their caused from the closed ST Kerkey lib or above
from mod_nss or nss.


Best regards,

Oliver




More information about the pcsclite-muscle mailing list