~cbehrens/nova/rpc-refactor

« back to all changes in this revision

Viewing changes to nova/rpc.py

  • Committer: termie
  • Author(s): Chris Behrens
  • Date: 2011-05-19 01:47:38 UTC
  • Revision ID: github@anarkystic.com-20110519014738-4jdl4o2xdx4tr6yd
Add rpc_conn_pool_size flag for the new connection pool

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
 
51
51
 
52
52
FLAGS = flags.FLAGS
53
 
flags.DEFINE_integer('rpc_thread_pool_size', 1024, 'Size of RPC thread pool')
 
53
flags.DEFINE_integer('rpc_thread_pool_size', 1024,
 
54
        'Size of RPC thread pool')
 
55
flags.DEFINE_integer('rpc_conn_pool_size', 30,
 
56
        'Size of RPC connection pool')
54
57
 
55
58
 
56
59
class Connection(carrot_connection.BrokerConnection):
99
102
    def create(self):
100
103
        return Connection.instance(new=True)
101
104
 
102
 
ConnectionPool = Pool(max_size=20)
 
105
ConnectionPool = Pool(max_size=FLAGS.rpc_conn_pool_size)
103
106
 
104
107
 
105
108
class Consumer(messaging.Consumer):