rpc: Disable HTTP client pool and reduce memory consumption
authorMichael Hanselmann <hansmi@google.com>
Wed, 12 Oct 2011 10:37:43 +0000 (12:37 +0200)
committerMichael Hanselmann <hansmi@google.com>
Wed, 12 Oct 2011 10:56:40 +0000 (12:56 +0200)
commit05927995961cff7909d94d76c004991b8896ce12
tree89e8b97f1dd23ee482dc88b8b20c2ee70b3cfffc
parentfd121c8ec0f99b4eb138ef7936a33e9a6b530d7a
rpc: Disable HTTP client pool and reduce memory consumption

We noticed that “ganeti-masterd” can use large amounts of memory,
especially on large clusters. Measurements showed a single PycURL client
using about 500 kB of heap memory (the actual usage depends on versions,
build options and settings).

The RPC client uses a per-thread HTTP client pool with one client per
node. At this time there are 41 non-main threads (25 for the job queue
and 16 for client requests). This means the HTTP client pools use a lot
of memory (ca. 200 MB for 10 nodes, ca. 1 GB for 50 nodes).

This patch disables the per-thread HTTP client pool. No cleanup of
unused code is done. That will be done in the master branch only.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
lib/rpc.py