OSDN Git Service

Reduce CPU utilisation of WALSender process. Process was using 10% CPU
authorSimon Riggs <simon@2ndQuadrant.com>
Wed, 24 Mar 2010 20:11:12 +0000 (20:11 +0000)
committerSimon Riggs <simon@2ndQuadrant.com>
Wed, 24 Mar 2010 20:11:12 +0000 (20:11 +0000)
commit08882ce74cd6775bd8446eb7343c61a3e5648620
tree31b260f3ac819933082f250864d165f65b90f2a6
parent16a4186d6aab46953f03f52b7a6d9ede7c89eaf7
Reduce CPU utilisation of WALSender process. Process was using 10% CPU
doing nothing, caused by naptime specified in milliseconds yet units of
pg_usleep() parameter is microseconds. Correctly specifying units
reduces call frequency by 1000. Reduction in CPU consumption verified.
src/backend/replication/walsender.c