powertop(8) Points at gpg-agent.

Werner Koch wk at gnupg.org
Mon Feb 20 09:30:26 CET 2017


On Fri, 17 Feb 2017 14:59, ralph at inputplus.co.uk said:

> gnupg 2.1.18-1 on Arch Linux.  I noticed powertop ranking the
> gpg-agents, one per user, quite highly, and their impact is multiplied
> by their number.  strace(1) showed the two-second select(2) timing out
> with no syscalls in between, and the forking of two siblings to have a
> `GETINFO pid' chat every minute.

What you see are not new processes but merely two threads every minute.
One for doing the client part and one for the server part.  Thus rewouse
usage is minimal.  --disable-check-own-socket can be used to disable
this feature.

>     # define TIMERTICK_INTERVAL          (2)

I have not changed that interval because it is useful when you are using
smartcards.  What is does is to check the aliveness of scdaemon by doing
a waitpid (pid, NULL, WNOHANG)).  Not really resource intensive.  Going
down to 5 seconds would be okay but more will lead to problems with
other applications which want to use a card reader. 

> Are there any plans to make gpg-agent consume less background resources?
> It remains running here when a user logs out.  Is that common?  A
> variety of users logging in over time divides TIMERTICK_INTERVAL quite a

Note that gpg-agent makes sure that the tick happens on the full second
so that gpg-agent will wakeup at the same time as other background
processes wake up.

I doubt that gpg-agent is in any way a resource hog even on a real
multi-user system.


Salam-Shalom,

   Werner

-- 
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 227 bytes
Desc: not available
URL: </pipermail/attachments/20170220/a38af780/attachment.sig>


More information about the Gnupg-users mailing list